TI:omap5: Move CONFIG_ENV_SIZE to board config files
Subsystems (3)
PATCH v2 1/5 TI:omap5: Move CONFIG_ENV_SIZE to board config files
The size of the environment depends on the backing store, move this to the board config files.
--- include/configs/dra7xx_evm.h | 1 + include/configs/omap5_uevm.h | 1 + include/configs/ti_omap5_common.h | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-)
include/configs/dra7xx_evm.h +1 -0
@@ -17,6 +17,7 @@/* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1/* SLOT2: eMMC(1) */ +#define CONFIG_ENV_SIZE (128 << 10)#define CONFIG_ENV_OFFSET 0xE0000#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
include/configs/omap5_uevm.h +1 -0
@@ -26,6 +26,7 @@/* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1/* SLOT2: eMMC(1) */ +#define CONFIG_ENV_SIZE (128 << 10)#define CONFIG_ENV_OFFSET 0xE0000#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
include/configs/ti_omap5_common.h +0 -2
@@ -46,8 +46,6 @@#include <asm/arch/cpu.h> #include <asm/arch/omap.h> -#define CONFIG_ENV_SIZE (128 << 10) -#include <configs/ti_armv7_common.h> /*
Signature · 1 line
1.7.9.5
PATCH v2 1/5 TI:omap5: Move CONFIG_ENV_SIZE to board config files
Quoted 4 lines · Tom Rini
The size of the environment depends on the backing store, move this to the board config files.
Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/0561aee4/attachment.pgp>
PATCH v2 2/5 TI:armv7: Change Falcon Mode DT load address
In reply to Tom RiniIn general, we want to load the DT at base+128MB, so that we ahve sufficient room for the kernel and a larger device tree. In the case of OMAP3, use 64MB instead as we have a number of boards with 128MB DDR.
--- include/configs/ti_am335x_common.h | 2 ++ include/configs/ti_armv7_common.h | 2 -- include/configs/ti_omap3_common.h | 3 +++ include/configs/ti_omap4_common.h | 2 ++ include/configs/ti_omap5_common.h | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-)
include/configs/ti_am335x_common.h +2 -0
@@ -61,6 +61,8 @@*/ #define CONFIG_SPL_TEXT_BASE 0x402F0400#define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) +#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ + (128 << 20))/* Enable the watchdog inside of SPL */ #define CONFIG_SPL_WATCHDOG_SUPPORT
include/configs/ti_armv7_common.h +0 -2
@@ -206,8 +206,6 @@#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img"#ifdef CONFIG_SPL_OS_BOOT -#define CONFIG_SYS_SPL_ARGS_ADDR 0x80F80000 -/* FAT */ #define CONFIG_SPL_FAT_LOAD_KERNEL_NAME "uImage"#define CONFIG_SPL_FAT_LOAD_ARGS_NAME "args"
include/configs/ti_omap3_common.h +3 -0
@@ -61,6 +61,9 @@#define CONFIG_SPL_MAX_SIZE (54 * 1024)#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"#define CONFIG_SPL_POWER_SUPPORT +#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ + (64 << 20)) +#ifdef CONFIG_NAND #define CONFIG_SPL_NAND_SUPPORT
include/configs/ti_omap4_common.h +2 -0
@@ -158,6 +158,8 @@#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE)#define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" +#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ + (128 << 20))#ifdef CONFIG_NAND #define CONFIG_SPL_NAND_AM33XX_BCH /* ELM support */
include/configs/ti_omap5_common.h +2 -0
@@ -143,6 +143,8 @@#define CONFIG_SPL_MAX_SIZE (0x4031E000 - CONFIG_SPL_TEXT_BASE)#define CONFIG_SPL_DISPLAY_PRINT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" +#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ + (128 << 20))#ifdef CONFIG_NAND #define CONFIG_SPL_NAND_AM33XX_BCH /* ELM support */
Signature · 1 line
1.7.9.5
PATCH v2 2/5 TI:armv7: Change Falcon Mode DT load address
Quoted 5 lines · Tom Rini
In general, we want to load the DT at base+128MB, so that we ahve sufficient room for the kernel and a larger device tree. In the case of OMAP3, use 64MB instead as we have a number of boards with 128MB DDR.
Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/c80c628e/attachment.pgp>
PATCH v2 3/5 spi: ti_qspi: Add delay for successful bulk erase.
In reply to Tom RiniFrom: "Poddar, Sourav" <[email protected]>
Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met.
--- drivers/spi/ti_qspi.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/spi/ti_qspi.c +3 -0
@@ -314,6 +314,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |=QSPI_RD_SNGL ;debug ("rx cmd %08x dc %08x\n" , qslave->cmd, qslave->dc); +#ifdef CONFIG_DRA7XX +udelay (500 ); +#endif writel (qslave->cmd, &qslave->base->cmd); status =readl (&qslave->base->status); timeout =QSPI_TIMEOUT ;
Signature · 1 line
1.7.9.5
PATCH v2 3/5 spi: ti_qspi: Add delay for successful bulk erase.
Quoted 16 lines · Tom Rini
From: "Poddar, Sourav" <[email protected]>
Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met.
Signed-off-by Sourav Poddar <[email protected]>Tested-by Yebio Mesfin <[email protected]>--- drivers/spi/ti_qspi.c | 3 +++ 1 file changed, 3 insertions(+)drivers/spi/ti_qspi.c +0
-0
drivers/spi/ti_qspi.c int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, · line 322
Quoted 9 lines
drivers/spi/ti_qspi.c +3
-0@@ -314,6 +314,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |=QSPI_RD_SNGL ;debug ("rx cmd %08x dc %08x\n" , qslave->cmd, qslave->dc); +#ifdef CONFIG_DRA7XX +udelay (500 ); +#endif writel (qslave->cmd, &qslave->base->cmd); status =readl (&qslave->base->status); timeout =QSPI_TIMEOUT ;
Can't we fix this? discussed the same in previous version thread as well.
thanks!
Signature · 1 line
Jagan.
PATCH v2 3/5 spi: ti_qspi: Add delay for successful bulk erase.
Quoted 12 lines · Jagan Teki
Quoted 11 lines · Tom Rini
From: "Poddar, Sourav" <[email protected]>
Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met.
Signed-off-by Sourav Poddar <[email protected]>Tested-by Yebio Mesfin <[email protected]>--- drivers/spi/ti_qspi.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 16 lines
Quoted 5 lines
drivers/spi/ti_qspi.c +0
-0drivers/spi/ti_qspi.c int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, · line 322
Quoted 9 lines
drivers/spi/ti_qspi.c +3
-0@@ -314,6 +314,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |=QSPI_RD_SNGL ;debug ("rx cmd %08x dc %08x\n" , qslave->cmd, qslave->dc); +#ifdef CONFIG_DRA7XX +udelay (500 ); +#endif writel (qslave->cmd, &qslave->base->cmd); status =readl (&qslave->base->status); timeout =QSPI_TIMEOUT ;Can't we fix this? discussed the same in previous version thread as well.
Sorry, I kicked out v2 before checking my mbox again. Sourav, do you have some time to look at this again?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140407/7f8ecf13/attachment.pgp>
PATCH v2 3/5 spi: ti_qspi: Add delay for successful bulk erase.
Quoted 28 lines · Tom Rini
Quoted 12 lines · Jagan Teki
Quoted 11 lines · Tom Rini
From: "Poddar, Sourav"<[email protected]>
Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met.
Signed-off-by Sourav Poddar<[email protected]>Tested-by Yebio Mesfin<[email protected]>--- drivers/spi/ti_qspi.c | 3 +++ 1 file changed, 3 insertions(+)Quoted 15 lines
Quoted 5 lines
drivers/spi/ti_qspi.c +0
-0drivers/spi/ti_qspi.c int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, · line 322
Quoted 9 lines
drivers/spi/ti_qspi.c +3
-0@@ -314,6 +314,9 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout, qslave->cmd |=QSPI_RD_SNGL ;debug ("rx cmd %08x dc %08x\n" , qslave->cmd, qslave->dc); +#ifdef CONFIG_DRA7XX +udelay (500 ); +#endif writel (qslave->cmd,&qslave->base->cmd); status =readl (&qslave->base->status); timeout =QSPI_TIMEOUT ;Can't we fix this? discussed the same in previous version thread as well.
Quoted 3 lines
Sorry, I kicked out v2 before checking my mbox again. Sourav, do you have some time to look at this again?
I can look at this sometime this week, but I am not sure if there is anything which
can be done. I had tried few stuffs to get rid of this in the past, but those attempts failed.
Still, I will check if there is anything more that can be done to get rid of this.
PATCH v2 3/5 spi: ti_qspi: Add delay for successful bulk erase.
In reply to Tom RiniQuoted 7 lines · Tom Rini
From: "Poddar, Sourav" <[email protected]>
Bulk erase is not happening properly on dra7 due to erase timing constraints, add a delay so that erase timing constraints are properly met.
Signed-off-by Sourav Poddar <[email protected]>Tested-by Yebio Mesfin <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/09b6eeea/attachment.pgp>
PATCH v2 4/5 SPL:SPI: Add Falcon Mode support
In reply to Tom Rini--- drivers/mtd/spi/spi_spl_load.c | 46 ++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-)
drivers/mtd/spi/spi_spl_load.c +40 -6
@@ -13,6 +13,35 @@#include <spi_flash.h> #include <spl.h> +#ifdef CONFIG_SPL_OS_BOOT +/* +* Load the kernel, check for a valid header we can parse, and if found load +* the kernel and then device tree. +*/ +static int spi_load_image_os (struct spi_flash *flash, +struct image_header *header) +{ +/* Read for a header, parse or error out. */ +spi_flash_read (flash,CONFIG_SYS_SPI_KERNEL_OFFS ,0x40 , + (void *)header); + +if (image_get_magic (header) !=IH_MAGIC ) +return -1 ; + +spl_parse_image_header (header); + +spi_flash_read (flash,CONFIG_SYS_SPI_KERNEL_OFFS , + spl_image.size, (void *)spl_image.load_addr); + +/* Read device tree. */ +spi_flash_read (flash,CONFIG_SYS_SPI_ARGS_OFFS , +CONFIG_SYS_SPI_ARGS_SIZE , + (void *)CONFIG_SYS_SPL_ARGS_ADDR ); + +return 0 ; +} +#endif +/* * The main entry for SPI booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image
@@ -37,10 +66,15 @@ void spl_spi_load_image(void)/* use CONFIG_SYS_TEXT_BASE as temporary storage area */ header = (struct image_header *)(CONFIG_SYS_TEXT_BASE ); -/* Load u-boot, mkimage header is 64 bytes. */ -spi_flash_read (flash,CONFIG_SYS_SPI_U_BOOT_OFFS ,0x40 , - (void *)header); -spl_parse_image_header (header); -spi_flash_read (flash,CONFIG_SYS_SPI_U_BOOT_OFFS , - spl_image.size, (void *)spl_image.load_addr); +#ifdef CONFIG_SPL_OS_BOOT + if (spl_start_uboot() || spi_load_image_os(flash, header)) +#endif + { +/* Load u-boot, mkimage header is 64 bytes. */ +spi_flash_read (flash,CONFIG_SYS_SPI_U_BOOT_OFFS ,0x40 , + (void *)header); +spl_parse_image_header (header); +spi_flash_read (flash,CONFIG_SYS_SPI_U_BOOT_OFFS , + spl_image.size, (void *)spl_image.load_addr); + } }
Signature · 1 line
1.7.9.5
PATCH v2 4/5 SPL:SPI: Add Falcon Mode support
Quoted 1 line · Tom Rini
Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/e5618bb1/attachment.pgp>
PATCH v2 5/5 dra7xx_evm: Add QSPI_4 support, qspiboot build target
In reply to Tom RiniWe previously only supported QSPI_1 (single) support. Add QSPI_4 (quad) read support as well. This means we can be given one of two boot device values, but don't care which it is, so perform a fixup on the QSPI_4 value. We add a qspiboot build target to better show how you would use QSPI as a boot device in deployment. When we boot from QSPI, we can check the environment for 'boot_os' to control Falcon Mode.
--- arch/arm/cpu/armv7/omap-common/boot-common.c | 11 ++++++++ board/ti/dra7xx/evm.c | 19 +++++++++++++ boards.cfg | 1 + include/configs/dra7xx_evm.h | 37 +++++++++++++++++++++++++- 4 files changed, 67 insertions(+), 1 deletion(-)
arch/arm/cpu/armv7/omap-common/boot-common.c +11 -0
@@ -56,6 +56,17 @@ void save_omap_boot_params(void) *((u32 *)(dev_data +BOOT_MODE_OFFSET )); } } + +#ifdef CONFIG_DRA7XX +/* +* We get different values for QSPI_1 and QSPI_4 being used, but +* don't actually care about this difference. Rather than +* mangle the later code, if we're coming in as QSPI_4 just +* change to the QSPI_1 value. +*/ +if (gd->arch.omap_boot_params.omap_bootdevice ==11 ) + gd->arch.omap_boot_params.omap_bootdevice =BOOT_DEVICE_SPI ; +#endif }#ifdef CONFIG_SPL_BUILD
board/ti/dra7xx/evm.c +19 -0
@@ -16,6 +16,7 @@#include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> #include <asm/arch/sata.h> +#include <environment.h> #include "mux_data.h"
@@ -124,6 +125,24 @@ int board_mmc_init(bd_t *bis) }#endif +#if defined(CONFIG_SPL_BUILD ) && defined(CONFIG_SPL_OS_BOOT ) +int spl_start_uboot (void ) +{ +/* break into full u-boot on 'c' */ +if (serial_tstc () &&serial_getc () =='c' ) +return 1 ; + +#ifdef CONFIG_SPL_ENV_SUPPORT +env_init (); +env_relocate_spec (); +if (getenv_yesno ("boot_os" ) !=1 ) +return 1 ; +#endif + +return 0 ; +} +#endif +#ifdef CONFIG_DRIVER_TI_CPSW /* Delay value to add to calibrated value */
boards.cfg +1 -0
@@ -356,6 +356,7 @@ Active arm armv7 omap4 ti panda Active arm armv7 omap4 ti sdp4430 omap4_sdp4430 - Sricharan R <[email protected]> Active arm armv7 omap5 ti dra7xx dra7xx_evm dra7xx_evm:CONS_INDEX=1 Lokesh Vutla <[email protected]> Active arm armv7 omap5 ti dra7xx dra7xx_evm_uart3 dra7xx_evm:CONS_INDEX=3,SPL_YMODEM_SUPPORT Lokesh Vutla <[email protected]> +Active arm armv7 omap5 ti dra7xx dra7xx_evm_qspiboot dra7xx_evm:CONS_INDEX=1,QSPI_BOOT Lokesh Vutla <[email protected]> Active arm armv7 omap5 ti omap5_uevm omap5_uevm - - Active arm armv7 rmobile atmark-techno armadillo-800eva armadillo-800eva - Nobuhiro Iwamatsu <[email protected]> Active arm armv7 rmobile kmc kzm9g kzm9g - Nobuhiro Iwamatsu <[email protected]>:Tetsuyuki Kobayashi <[email protected]>
include/configs/dra7xx_evm.h +36 -1
@@ -14,6 +14,7 @@#define CONFIG_DRA7XX +#ifndef CONFIG_QSPI_BOOT /* MMC ENV related defines */ #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 1/* SLOT2: eMMC(1) */
@@ -21,6 +22,7 @@#define CONFIG_ENV_OFFSET 0xE0000#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#endif #define CONFIG_CMD_SAVEENV #if (CONFIG_CONS_INDEX ==1 )
@@ -76,13 +78,46 @@#define CONFIG_SF_DEFAULT_SPEED 48000000#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 +/* +* Default to using SPI for environment, etc. +* 0x000000 - 0x010000 : QSPI.SPL (64KiB) +* 0x010000 - 0x020000 : QSPI.SPL.backup1 (64KiB) +* 0x020000 - 0x030000 : QSPI.SPL.backup2 (64KiB) +* 0x030000 - 0x040000 : QSPI.SPL.backup3 (64KiB) +* 0x040000 - 0x140000 : QSPI.u-boot (1MiB) +* 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB) +* 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB) +* 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB) +* 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB) +* 0x9E0000 - 0x2000000 : USERLAND +*/ +#define CONFIG_SYS_SPI_KERNEL_OFFS 0x1E0000 +#define CONFIG_SYS_SPI_ARGS_OFFS 0x140000 +#define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 +#if defined(CONFIG_QSPI_BOOT ) +/* In SPL, use the environment and discard MMC support for space. */ +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_SPL_MMC_SUPPORT +#undef CONFIG_SPL_MAX_SIZE +#define CONFIG_SPL_MAX_SIZE (64 << 10)/* 64 KiB */ +#endif +#define CONFIG_SPL_ENV_SUPPORT +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#define CONFIG_ENV_SIZE (64 << 10) +#define CONFIG_ENV_SECT_SIZE (64 << 10)/* 64 KB sectors */ +#define CONFIG_ENV_OFFSET 0x1C0000 +#define CONFIG_ENV_OFFSET_REDUND 0x1D0000 +#endif +/* SPI SPL */ #define CONFIG_SPL_SPI_SUPPORT #define CONFIG_SPL_SPI_LOAD #define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_BUS 0#define CONFIG_SPL_SPI_CS 0 -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000#define CONFIG_SUPPORT_EMMC_BOOT
Signature · 1 line
1.7.9.5
PATCH v2 5/5 dra7xx_evm: Add QSPI_4 support, qspiboot build target
Quoted 9 lines · Tom Rini
We previously only supported
QSPI_1(single) support. AddQSPI_4(quad) read support as well. This means we can be given one of two boot device values, but don't care which it is, so perform a fixup on theQSPI_4value. We add a qspiboot build target to better show how you would use QSPI as a boot device in deployment. When we boot from QSPI, we can check the environment for 'boot_os' to control Falcon Mode.Signed-off-by Sourav Poddar <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140418/9dd448de/attachment.pgp>