@@ -57,6 +57,9 @@ u32 omap_boot_mode(void)
void s_init(void)
{
watchdog_init();
+#ifdef CONFIG_PRELOADER
+ preloader_console_init();
+#endif
}
/*
@@ -67,5 +67,6 @@
u32 omap_boot_device(void);
u32 omap_boot_mode(void);
+void preloader_console_init(void);
#endif /* _OMAP_COMMON_H_ */
@@ -28,6 +28,46 @@ include $(TOPDIR)/config.mk
SOBJS =
COBJS =
+# serial console
+$(obj)eabi_compat.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/arch/arm/lib/eabi_compat.c $@
+
+$(obj)string.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/lib/string.c $@
+
+$(obj)vsprintf.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/lib/vsprintf.c $@
+
+$(obj)console.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/common/console.c $@
+
+$(obj)stdio.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/common/stdio.c $@
+
+$(obj)serial.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/drivers/serial/serial.c $@
+
+$(obj)ns16550.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/drivers/serial/ns16550.c $@
+
+$(obj)div64.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/lib/div64.c $@
+
+$(obj)ctype.c:
+ @rm -f $@
+ @ln -s $(TOPDIR)/lib/ctype.c $@
+
+COBJS += serial.o ns16550.o string.o vsprintf.o console.o stdio.o
+COBJS += ctype.o eabi_compat.o div64.o
+
# armv7
$(obj)start.S:
@rm -f $@
@@ -45,3 +45,13 @@ void board_init_r(gd_t *id, ulong dummy)
for (;;)
;
}
+
+void preloader_console_init(void)
+{
+ gd->bd = &bdata;
+ gd->flags |= GD_FLG_RELOC;
+ gd->baudrate = CONFIG_BAUDRATE;
+ serial_init(); /* serial communications setup */
+ printf("\nU-Boot SPL for Texas Instruments OMAP4 (%s - %s)\n",
+ U_BOOT_DATE, U_BOOT_TIME);
+}
Signed-off-by: Aneesh V <aneesh@ti.com> --- arch/arm/cpu/armv7/omap4/board.c | 3 ++ arch/arm/include/asm/omap_common.h | 1 + spl/board/ti/sdp4430/Makefile | 40 ++++++++++++++++++++++++++++++++++++ spl/board/ti/spl-omap.c | 10 +++++++++ 4 files changed, 54 insertions(+), 0 deletions(-)