diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-15 22:16:54 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-04-05 14:04:35 +0800 |
commit | 687b586bf7d3b0d2f796c8ea768e4fb450079adb (patch) | |
tree | 34f9d980a533a1d5e530e9f9022af18f11f88760 | |
parent | 2d3b5df8530cd5ef883750378838dea7c40259af (diff) | |
download | u-boot-imx-687b586bf7d3b0d2f796c8ea768e4fb450079adb.zip u-boot-imx-687b586bf7d3b0d2f796c8ea768e4fb450079adb.tar.gz u-boot-imx-687b586bf7d3b0d2f796c8ea768e4fb450079adb.tar.bz2 |
MLK-12483-5 mx6ul: Enable module fuse check EVK board
Enable the configurations CONFIG_MODULE_FUSE and CONFIG_OF_SYSTEM_SETUP for
module fuse check. And modify board level codes for SD, FEC and EIM.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9232e9f7637afa3b71b43ab2d1361582ec5a080a)
-rw-r--r-- | board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 23 | ||||
-rw-r--r-- | include/configs/mx6ul_14x14_evk.h | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c index 4233025..1c4a436 100644 --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c @@ -336,6 +336,22 @@ static struct fsl_esdhc_cfg usdhc_cfg[2] = { #define USDHC2_CD_GPIO IMX_GPIO_NR(4, 5) #define USDHC2_PWR_GPIO IMX_GPIO_NR(4, 10) +int board_mmc_get_env_dev(int devno) +{ + if (devno == 1 && mx6_esdhc_fused(USDHC1_BASE_ADDR)) + devno = 0; + + return devno; +} + +int mmc_map_to_kernel_blk(int devno) +{ + if (devno == 0 && mx6_esdhc_fused(USDHC1_BASE_ADDR)) + devno = 1; + + return devno; +} + int board_mmc_getcd(struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv; @@ -422,7 +438,6 @@ int board_mmc_init(bd_t *bis) ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]); if (ret) { printf("Warning: failed to initialize mmc dev %d\n", i); - return ret; } } #endif @@ -527,6 +542,9 @@ static int setup_fec(int fec_id) int ret; if (fec_id == 0) { + if (check_module_fused(MX6_MODULE_ENET1)) + return -1; + /* * Use 50M anatop loopback REF_CLK1 for ENET1, * clear gpr1[13], set gpr1[17]. @@ -534,6 +552,9 @@ static int setup_fec(int fec_id) clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC1_MASK, IOMUX_GPR1_FEC1_CLOCK_MUX1_SEL_MASK); } else { + if (check_module_fused(MX6_MODULE_ENET2)) + return -1; + /* * Use 50M anatop loopback REF_CLK2 for ENET2, * clear gpr1[14], set gpr1[18]. diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index c9f11ae..1a2e3b4 100644 --- a/include/configs/mx6ul_14x14_evk.h +++ b/include/configs/mx6ul_14x14_evk.h @@ -236,4 +236,6 @@ #endif #endif +#define CONFIG_MODULE_FUSE +#define CONFIG_OF_SYSTEM_SETUP #endif |