Message ID | 20191112112839.10960-3-yangbo.lu@nxp.com |
---|---|
State | Accepted |
Commit | d9114e2b73552be7f9035c7567ea14febefa0dce |
Delegated to: | Peng Fan |
Headers | show |
Series | Drop redundant code for eSDHC clock getting | expand |
>-----Original Message----- >From: Yangbo Lu <yangbo.lu@nxp.com> >Sent: Tuesday, November 12, 2019 4:59 PM >To: u-boot@lists.denx.de >Cc: Peng Fan <peng.fan@nxp.com>; Feng Li <feng.li_2@nxp.com>; Alison Wang ><alison.wang@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; Priyanka Jain ><priyanka.jain@nxp.com>; Mario Six <mario.six@gdsys.cc>; Y.b. Lu ><yangbo.lu@nxp.com> >Subject: [PATCH 2/4] arm: ls1021a: drop redundant board_mmc_init() > >The board_mmc_init() defined in board files is actually doing same thing with >the cpu_mmc_init() defined in arch/arm/cpu/armv7/ls102xa/cpu.c. So drop it. > >Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> >--- > board/freescale/ls1021aiot/ls1021aiot.c | 15 --------------- >board/freescale/ls1021aqds/ls1021aqds.c | 14 -------------- >board/freescale/ls1021atwr/ls1021atwr.c | 14 -------------- > 3 files changed, 43 deletions(-) > >diff --git a/board/freescale/ls1021aiot/ls1021aiot.c >b/board/freescale/ls1021aiot/ls1021aiot.c >index 70992a5..621a3db 100644 >--- a/board/freescale/ls1021aiot/ls1021aiot.c >+++ b/board/freescale/ls1021aiot/ls1021aiot.c >@@ -12,7 +12,6 @@ > #include <asm/arch/ls102xa_devdis.h> > #include <asm/arch/ls102xa_soc.h> > #include <fsl_csu.h> >-#include <fsl_esdhc.h> > #include <fsl_immap.h> > #include <netdev.h> > #include <fsl_mdio.h> >@@ -103,20 +102,6 @@ int dram_init(void) > return 0; > } > >-#ifdef CONFIG_FSL_ESDHC >-struct fsl_esdhc_cfg esdhc_cfg[1] = { >- {CONFIG_SYS_FSL_ESDHC_ADDR}, >-}; >- >-int board_mmc_init(bd_t *bis) >-{ >- esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); >- >- return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); >-} >- >-#endif >- > #ifdef CONFIG_TSEC_ENET > int board_eth_init(bd_t *bis) > { >diff --git a/board/freescale/ls1021aqds/ls1021aqds.c >b/board/freescale/ls1021aqds/ls1021aqds.c >index 2ca2bd9..4034b7d 100644 >--- a/board/freescale/ls1021aqds/ls1021aqds.c >+++ b/board/freescale/ls1021aqds/ls1021aqds.c >@@ -14,7 +14,6 @@ > #include <hwconfig.h> > #include <mmc.h> > #include <fsl_csu.h> >-#include <fsl_esdhc.h> > #include <fsl_ifc.h> > #include <fsl_sec.h> > #include <spl.h> >@@ -161,19 +160,6 @@ int dram_init(void) > return fsl_initdram(); > } > >-#ifdef CONFIG_FSL_ESDHC >-struct fsl_esdhc_cfg esdhc_cfg[1] = { >- {CONFIG_SYS_FSL_ESDHC_ADDR}, >-}; >- >-int board_mmc_init(bd_t *bis) >-{ >- esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); >- >- return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); >-} >-#endif >- > int board_early_init_f(void) > { > struct ccsr_scfg *scfg = (struct ccsr_scfg >*)CONFIG_SYS_FSL_SCFG_ADDR; diff --git >a/board/freescale/ls1021atwr/ls1021atwr.c >b/board/freescale/ls1021atwr/ls1021atwr.c >index fcf2ec9..1a412ee 100644 >--- a/board/freescale/ls1021atwr/ls1021atwr.c >+++ b/board/freescale/ls1021atwr/ls1021atwr.c >@@ -14,7 +14,6 @@ > #include <hwconfig.h> > #include <mmc.h> > #include <fsl_csu.h> >-#include <fsl_esdhc.h> > #include <fsl_ifc.h> > #include <fsl_immap.h> > #include <netdev.h> >@@ -233,19 +232,6 @@ int dram_init(void) > return 0; > } > >-#ifdef CONFIG_FSL_ESDHC >-struct fsl_esdhc_cfg esdhc_cfg[1] = { >- {CONFIG_SYS_FSL_ESDHC_ADDR}, >-}; >- >-int board_mmc_init(bd_t *bis) >-{ >- esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); >- >- return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); >-} >-#endif >- > int board_eth_init(bd_t *bis) > { > return pci_eth_init(bis); >-- >2.7.4 Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
diff --git a/board/freescale/ls1021aiot/ls1021aiot.c b/board/freescale/ls1021aiot/ls1021aiot.c index 70992a5..621a3db 100644 --- a/board/freescale/ls1021aiot/ls1021aiot.c +++ b/board/freescale/ls1021aiot/ls1021aiot.c @@ -12,7 +12,6 @@ #include <asm/arch/ls102xa_devdis.h> #include <asm/arch/ls102xa_soc.h> #include <fsl_csu.h> -#include <fsl_esdhc.h> #include <fsl_immap.h> #include <netdev.h> #include <fsl_mdio.h> @@ -103,20 +102,6 @@ int dram_init(void) return 0; } -#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg[1] = { - {CONFIG_SYS_FSL_ESDHC_ADDR}, -}; - -int board_mmc_init(bd_t *bis) -{ - esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); - - return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); -} - -#endif - #ifdef CONFIG_TSEC_ENET int board_eth_init(bd_t *bis) { diff --git a/board/freescale/ls1021aqds/ls1021aqds.c b/board/freescale/ls1021aqds/ls1021aqds.c index 2ca2bd9..4034b7d 100644 --- a/board/freescale/ls1021aqds/ls1021aqds.c +++ b/board/freescale/ls1021aqds/ls1021aqds.c @@ -14,7 +14,6 @@ #include <hwconfig.h> #include <mmc.h> #include <fsl_csu.h> -#include <fsl_esdhc.h> #include <fsl_ifc.h> #include <fsl_sec.h> #include <spl.h> @@ -161,19 +160,6 @@ int dram_init(void) return fsl_initdram(); } -#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg[1] = { - {CONFIG_SYS_FSL_ESDHC_ADDR}, -}; - -int board_mmc_init(bd_t *bis) -{ - esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); - - return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); -} -#endif - int board_early_init_f(void) { struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c index fcf2ec9..1a412ee 100644 --- a/board/freescale/ls1021atwr/ls1021atwr.c +++ b/board/freescale/ls1021atwr/ls1021atwr.c @@ -14,7 +14,6 @@ #include <hwconfig.h> #include <mmc.h> #include <fsl_csu.h> -#include <fsl_esdhc.h> #include <fsl_ifc.h> #include <fsl_immap.h> #include <netdev.h> @@ -233,19 +232,6 @@ int dram_init(void) return 0; } -#ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg[1] = { - {CONFIG_SYS_FSL_ESDHC_ADDR}, -}; - -int board_mmc_init(bd_t *bis) -{ - esdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK); - - return fsl_esdhc_initialize(bis, &esdhc_cfg[0]); -} -#endif - int board_eth_init(bd_t *bis) { return pci_eth_init(bis);
The board_mmc_init() defined in board files is actually doing same thing with the cpu_mmc_init() defined in arch/arm/cpu/armv7/ls102xa/cpu.c. So drop it. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> --- board/freescale/ls1021aiot/ls1021aiot.c | 15 --------------- board/freescale/ls1021aqds/ls1021aqds.c | 14 -------------- board/freescale/ls1021atwr/ls1021atwr.c | 14 -------------- 3 files changed, 43 deletions(-)