]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: freescale: various boards: Let env subsystem set gd->env_addr
authorMarek Behún <marek.behun@nic.cz>
Fri, 22 Oct 2021 13:47:23 +0000 (15:47 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 31 Oct 2021 18:26:44 +0000 (12:26 -0600)
Various freescale boards set gd->env_addr to default_environment in
board_init(), conditional on CONFIG_ENV_IS_NOWHERE, but this is
redundant, since it is done by env_init() before board_init() is called.

Let the env subsystem handle this.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/freescale/ls1012afrdm/ls1012afrdm.c
board/freescale/ls1012aqds/ls1012aqds.c
board/freescale/ls1012ardb/ls1012ardb.c
board/freescale/ls1028a/ls1028a.c
board/freescale/ls1088a/ls1088a.c
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/ls2080ardb.c
board/freescale/lx2160a/lx2160a.c

index 6473ee05728487f462451694c14f945f783b6de6..5dd19cfcd9a5a4b0558246043302efdf73c36708 100644 (file)
@@ -172,10 +172,6 @@ int board_init(void)
        if (current_el() == 3)
                out_le32(&cci->ctrl_ord, CCI400_CTRLORD_EN_BARRIER);
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
-
 #ifdef CONFIG_FSL_CAAM
        sec_init();
 #endif
index 6e21040601d2e9059bbe304c4dceb88186228362..68578e81a5dcd96201c9d2d73d142c11b4abef32 100644 (file)
@@ -150,10 +150,6 @@ int board_init(void)
        erratum_a010315();
 #endif
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
-
 #ifdef CONFIG_FSL_CAAM
        sec_init();
 #endif
index 62e8af48cf14fc948d8a4171861a990c879fc777..064fb4d39fad90d236d6810ded5bd9ace9d52372 100644 (file)
@@ -173,10 +173,6 @@ int board_init(void)
        erratum_a010315();
 #endif
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
-
 #ifdef CONFIG_FSL_CAAM
        sec_init();
 #endif
index 461c571b36c8e5f1b525d944c268bd765e2e9d58..486a544d3522b80e9a7b69f2f8a2b6c4bf2bc42b 100644 (file)
@@ -73,10 +73,6 @@ u32 get_lpuart_clk(void)
 
 int board_init(void)
 {
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
-
 #ifdef CONFIG_FSL_CAAM
        sec_init();
 #endif
index 2f422634d5ae42addd073126570a79a96e73f541..7046fbaeb5d6d899a07abe5ba55ad45ddfef282c 100644 (file)
@@ -810,10 +810,6 @@ int board_init(void)
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
        board_retimer_init();
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
-
 #if defined(CONFIG_TARGET_LS1088ARDB) && defined(CONFIG_FSL_MC_ENET)
        /* invert AQR105 IRQ pins polarity */
        out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR105_IRQ_MASK);
index 62658c4702907d18c3369388219a4cb44883885d..2f0139edef49118ab880dc8540794b0f4d19dd01 100644 (file)
@@ -211,9 +211,6 @@ int board_init(void)
                             FSL_QIXIS_BRDCFG9_QSPI);
 #endif
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
 
 #ifdef CONFIG_RTC_ENABLE_32KHZ_OUTPUT
index 58b852383e995f93d475991f524f7605c0aafee9..bf660a8e656104088542f7bf3afc3e4d079d870a 100644 (file)
@@ -281,9 +281,6 @@ int board_init(void)
 
        init_final_memctl_regs();
 
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);
 
 #ifdef CONFIG_FSL_QIXIS
index e61289d228027899225cb389ec9cfac0a96646dd..bd5abb677ad6bb40701af55100f44bb44f856662 100644 (file)
@@ -588,9 +588,6 @@ int board_init(void)
 #if defined(CONFIG_FSL_MC_ENET) && defined(CONFIG_TARGET_LX2160ARDB)
        u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE;
 #endif
-#ifdef CONFIG_ENV_IS_NOWHERE
-       gd->env_addr = (ulong)&default_environment[0];
-#endif
 
        select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT, 0);