[U-Boot] [PATCH 1/5] am335x_evm: Move SPL network defines

On am335x_evm we only support USBETH for a networking SPL option so move the rest of the defines under that area as that's the only time we need (and want) environment support here.
Signed-off-by: Tom Rini trini@ti.com --- include/configs/am335x_evm.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index a48b386..b681e81 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -223,11 +223,6 @@ /* USB gadget RNDIS */ #define CONFIG_SPL_MUSB_NEW_SUPPORT
-/* General network SPL, both CPSW and USB gadget RNDIS */ -#define CONFIG_SPL_NET_SUPPORT -#define CONFIG_SPL_ENV_SUPPORT -#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" - #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
#ifdef CONFIG_NAND @@ -309,10 +304,10 @@ /* disable EFI partitions and partition UUID support */ #undef CONFIG_PARTITION_UUIDS #undef CONFIG_EFI_PARTITION -/* - * Disable CPSW SPL support so we fit within the 101KiB limit. - */ -#undef CONFIG_SPL_ETH_SUPPORT +/* General network SPL */ +#define CONFIG_SPL_NET_SUPPORT +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" #endif
/* USB Device Firmware Update support */

There are times where we may need more than a few kilobytes of stack space. We also will not be using CONFIG_SPL_STACK location prior to DDR being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick a good location within DDR for this to be. Tested on OMAP4/AM335x/OMAP5/DRA7xx.
Signed-off-by: Tom Rini trini@ti.com
--- Changes in v3: - Change CONFIG_SPL_STACK to CONFIG_SYS_SDRAM_BASE + 32MB, reword comment --- include/configs/ti_armv7_common.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 6e0bf09..9f4ba5e 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -203,15 +203,18 @@ #define CONFIG_SPL_OS_BOOT
/* - * Place the image at the start of the ROM defined image space. - * We limit our size to the ROM-defined downloaded image area, and use the - * rest of the space for stack. We load U-Boot itself into memory at - * 0x80800000 for legacy reasons (to not conflict with older SPLs). We - * have our BSS be placed 1MiB after this, to allow for the default - * Linux kernel address of 0x80008000 to work, in the Falcon Mode case. - * We have the SPL malloc pool at the end of the BSS area. + * Place the image at the start of the ROM defined image space (per + * CONFIG_SPL_TEXT_BASE and we limit our size to the ROM-defined + * downloaded image area. We initalize DRAM as soon as we can so that + * we can place stack, malloc and BSS there. We load U-Boot itself into + * memory at 0x80800000 for legacy reasons (to not conflict with older + * SPLs). We have our BSS be placed 2MiB after this, to allow for the + * default Linux kernel address of 0x80008000 to work with most sized + * kernels, in the Falcon Mode case. We have the SPL malloc pool at the + * end of the BSS area. We place our stack at 32MiB after the start of + * DRAM to allow room for all of the above. */ -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +#define CONFIG_SPL_STACK (CONFIG_SYS_SDRAM_BASE + (32 << 20)) #ifndef CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_TEXT_BASE 0x80800000 #endif

On Fri, Jul 18, 2014 at 11:51:32AM -0400, Tom Rini wrote:
There are times where we may need more than a few kilobytes of stack space. We also will not be using CONFIG_SPL_STACK location prior to DDR being initialized (CONFIG_SYS_INIT_SP_ADDR is still used there) so pick a good location within DDR for this to be. Tested on OMAP4/AM335x/OMAP5/DRA7xx.
Signed-off-by: Tom Rini trini@ti.com
Applied to u-boot-ti/master, thanks!

In the case of SPL on these boards we only need environment for SPL_USBETH, so it's safe to normally use ENV_IS_NOWHERE and SPL+NAND does not support environment today.
Cc: Hannes Petermaier oe5hpm@oevsv.at Signed-off-by: Tom Rini trini@ti.com --- include/configs/tseries.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/configs/tseries.h b/include/configs/tseries.h index 1fd6e32..1dd13fd 100644 --- a/include/configs/tseries.h +++ b/include/configs/tseries.h @@ -243,8 +243,12 @@ #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
#elif defined(CONFIG_NAND) -#undef CONFIG_ENV_IS_NOWHERE +/* No NAND env support in SPL */ +#ifdef CONFIG_SPL_BUILD +#define CONFIG_ENV_IS_NOWHERE +#else #define CONFIG_ENV_IS_IN_NAND +#endif #define CONFIG_ENV_OFFSET 0x120000 /* TODO: Adresse definieren */ #define CONFIG_SYS_ENV_SECT_SIZE CONFIG_ENV_SIZE #else

On Fri, Jul 18, 2014 at 11:51:33AM -0400, Tom Rini wrote:
In the case of SPL on these boards we only need environment for SPL_USBETH, so it's safe to normally use ENV_IS_NOWHERE and SPL+NAND does not support environment today.
Cc: Hannes Petermaier oe5hpm@oevsv.at Signed-off-by: Tom Rini trini@ti.com
Applied to u-boot-ti/master, thanks!

CONFIG_SPL_NET_SUPPORT is not the only time we want SPL to ahve environment, CONFIG_SPL_ENV_SUPPORT is when we want it.
Signed-off-by: Tom Rini trini@ti.com --- common/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/common/Makefile b/common/Makefile index de5cce8..aca0f7f 100644 --- a/common/Makefile +++ b/common/Makefile @@ -219,10 +219,6 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o -# environment -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o ifdef CONFIG_SPL_USB_HOST_SUPPORT obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o obj-$(CONFIG_USB_STORAGE) += usb_storage.o @@ -230,14 +226,16 @@ endif ifdef CONFIG_SPL_SATA_SUPPORT obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o endif -ifneq ($(CONFIG_SPL_NET_SUPPORT),y) +# environment +ifdef CONFIG_SPL_ENV_SUPPORT +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o -else -obj-y += env_nowhere.o endif endif # core command

On Fri, Jul 18, 2014 at 11:51:34AM -0400, Tom Rini wrote:
CONFIG_SPL_NET_SUPPORT is not the only time we want SPL to ahve environment, CONFIG_SPL_ENV_SUPPORT is when we want it.
Signed-off-by: Tom Rini trini@ti.com
Applied to u-boot-ti/master, thanks!

When we're using EMMC_BOOT that means we have environment on eMMC so we can make use of CONFIG_SPL_ENV_SUPPORT within Falcon Mode.
Signed-off-by: Tom Rini trini@ti.com --- include/configs/am335x_evm.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index b681e81..ea93eb1 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -389,6 +389,7 @@ #elif defined(CONFIG_EMMC_BOOT) #undef CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SPL_ENV_SUPPORT #define CONFIG_SYS_MMC_ENV_DEV 1 #define CONFIG_SYS_MMC_ENV_PART 2 #define CONFIG_ENV_OFFSET 0x0

On Fri, Jul 18, 2014 at 11:51:35AM -0400, Tom Rini wrote:
When we're using EMMC_BOOT that means we have environment on eMMC so we can make use of CONFIG_SPL_ENV_SUPPORT within Falcon Mode.
Signed-off-by: Tom Rini trini@ti.com
Applied to u-boot-ti/master, thanks!

On Fri, Jul 18, 2014 at 11:51:31AM -0400, Tom Rini wrote:
On am335x_evm we only support USBETH for a networking SPL option so move the rest of the defines under that area as that's the only time we need (and want) environment support here.
Signed-off-by: Tom Rini trini@ti.com
Applied to u-boot-ti/master, thanks!
participants (1)
-
Tom Rini