summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c36
-rw-r--r--board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c23
-rw-r--r--include/configs/mx6ul_14x14_ddr3_arm2.h4
-rw-r--r--include/configs/mx6ul_14x14_evk.h3
4 files changed, 64 insertions, 2 deletions
diff --git a/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c b/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
index 2a4c12f..7d30ac9 100644
--- a/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
+++ b/board/freescale/mx6ul_14x14_ddr3_arm2/mx6ul_14x14_ddr3_arm2.c
@@ -314,10 +314,24 @@ static void eimnor_cs_setup(void)
static void setup_eimnor(void)
{
+ if (check_module_fused(MX6_MODULE_EIM)) {
+ printf("WEIM@0x%x is fused, disable it\n", WEIM_BASE_ADDR);
+ return;
+ }
+
imx_iomux_v3_setup_multiple_pads(eimnor_pads, ARRAY_SIZE(eimnor_pads));
eimnor_cs_setup();
}
+
+int board_flash_wp_on(void)
+{
+ if (check_module_fused(MX6_MODULE_EIM))
+ return 1; /* Skip flash init */
+
+ return 0;
+}
+
#endif
#ifdef CONFIG_FEC_MXC
@@ -449,6 +463,22 @@ static struct fsl_esdhc_cfg usdhc_cfg[2] = {
#define USDHC2_CD_GPIO IMX_GPIO_NR(4, 17)
#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;
@@ -624,6 +654,9 @@ static int setup_fec(int fec_id)
int ret;
if (0 == fec_id) {
+ if (check_module_fused(MX6_MODULE_ENET1))
+ return -1;
+
/*
* Use 50M anatop loopback REF_CLK1 for ENET1,
* clear gpr1[13], set gpr1[17]
@@ -635,6 +668,9 @@ static int setup_fec(int fec_id)
return ret;
} else {
+ if (check_module_fused(MX6_MODULE_ENET2))
+ return -1;
+
/* clk from phy, set gpr1[14], clear gpr1[18]*/
clrsetbits_le32(&iomuxc_gpr_regs->gpr[1], IOMUX_GPR1_FEC2_MASK,
IOMUX_GPR1_FEC2_CLOCK_MUX2_SEL_MASK);
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 7bc92be..2d60ac8 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -450,6 +450,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;
@@ -538,7 +554,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
@@ -679,6 +694,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].
@@ -686,6 +704,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_ddr3_arm2.h b/include/configs/mx6ul_14x14_ddr3_arm2.h
index f0f680b..6a1be6e 100644
--- a/include/configs/mx6ul_14x14_ddr3_arm2.h
+++ b/include/configs/mx6ul_14x14_ddr3_arm2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
*
* Configuration settings for the Freescale i.MX6UL 14x14 DDR3 ARM2.
*
@@ -68,4 +68,6 @@
#define CONFIG_PHY_MICREL
#endif
+#define CONFIG_MODULE_FUSE
+#define CONFIG_OF_SYSTEM_SETUP
#endif
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 443de73..64a0aa5 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -363,6 +363,9 @@
#endif
#endif
+#define CONFIG_MODULE_FUSE
+#define CONFIG_OF_SYSTEM_SETUP
+
#if defined(CONFIG_ANDROID_SUPPORT)
#include "mx6ul_14x14_evk_android.h"
#endif