summaryrefslogtreecommitdiff
path: root/lib_arm
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-06-03 00:24:36 +0200
committerWolfgang Denk <wd@denx.de>2008-06-03 00:24:36 +0200
commit912810eeca90eedd1503f5e883f3a8da39d7ff89 (patch)
tree56d7a80b4d10e12e088eb51ad4aeb0fa22d0ed7a /lib_arm
parent7a68389a231ac061ba2ffd628f86e15ed0545a7b (diff)
parent602cac1389b755b223272f2328a47e6f8c240848 (diff)
Merge remote branch 'u-boot-at91/for-1.3.4'
Diffstat (limited to 'lib_arm')
-rw-r--r--lib_arm/board.c39
1 files changed, 28 insertions, 11 deletions
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 5e045539117..80b149b534a 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -115,6 +115,20 @@ void *sbrk (ptrdiff_t increment)
return ((void *) old);
}
+char *strmhz(char *buf, long hz)
+{
+ long l, n;
+ long m;
+
+ n = hz / 1000000L;
+ l = sprintf (buf, "%ld", n);
+ m = (hz % 1000000L) / 1000L;
+ if (m != 0)
+ sprintf (buf + l, ".%03ld", m);
+ return (buf);
+}
+
+
/************************************************************************
* Coloured LED functionality
************************************************************************
@@ -273,7 +287,7 @@ void start_armboot (void)
{
init_fnc_t **init_fnc_ptr;
char *s;
-#ifndef CFG_NO_FLASH
+#if !defined(CFG_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD)
ulong size;
#endif
#if defined(CONFIG_VFD) || defined(CONFIG_LCD)
@@ -317,16 +331,19 @@ void start_armboot (void)
#endif /* CONFIG_VFD */
#ifdef CONFIG_LCD
-# ifndef PAGE_SIZE
-# define PAGE_SIZE 4096
-# endif
- /*
- * reserve memory for LCD display (always full pages)
- */
- /* bss_end is defined in the board-specific linker script */
- addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
- size = lcd_setmem (addr);
- gd->fb_base = addr;
+ /* board init may have inited fb_base */
+ if (!gd->fb_base) {
+# ifndef PAGE_SIZE
+# define PAGE_SIZE 4096
+# endif
+ /*
+ * reserve memory for LCD display (always full pages)
+ */
+ /* bss_end is defined in the board-specific linker script */
+ addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+ size = lcd_setmem (addr);
+ gd->fb_base = addr;
+ }
#endif /* CONFIG_LCD */
/* armboot_start is defined in the board-specific linker script */