OMAP3: twister: add support to boot Linux from SPL
authorStefano Babic <sbabic@denx.de>
Thu, 15 Mar 2012 04:01:44 +0000 (04:01 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 27 Mar 2012 20:05:29 +0000 (22:05 +0200)
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
board/technexion/twister/twister.c
include/configs/twister.h

index 50c70ab60312c50cb614858dee392d22b26f2f20..b92758692d57a49d1611b999aeb0cf979be3ce22 100644 (file)
@@ -136,3 +136,26 @@ int board_mmc_init(bd_t *bis)
        return omap_mmc_init(0);
 }
 #endif
+
+#ifdef CONFIG_SPL_OS_BOOT
+/*
+ * Do board specific preperation before SPL
+ * Linux boot
+ */
+void spl_board_prepare_for_linux(void)
+{
+       /* init cs for extern lan */
+       enable_gpmc_cs_config(gpmc_smc911, &gpmc_cfg->cs[5],
+               CONFIG_SMC911X_BASE, GPMC_SIZE_16M);
+}
+int spl_start_uboot(void)
+{
+       int val = 0;
+       if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
+               gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
+               val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
+               gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+       }
+       return val;
+}
+#endif
index 64a886d3a4f36edf42a84581d85f715b0c2457b9..a8524816a851793ef4965c3d88f68b613c93331b 100644 (file)
 #define        CONFIG_EXTRA_ENV_SETTINGS       CONFIG_TAM3517_SETTINGS \
        "bootcmd=run nandboot\0"
 
+/* SPL OS boot options */
+#define CONFIG_CMD_SPL
+#define CONFIG_CMD_SPL_WRITE_SIZE      0x400 /* 1024 byte */
+#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS        0x00200000
+#define CONFIG_CMD_SPL_NAND_OFS        (CONFIG_SYS_NAND_SPL_KERNEL_OFFS+\
+                                               0x600000)
+#define CONFIG_SPL_OS_BOOT
+#define CONFIG_SPL_OS_BOOT_KEY 55
+
+#define CONFIG_SYS_SPL_ARGS_ADDR       (PHYS_SDRAM_1 + 0x100)
+#define CONFIG_SPL_BOARD_INIT
+
 #endif /* __CONFIG_H */