diff mbox series

configs: ls1046a: Define ENV_ADDR value

Message ID 1581413944-7958-1-git-send-email-kuldeep.singh@nxp.com
State Superseded
Headers show
Series configs: ls1046a: Define ENV_ADDR value | expand

Commit Message

Kuldeep Singh Feb. 11, 2020, 9:39 a.m. UTC
CONFIG_ENV_ADDR helps in picking environment from flash before DDR init.
Define value 0x40300000 in QSPI defconfig for LS1046ARDB as value is
already defined in TFA.

Correct ENV_ADDR and ENV_SECT_SIZE value for LS1046AQDS as per defconfig.

Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
---
 configs/ls1046aqds_qspi_defconfig | 3 ++-
 configs/ls1046aqds_tfa_defconfig  | 4 ++--
 configs/ls1046ardb_qspi_defconfig | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

Comments

Priyanka Jain (OSS) May 12, 2020, 5:42 a.m. UTC | #1
>-----Original Message-----
>From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Kuldeep Singh
>Sent: Tuesday, February 11, 2020 3:09 PM
>To: u-boot at lists.denx.de
>Subject: [PATCH] configs: ls1046a: Define ENV_ADDR value
>
>CONFIG_ENV_ADDR helps in picking environment from flash before DDR init.
>Define value 0x40300000 in QSPI defconfig for LS1046ARDB as value is already
>defined in TFA.
Do you mean the value same as already defined?
If yes, can you please reword the description

