Re: [U-Boot] [PATCH V11 13/13] OMAP3: twister: add support to boot Linux from SPL
On 16/12/2011 17:01, Tom Rini wrote: > On Fri, Dec 16, 2011 at 8:37 AM, Stefano Babic wrote: >> Signed-off-by: Stefano Babic >> CC: Tom Rini >> CC: Wolfgang Denk >> CC: Simon Schwarz > [snip] >> +#ifdef CONFIG_SPL_BUILD >> +#undef CONFIG_HARD_I2C >> +#endif > > If we switch the I2C test to CONFIG_SPL_I2C_SUPPORT this part here can > go away, yes? Right, I will fix in this way. Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V11 13/13] OMAP3: twister: add support to boot Linux from SPL
On Fri, Dec 16, 2011 at 8:37 AM, Stefano Babic wrote: > Signed-off-by: Stefano Babic > CC: Tom Rini > CC: Wolfgang Denk > CC: Simon Schwarz [snip] > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_HARD_I2C > +#endif If we switch the I2C test to CONFIG_SPL_I2C_SUPPORT this part here can go away, yes? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V11 13/13] OMAP3: twister: add support to boot Linux from SPL
Signed-off-by: Stefano Babic CC: Tom Rini CC: Wolfgang Denk CC: Simon Schwarz --- board/technexion/twister/twister.c | 23 +++ include/configs/twister.h | 16 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c index 950e76c..fc88301 100644 --- a/board/technexion/twister/twister.c +++ b/board/technexion/twister/twister.c @@ -114,3 +114,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 diff --git a/include/configs/twister.h b/include/configs/twister.h index 64a886d..68ad31e 100644 --- a/include/configs/twister.h +++ b/include/configs/twister.h @@ -51,4 +51,20 @@ #defineCONFIG_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_OFFS0x0020 +#define CONFIG_CMD_SPL_NAND_OFS(CONFIG_SYS_NAND_SPL_KERNEL_OFFS+\ + 0x60) +#define CONFIG_SPL_OS_BOOT +#define CONFIG_SPL_OS_BOOT_KEY 7 + +#define CONFIG_SYS_SPL_ARGS_ADDR (PHYS_SDRAM_1 + 0x100) +#define CONFIG_SPL_BOARD_INIT + +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_HARD_I2C +#endif + #endif /* __CONFIG_H */ -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot