From 8eb15a787c558fee98b0fa2a66ff0849c732edcc Mon Sep 17 00:00:00 2001 From: Steve Kipisz Date: Fri, 15 Mar 2013 08:32:53 -0500 Subject: am335x_evm:Add restore flash target and PG1.0 USB SPL support This patch adds the make targets for PG1.0 - am335x_evm_uart_usbspl - am335x_evm_restore_flash_usbspl It also add the make target - am335x_evm_restore_flash Signed-off-by: Steve Kipisz --- boards.cfg | 3 +++ common/spl/spl.c | 7 +++++++ include/configs/am335x_evm.h | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/boards.cfg b/boards.cfg index 4080e6db3e..7461464a6a 100644 --- a/boards.cfg +++ b/boards.cfg @@ -238,7 +238,10 @@ am335x_evm_uart3 arm armv7 am335x ti am335x_evm_uart4 arm armv7 am335x ti am33xx am335x_evm:SERIAL5,CONS_INDEX=5 am335x_evm_uart5 arm armv7 am335x ti am33xx am335x_evm:SERIAL6,CONS_INDEX=6 am335x_evm_usbspl arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,SPL_USBETH_SUPPORT +am335x_evm_restore_flash arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,RESTORE_FLASH am335x_evm_restore_flash_usbspl arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,RESTORE_FLASH,SPL_USBETH_SUPPORT +am335x_evm_uart_usbspl arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,UART_THEN_USB_SPL,SPL_USBETH_SUPPORT +am335x_evm_restore_flash_uart_usbspl arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,RESTORE_FLASH,UART_THEN_USB_SPL,SPL_USBETH_SUPPORT highbank arm armv7 highbank - highbank mx51_efikamx arm armv7 mx51_efikamx genesi mx5 mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKAMX,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_mx.cfg mx51_efikasb arm armv7 mx51_efikamx genesi mx5 mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKASB,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_sb.cfg diff --git a/common/spl/spl.c b/common/spl/spl.c index 4765e41d9c..005912655b 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -180,6 +180,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) boot_device = spl_boot_device(); debug("boot device - %d\n", boot_device); + +#ifdef CONFIG_UART_THEN_USB_SPL + /* Hack: load SPL via UART, then use USB */ + if (boot_device == BOOT_DEVICE_UART) + boot_device = BOOT_DEVICE_USBETH; +#endif + switch (boot_device) { #ifdef CONFIG_SPL_RAM_DEVICE case BOOT_DEVICE_RAM: diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 7752ca9993..311765d934 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -176,6 +176,7 @@ #undef CONFIG_BOOTDELAY #define CONFIG_BOOTDELAY 0 +#ifdef CONFIG_SPL_USBETH_SUPPORT #define CONFIG_BOOTCOMMAND \ "setenv autoload no; " \ "setenv ethact usb_ether; " \ @@ -183,6 +184,15 @@ "if tftp 80000000 debrick.scr; then " \ "source 80000000; " \ "fi" +#else +#define CONFIG_BOOTCOMMAND \ + "setenv autoload no; " \ + "setenv ethact cpsw; " \ + "dhcp; " \ + "if tftp 80000000 debrick.scr; then " \ + "source 80000000; " \ + "fi" +#endif #endif /* Clock Defines */ -- cgit v1.2.3