summaryrefslogtreecommitdiff
path: root/lib_arm
diff options
context:
space:
mode:
Diffstat (limited to 'lib_arm')
-rw-r--r--lib_arm/Makefile2
-rw-r--r--lib_arm/_udivsi3.S2
-rw-r--r--lib_arm/_umodsi3.S6
-rw-r--r--lib_arm/board.c49
4 files changed, 35 insertions, 24 deletions
diff --git a/lib_arm/Makefile b/lib_arm/Makefile
index 12a8748..c8795b2 100644
--- a/lib_arm/Makefile
+++ b/lib_arm/Makefile
@@ -38,7 +38,7 @@ COBJS-y += cache.o
COBJS-y += div0.o
COBJS-y += interrupts.o
-SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
$(LIB): $(obj).depend $(OBJS)
diff --git a/lib_arm/_udivsi3.S b/lib_arm/_udivsi3.S
index 2cdcd48..a3f9b59 100644
--- a/lib_arm/_udivsi3.S
+++ b/lib_arm/_udivsi3.S
@@ -61,7 +61,7 @@ Loop3:
bne Loop3
Lgot_result:
mov r0, result
- mov pc, lr
+ mov pc, lr
Ldiv0:
str lr, [sp, #-4]!
bl __div0 (PLT)
diff --git a/lib_arm/_umodsi3.S b/lib_arm/_umodsi3.S
index e4aebe8..8465ef0 100644
--- a/lib_arm/_umodsi3.S
+++ b/lib_arm/_umodsi3.S
@@ -19,7 +19,7 @@ curbit .req r3
beq Ldiv0
mov curbit, #1
cmp dividend, divisor
- movcc pc, lr
+ movcc pc, lr
Loop1:
@ Unless the divisor is very big, shift it up in multiples of
@ four bits, since this is the amount of unwinding in the main
@@ -66,14 +66,14 @@ Loop3:
@ then none of the below will match, since the bit in ip will not be
@ in the bottom nibble.
ands overdone, overdone, #0xe0000000
- moveq pc, lr @ No fixups needed
+ moveq pc, lr @ No fixups needed
tst overdone, ip, ror #3
addne dividend, dividend, divisor, lsr #3
tst overdone, ip, ror #2
addne dividend, dividend, divisor, lsr #2
tst overdone, ip, ror #1
addne dividend, dividend, divisor, lsr #1
- mov pc, lr
+ mov pc, lr
Ldiv0:
str lr, [sp, #-4]!
bl __div0 (PLT)
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 67506b3..80b149b 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -45,6 +45,8 @@
#include <version.h>
#include <net.h>
#include <serial.h>
+#include <nand.h>
+#include <onenand_uboot.h>
#ifdef CONFIG_DRIVER_SMC91111
#include "../drivers/net/smc91111.h"
@@ -55,14 +57,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#if defined(CONFIG_CMD_NAND)
-void nand_init (void);
-#endif
-
-#if defined(CONFIG_CMD_ONENAND)
-void onenand_init(void);
-#endif
-
ulong monitor_flash_len;
#ifdef CONFIG_HAS_DATAFLASH
@@ -121,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
************************************************************************
@@ -279,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)
@@ -323,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 */