am43xx_evm: add usb host boot support
authorMugunthan V N <mugunthanvnm@ti.com>
Tue, 16 Jun 2015 14:53:38 +0000 (20:23 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 19 Jun 2015 20:46:49 +0000 (16:46 -0400)
While booting via usb host mode, ROM uses DMA to copy MLO over USB so
ARM internal RAM cannot be used. Adding USB host boot support by
introducing new config target which sets SPL_TEXT_BASE to OCMC ram.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
configs/am43xx_evm_usbhost_boot_defconfig [new file with mode: 0644]
include/configs/am43xx_evm.h

diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
new file mode 100644 (file)
index 0000000..071deac
--- /dev/null
@@ -0,0 +1,5 @@
+CONFIG_ARM=y
+CONFIG_TARGET_AM43XX_EVM=y
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_USB_HOST_SUPPORT"
+CONFIG_CMD_NET=y
index ade7151..e1cd7a8 100644 (file)
 #define CONFIG_POWER_TPS62362
 
 /* SPL defines. */
+#ifdef CONFIG_SPL_USB_HOST_SUPPORT
+/*
+ * For USB host boot, ROM uses DMA for copying MLO from USB storage
+ * and ARM internal ram is not accessible for DMA, so SPL text base
+ * should be in OCMC ram
+ */
+#define CONFIG_SPL_TEXT_BASE           0x40300350
+#else
 #define CONFIG_SPL_TEXT_BASE           0x402F4000
+#endif
 #define CONFIG_SPL_MAX_SIZE            (220 << 10)     /* 220KB */
 #define CONFIG_SYS_SPL_ARGS_ADDR       (CONFIG_SYS_SDRAM_BASE + \
                                         (128 << 20))
 #define CONFIG_SPL_LDSCRIPT            "$(CPUDIR)/omap-common/u-boot-spl.lds"
 
 /* SPL USB Support */
+#ifdef CONFIG_SPL_USB_HOST_SUPPORT
 #define CONFIG_SPL_USB_SUPPORT
-#define CONFIG_SPL_USB_HOST_SUPPORT
 #define CONFIG_SYS_USB_FAT_BOOT_PARTITION              1
 
 #define CONFIG_CMD_USB
 
 #define CONFIG_OMAP_USB_PHY
 #define CONFIG_AM437X_USB2PHY2_HOST
+#endif
 
 /* USB GADGET */
 #if !defined(CONFIG_SPL_BUILD) || \