diff mbox

[U-Boot,1/2] configs: am43xx_evm: Merge in usbhost defconfig

Message ID 20170310220246.17593-1-afd@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Andrew Davis March 10, 2017, 10:02 p.m. UTC
I was once again going to try to sync the mode specific defconfigs
with the main AM43xx defconfig when I decided it may make more
sense to merge in USB host boot support in to the main defconfig.

The reason we had separate defconfigs before was that SPL needs
to be placed in OCMC SRAM by the ROM when booting from USB as
it uses DMA and ARM internal SRAM space is not externally
accessible. All this means is we need to have our SPL load address
be greater than 0x4030_0000 when USB booting. For other cases
we use 0x402F_0000, this gives us an extra 64kB of space in addition
to the 256kB of OCMC RAM, as our SPL is not even half this size
currently this is not strictly needed.

Make all boot modes load to 0x4030_0000+, add SPL USB host
boot support to the main am43xx defconfig, and then remove
am43xx_evm_usbhost_boot_defconfig. Allowing us one image
that supports all AM43xx boot modes (-QSPI).

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 configs/am43xx_evm_defconfig              |  3 ++
 configs/am43xx_evm_usbhost_boot_defconfig | 74 -------------------------------
 2 files changed, 3 insertions(+), 74 deletions(-)
 delete mode 100644 configs/am43xx_evm_usbhost_boot_defconfig

Comments

Lokesh Vutla March 13, 2017, 3:16 a.m. UTC | #1
On Saturday 11 March 2017 03:32 AM, Andrew F. Davis wrote:
> I was once again going to try to sync the mode specific defconfigs
> with the main AM43xx defconfig when I decided it may make more
> sense to merge in USB host boot support in to the main defconfig.
> 
> The reason we had separate defconfigs before was that SPL needs
> to be placed in OCMC SRAM by the ROM when booting from USB as
> it uses DMA and ARM internal SRAM space is not externally
> accessible. All this means is we need to have our SPL load address
> be greater than 0x4030_0000 when USB booting. For other cases
> we use 0x402F_0000, this gives us an extra 64kB of space in addition
> to the 256kB of OCMC RAM, as our SPL is not even half this size
> currently this is not strictly needed.
> 
> Make all boot modes load to 0x4030_0000+, add SPL USB host
> boot support to the main am43xx defconfig, and then remove

This breaks all the supported peripheral boot modes. Have you tested
UART/ethernet boot with this patch?

I specifically wanted a separate defconfig for usb_host as it is a
special case and rest of the boot modes can be supported using a single
defconfig. If you don't like this approach, please create separate
defconfigs for peripheral and memory boot modes.

Thanks and regards,
Lokesh
Andrew Davis March 13, 2017, 2:07 p.m. UTC | #2
On 03/12/2017 10:16 PM, Lokesh Vutla wrote:
> 
> 
> On Saturday 11 March 2017 03:32 AM, Andrew F. Davis wrote:
>> I was once again going to try to sync the mode specific defconfigs
>> with the main AM43xx defconfig when I decided it may make more
>> sense to merge in USB host boot support in to the main defconfig.
>>
>> The reason we had separate defconfigs before was that SPL needs
>> to be placed in OCMC SRAM by the ROM when booting from USB as
>> it uses DMA and ARM internal SRAM space is not externally
>> accessible. All this means is we need to have our SPL load address
>> be greater than 0x4030_0000 when USB booting. For other cases
>> we use 0x402F_0000, this gives us an extra 64kB of space in addition
>> to the 256kB of OCMC RAM, as our SPL is not even half this size
>> currently this is not strictly needed.
>>
>> Make all boot modes load to 0x4030_0000+, add SPL USB host
>> boot support to the main am43xx defconfig, and then remove
> 
> This breaks all the supported peripheral boot modes. Have you tested
> UART/ethernet boot with this patch?
> 

Ahh, I tested memory modes only.

I must have misunderstood the datasheet. It claims when using peripheral
boot modes on a GP device the image header (containing the desired
relocation address) is "not required", but if this patch breaks
peripheral boot then it really means it is ignored, even if it is
included in the image.

> I specifically wanted a separate defconfig for usb_host as it is a
> special case and rest of the boot modes can be supported using a single
> defconfig. If you don't like this approach, please create separate
> defconfigs for peripheral and memory boot modes.
> 

I don't have any strong preference for how the non-HS devices are
handled, so if you don't like this approach then this patch can be
safely ignored. (2/2 is still valid)

Thanks,
Andrew

> Thanks and regards,
> Lokesh
>
diff mbox

Patch

diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 6fb2053f33..849efbd011 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -1,6 +1,7 @@ 
 CONFIG_ARM=y
 CONFIG_AM43XX=y
 CONFIG_TARGET_AM43XX_EVM=y
+CONFIG_ISW_ENTRY_ADDR=0x40300350
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am437x-gp-evm"
@@ -13,6 +14,8 @@  CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
+CONFIG_SPL_USB_HOST_SUPPORT=y
+CONFIG_SPL_USB_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
deleted file mode 100644
index 5775ab16dd..0000000000
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ /dev/null
@@ -1,74 +0,0 @@ 
-CONFIG_ARM=y
-CONFIG_AM43XX=y
-CONFIG_TARGET_AM43XX_EVM=y
-CONFIG_ISW_ENTRY_ADDR=0x40300350
-CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_SPL_YMODEM_SUPPORT=y
-CONFIG_DEFAULT_DEVICE_TREE="am437x-gp-evm"
-CONFIG_FIT=y
-CONFIG_SPL_LOAD_FIT=y
-CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
-CONFIG_SYS_CONSOLE_INFO_QUIET=y
-CONFIG_VERSION_VARIABLE=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_MTD_SUPPORT=y
-CONFIG_SPL_OS_BOOT=y
-CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_SUPPORT=y
-CONFIG_HUSH_PARSER=y
-CONFIG_CMD_BOOTZ=y
-# CONFIG_CMD_IMLS is not set
-CONFIG_CMD_ASKENV=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPT=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_DFU=y
-CONFIG_CMD_GPIO=y
-# CONFIG_CMD_SETEXPR is not set
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_EXT2=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_ISO_PARTITION=y
-CONFIG_OF_CONTROL=y
-CONFIG_OF_LIST="am437x-gp-evm am437x-sk-evm am43x-epos-evm am437x-idk-evm"
-CONFIG_DM=y
-# CONFIG_BLK is not set
-CONFIG_DFU_MMC=y
-CONFIG_DFU_RAM=y
-CONFIG_DFU_SF=y
-CONFIG_DM_GPIO=y
-CONFIG_DM_MMC=y
-# CONFIG_DM_MMC_OPS is not set
-CONFIG_MMC_OMAP_HS=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_MACRONIX=y
-CONFIG_DM_SERIAL=y
-CONFIG_SYS_NS16550=y
-CONFIG_TI_QSPI=y
-CONFIG_TIMER=y
-CONFIG_OMAP_TIMER=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_DWC3=y
-CONFIG_USB_DWC3=y
-CONFIG_USB_DWC3_GADGET=y
-CONFIG_USB_DWC3_OMAP=y
-CONFIG_USB_DWC3_PHY_OMAP=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
-CONFIG_G_DNL_VENDOR_NUM=0x0403
-CONFIG_G_DNL_PRODUCT_NUM=0xbd00
-CONFIG_SPL_OF_LIBFDT=y