diff options
author | Santan Kumar <santan.kumar@nxp.com> | 2017-06-15 14:37:01 +0300 |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-08-09 19:55:02 +0300 |
commit | 263536a693b3c3260f88b5e47a1d3e4962d66ba7 (patch) | |
tree | 8d11e8f668ad55f75df408af1bd8f040665f92be /board/freescale | |
parent | 6cc914efd23ae49b682cc92f96061480a7382212 (diff) | |
download | u-boot-263536a693b3c3260f88b5e47a1d3e4962d66ba7.tar.xz |
board:ls2080ardb: Update execution of config_board_mux
Function config_board_mux() reads env variable 'hwconfig' which is
only available after relocation for QSPI boot. Move calling
config_board_mux() to misc_init_r().
Signed-off-by: Santan Kumar <santan.kumar@nxp.com>
[YS: Revise commit message]
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/ls2080ardb/ls2080ardb.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index 210142c44c..f332b6ff5b 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -204,25 +204,12 @@ int config_board_mux(int ctrl_type) int board_init(void) { - char *env_hwconfig; - u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE; #ifdef CONFIG_FSL_MC_ENET u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE; #endif - u32 val; init_final_memctl_regs(); - val = in_le32(dcfg_ccsr + DCFG_RCWSR13 / 4); - - env_hwconfig = getenv("hwconfig"); - - if (hwconfig_f("dspi", env_hwconfig) && - DCFG_RCWSR13_DSPI == (val & (u32)(0xf << 8))) - config_board_mux(MUX_TYPE_DSPI); - else - config_board_mux(MUX_TYPE_SDHC); - #ifdef CONFIG_ENV_IS_NOWHERE gd->env_addr = (ulong)&default_environment[0]; #endif @@ -257,6 +244,20 @@ int board_early_init_f(void) int misc_init_r(void) { + char *env_hwconfig; + u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE; + u32 val; + + val = in_le32(dcfg_ccsr + DCFG_RCWSR13 / 4); + + env_hwconfig = getenv("hwconfig"); + + if (hwconfig_f("dspi", env_hwconfig) && + DCFG_RCWSR13_DSPI == (val & (u32)(0xf << 8))) + config_board_mux(MUX_TYPE_DSPI); + else + config_board_mux(MUX_TYPE_SDHC); + /* * LS2081ARDB RevF board has smart voltage translator * which needs to be programmed to enable high speed SD interface |