Also why we need to defined in both TFA and u-boot ? Are both trying to read env?
>
>Correct ENV_ADDR and ENV_SECT_SIZE value for LS1046AQDS as per
>defconfig.
Do you mean in defconfigs? If yes, please reword?
>
>Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
>---
> configs/ls1046aqds_qspi_defconfig | 3 ++-  configs/ls1046aqds_tfa_defconfig
>| 4 ++--  configs/ls1046ardb_qspi_defconfig | 1 +
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
>diff --git a/configs/ls1046aqds_qspi_defconfig
>b/configs/ls1046aqds_qspi_defconfig
>index 22904a0..1f28ad5 100644
>--- a/configs/ls1046aqds_qspi_defconfig
>+++ b/configs/ls1046aqds_qspi_defconfig
>@@ -2,7 +2,7 @@ CONFIG_ARM=y
> CONFIG_TARGET_LS1046AQDS=y
> CONFIG_SYS_TEXT_BASE=0x40100000
> CONFIG_ENV_SIZE=0x2000
>-CONFIG_ENV_SECT_SIZE=0x10000
>+CONFIG_ENV_SECT_SIZE=0x40000
> CONFIG_ENV_OFFSET=0x300000
> CONFIG_FSL_LS_PPA=y
> CONFIG_NR_DRAM_BANKS=2
>@@ -31,6 +31,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=1550000.spi-
>0:2m(uboot),14m(free)"
> CONFIG_OF_CONTROL=y
> CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
> CONFIG_ENV_IS_IN_SPI_FLASH=y
>+CONFIG_ENV_ADDR=0x40300000
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> CONFIG_DM=y
> CONFIG_SATA_CEVA=y
>diff --git a/configs/ls1046aqds_tfa_defconfig
>b/configs/ls1046aqds_tfa_defconfig
>index df85533..18e3993 100644
>--- a/configs/ls1046aqds_tfa_defconfig
>+++ b/configs/ls1046aqds_tfa_defconfig
>@@ -3,7 +3,7 @@ CONFIG_TARGET_LS1046AQDS=y  CONFIG_TFABOOT=y
> CONFIG_SYS_TEXT_BASE=0x82000000
> CONFIG_ENV_SIZE=0x2000
>-CONFIG_ENV_SECT_SIZE=0x20000
>+CONFIG_ENV_SECT_SIZE=0x40000
> CONFIG_ENV_OFFSET=0x500000
> CONFIG_NR_DRAM_BANKS=2
> CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
>@@ -39,7 +39,7 @@ CONFIG_ENV_IS_IN_NAND=y
>CONFIG_ENV_IS_IN_SPI_FLASH=y  CONFIG_USE_ENV_SPI_BUS=y
> CONFIG_ENV_SPI_BUS=0
>-CONFIG_ENV_ADDR=0x60500000
>+CONFIG_ENV_ADDR=0x40500000
> CONFIG_DM=y
> CONFIG_SATA_CEVA=y
> CONFIG_FSL_CAAM=y
>diff --git a/configs/ls1046ardb_qspi_defconfig
>b/configs/ls1046ardb_qspi_defconfig
>index d5e0f02..d836421 100644
>--- a/configs/ls1046ardb_qspi_defconfig
>+++ b/configs/ls1046ardb_qspi_defconfig
>@@ -28,6 +28,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=1550000.spi-
>0:1m(rcw),15m(u-boot),48m(kernel.i
> CONFIG_OF_CONTROL=y
> CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
> CONFIG_ENV_IS_IN_SPI_FLASH=y
>+CONFIG_ENV_ADDR=0x40300000
> CONFIG_SYS_RELOC_GD_ENV_ADDR=y
> CONFIG_DM=y
> CONFIG_SATA_CEVA=y
>--
>2.7.4

Regards
Priyanka
Kuldeep Singh May 12, 2020, 6:29 a.m. UTC | #2
> -----Original Message-----
> From: Priyanka Jain (OSS) <priyanka.jain at oss.nxp.com>
> Sent: Tuesday, May 12, 2020 11:12 AM
> To: Kuldeep Singh <kuldeep.singh at nxp.com>; u-boot at lists.denx.de
> Subject: RE: [PATCH] configs: ls1046a: Define ENV_ADDR value
> 
> >-----Original Message-----
> >From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Kuldeep Singh
> >Sent: Tuesday, February 11, 2020 3:09 PM
> >To: u-boot at lists.denx.de
> >Subject: [PATCH] configs: ls1046a: Define ENV_ADDR value
> >
> >CONFIG_ENV_ADDR helps in picking environment from flash before DDR
> init.
> >Define value 0x40300000 in QSPI defconfig for LS1046ARDB as value is
> >already defined in TFA.
> Do you mean the value same as already defined?

The macro is already defined in TFA defconfig, also define in qspi defconfig.

> If yes, can you please reword the description

ENV_ADDR value is QSPI_BASE + ENV_OFFSET.
In case of TFA boot(*_tfa_defconfig), ENV_ADDR is 0x40500000 i.e 0x40000000 + 0x500000
And in qspi (*qspi_defconfig), ENV_ADDR is 0x40300000 i.e 0x40000000 + 0x300000.
This helps in picking env from flash before DDR.

> 
> Also why we need to defined in both TFA and u-boot ? Are both trying to
> read env?

Please see above for more clarification.

> >
> >Correct ENV_ADDR and ENV_SECT_SIZE value for LS1046AQDS as per
> >defconfig.
> Do you mean in defconfigs? If yes, please reword?

I have already mentioned that changes are done in defconfigs. Could you please mention what more info needs to be added/changed?

-Kuldeep
diff mbox series

Patch

diff --git a/configs/ls1046aqds_qspi_defconfig b/configs/ls1046aqds_qspi_defconfig
index 22904a0..1f28ad5 100644
--- a/configs/ls1046aqds_qspi_defconfig
+++ b/configs/ls1046aqds_qspi_defconfig
@@ -2,7 +2,7 @@  CONFIG_ARM=y
 CONFIG_TARGET_LS1046AQDS=y
 CONFIG_SYS_TEXT_BASE=0x40100000
 CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_SECT_SIZE=0x10000
+CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_ENV_OFFSET=0x300000
 CONFIG_FSL_LS_PPA=y
 CONFIG_NR_DRAM_BANKS=2
@@ -31,6 +31,7 @@  CONFIG_MTDPARTS_DEFAULT="mtdparts=1550000.spi-0:2m(uboot),14m(free)"
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_ADDR=0x40300000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
 CONFIG_SATA_CEVA=y
diff --git a/configs/ls1046aqds_tfa_defconfig b/configs/ls1046aqds_tfa_defconfig
index df85533..18e3993 100644
--- a/configs/ls1046aqds_tfa_defconfig
+++ b/configs/ls1046aqds_tfa_defconfig
@@ -3,7 +3,7 @@  CONFIG_TARGET_LS1046AQDS=y
 CONFIG_TFABOOT=y
 CONFIG_SYS_TEXT_BASE=0x82000000
 CONFIG_ENV_SIZE=0x2000
-CONFIG_ENV_SECT_SIZE=0x20000
+CONFIG_ENV_SECT_SIZE=0x40000
 CONFIG_ENV_OFFSET=0x500000
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y
@@ -39,7 +39,7 @@  CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_USE_ENV_SPI_BUS=y
 CONFIG_ENV_SPI_BUS=0
-CONFIG_ENV_ADDR=0x60500000
+CONFIG_ENV_ADDR=0x40500000
 CONFIG_DM=y
 CONFIG_SATA_CEVA=y
 CONFIG_FSL_CAAM=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index d5e0f02..d836421 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -28,6 +28,7 @@  CONFIG_MTDPARTS_DEFAULT="mtdparts=1550000.spi-0:1m(rcw),15m(u-boot),48m(kernel.i
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
 CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_ENV_ADDR=0x40300000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_DM=y
 CONFIG_SATA_CEVA=y