From 9e70c08b6fb7632385d59827e005569e5ddfd31d Mon Sep 17 00:00:00 2001 From: Simon Schwarz Date: Thu, 15 Mar 2012 04:01:37 +0000 Subject: devkit8000/spl: init GPMC for dm9000 in SPL Linux crashes if the GPMC isn't configured for the dm9000. Signed-off-by: Simon Schwarz CC: Tom Rini CC: Stefano Babic CC: Wolfgang Denk --- board/timll/devkit8000/devkit8000.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'board/timll/devkit8000/devkit8000.c') diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index 10f189eed..dded697f9 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -73,6 +73,13 @@ int board_init(void) return 0; } +/* Configure GPMC registers for DM9000 */ +static void gpmc_dm9000_config(void) +{ + enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[6], + CONFIG_DM9000_BASE, GPMC_SIZE_16M); +} + /* * Routine: misc_init_r * Description: Configure board specific parts @@ -144,6 +151,18 @@ int board_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_SPL_OS_BOOT +/* + * Do board specific preperation before SPL + * Linux boot + */ +void spl_board_prepare_for_linux(void) +{ + gpmc_dm9000_config(); +} + +#endif + /* * Routine: get_board_mem_timings * Description: If we use SPL then there is no x-loader nor config header -- cgit v1.2.3 From 2d52a9a38c20697b4aeecac0541c7496809e8238 Mon Sep 17 00:00:00 2001 From: Simon Schwarz Date: Thu, 15 Mar 2012 04:01:40 +0000 Subject: devkit8000: Implement and activate direct OS boot - Implements spl_start_uboot() for devkit8000 - Add configs to activate direct OS boot from SPL Signed-off-by: Simon Schwarz CC: Tom Rini CC: Stefano Babic CC: Wolfgang Denk --- board/timll/devkit8000/devkit8000.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'board/timll/devkit8000/devkit8000.c') diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c index dded697f9..d75e86b32 100644 --- a/board/timll/devkit8000/devkit8000.c +++ b/board/timll/devkit8000/devkit8000.c @@ -41,6 +41,7 @@ #include #include #include "devkit8000.h" +#include #ifdef CONFIG_DRIVER_DM9000 #include #include @@ -161,6 +162,23 @@ void spl_board_prepare_for_linux(void) gpmc_dm9000_config(); } +/* + * devkit8000 specific implementation of spl_start_uboot() + * + * RETURN + * 0 if the button is not pressed + * 1 if the button is pressed + */ +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 /* -- cgit v1.2.3