diff mbox

[U-Boot,2/3] am43xx_evm: add usb host boot support

Message ID 1433928857-5875-3-git-send-email-mugunthanvnm@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Mugunthan V N June 10, 2015, 9:34 a.m. UTC
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>
---
 configs/am43xx_evm_usbhost_boot_defconfig | 5 +++++
 include/configs/am43xx_evm.h              | 9 +++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 configs/am43xx_evm_usbhost_boot_defconfig

Comments

Tom Rini June 10, 2015, 6:56 p.m. UTC | #1
On Wed, Jun 10, 2015 at 03:04:16PM +0530, Mugunthan V N wrote:

> 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>
> ---
>  configs/am43xx_evm_usbhost_boot_defconfig | 5 +++++
>  include/configs/am43xx_evm.h              | 9 +++++++++
>  2 files changed, 14 insertions(+)
>  create mode 100644 configs/am43xx_evm_usbhost_boot_defconfig
> 
> diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
> new file mode 100644
> index 0000000..9455707
> --- /dev/null
> +++ b/configs/am43xx_evm_usbhost_boot_defconfig
> @@ -0,0 +1,5 @@
> +CONFIG_ARM=y
> +CONFIG_TARGET_AM43XX_EVM=y
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,USBHOST_BOOT"
> +CONFIG_CMD_NET=y

We need to be adding USBHOST_BOOT in Kconfig and that's a bit too
generic of a name.  It should perhaps be removed all together and only
set CONFIG_SPL_USB_HOST_SUPPORT for this build and not include it in the
rest.
Mugunthan V N June 16, 2015, 10:29 a.m. UTC | #2
On Thursday 11 June 2015 12:26 AM, Tom Rini wrote:
> On Wed, Jun 10, 2015 at 03:04:16PM +0530, Mugunthan V N wrote:
> 
>> 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>
>> ---
>>  configs/am43xx_evm_usbhost_boot_defconfig | 5 +++++
>>  include/configs/am43xx_evm.h              | 9 +++++++++
>>  2 files changed, 14 insertions(+)
>>  create mode 100644 configs/am43xx_evm_usbhost_boot_defconfig
>>
>> diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
>> new file mode 100644
>> index 0000000..9455707
>> --- /dev/null
>> +++ b/configs/am43xx_evm_usbhost_boot_defconfig
>> @@ -0,0 +1,5 @@
>> +CONFIG_ARM=y
>> +CONFIG_TARGET_AM43XX_EVM=y
>> +CONFIG_SPL=y
>> +CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,USBHOST_BOOT"
>> +CONFIG_CMD_NET=y
> 
> We need to be adding USBHOST_BOOT in Kconfig and that's a bit too
> generic of a name.  It should perhaps be removed all together and only
> set CONFIG_SPL_USB_HOST_SUPPORT for this build and not include it in the
> rest.
> 

Will fix this in v2

Regards
Mugunthan V N
diff mbox

Patch

diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
new file mode 100644
index 0000000..9455707
--- /dev/null
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -0,0 +1,5 @@ 
+CONFIG_ARM=y
+CONFIG_TARGET_AM43XX_EVM=y
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,USBHOST_BOOT"
+CONFIG_CMD_NET=y
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index e5b10ad..3bd9abd 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -42,7 +42,16 @@ 
 #define CONFIG_POWER_TPS62362
 
 /* SPL defines. */
+#ifdef CONFIG_USBHOST_BOOT
+/*
+ * 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))