diff options
author | Ye.Li <B37916@freescale.com> | 2014-09-05 16:29:00 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2014-09-05 20:12:19 +0800 |
commit | 06552584b64b3906ad45a37edbee66ed722b3fe6 (patch) | |
tree | e2b3ccedca9117b8928d132ec9d90e6fb5acf426 | |
parent | 9b6edb6de507591c0d1633058f5ec5283018f159 (diff) | |
download | u-boot-imx-06552584b64b3906ad45a37edbee66ed722b3fe6.zip u-boot-imx-06552584b64b3906ad45a37edbee66ed722b3fe6.tar.gz u-boot-imx-06552584b64b3906ad45a37edbee66ed722b3fe6.tar.bz2 |
ENGR00329930-1 USDHC/ESDHC: Fix incorrect pad setting for SDR 104
The dynamic pad setting select the pad according to the clock. But
when using SDR104, we can't get the 208Mhz clock because the max
USDHC clock is 198Mhz. This cause the selection go wrong value.
To fix the problem, change the dynamic pad setting to use UHS mode
instead of clock.
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 6869222c969d4ea3b0f267f126ccdab9bd8f1d5b)
-rw-r--r-- | board/freescale/mx6q_arm2/mx6q_arm2.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6q_hdmidongle/mx6q_hdmidongle.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6q_sabreauto/mx6q_sabreauto.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6q_sabrelite/mx6q_sabrelite.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6q_sabresd/mx6q_sabresd.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6sl_arm2/mx6sl_arm2.c | 6 | ||||
-rw-r--r-- | board/freescale/mx6sl_evk/mx6sl_evk.c | 6 | ||||
-rw-r--r-- | drivers/mmc/imx_esdhc.c | 6 |
8 files changed, 24 insertions, 24 deletions
diff --git a/board/freescale/mx6q_arm2/mx6q_arm2.c b/board/freescale/mx6q_arm2/mx6q_arm2.c index f65572c..8854a39 100644 --- a/board/freescale/mx6q_arm2/mx6q_arm2.c +++ b/board/freescale/mx6q_arm2/mx6q_arm2.c @@ -794,15 +794,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6q_hdmidongle/mx6q_hdmidongle.c b/board/freescale/mx6q_hdmidongle/mx6q_hdmidongle.c index f587d71..fe50643 100644 --- a/board/freescale/mx6q_hdmidongle/mx6q_hdmidongle.c +++ b/board/freescale/mx6q_hdmidongle/mx6q_hdmidongle.c @@ -1045,15 +1045,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c index 91be2a2..cc0d481 100644 --- a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c +++ b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c @@ -873,15 +873,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c b/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c index 879934c..49509bf 100644 --- a/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c +++ b/board/freescale/mx6q_sabrelite/mx6q_sabrelite.c @@ -410,15 +410,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6q_sabresd/mx6q_sabresd.c b/board/freescale/mx6q_sabresd/mx6q_sabresd.c index b1daa07..caab6f1 100644 --- a/board/freescale/mx6q_sabresd/mx6q_sabresd.c +++ b/board/freescale/mx6q_sabresd/mx6q_sabresd.c @@ -1093,15 +1093,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6sl_arm2/mx6sl_arm2.c b/board/freescale/mx6sl_arm2/mx6sl_arm2.c index 4bc9c14..108e96b 100644 --- a/board/freescale/mx6sl_arm2/mx6sl_arm2.c +++ b/board/freescale/mx6sl_arm2/mx6sl_arm2.c @@ -252,15 +252,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/board/freescale/mx6sl_evk/mx6sl_evk.c b/board/freescale/mx6sl_evk/mx6sl_evk.c index 9d1d40a..c9f8c94 100644 --- a/board/freescale/mx6sl_evk/mx6sl_evk.c +++ b/board/freescale/mx6sl_evk/mx6sl_evk.c @@ -245,15 +245,15 @@ static void usdhc_switch_pad(iomux_v3_cfg_t *pad_list, unsigned count, } } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) { iomux_v3_cfg_t new_pads[14]; u32 count; iomux_v3_cfg_t pad_ctrl = USDHC_PAD_CTRL_DEFAULT; - if (clock >= 200000000) + if (uhs_mode == SD_UHSI_FUNC_SDR104) pad_ctrl = USDHC_PAD_CTRL_200MHZ; - else if (clock == 100000000) + else if (uhs_mode == SD_UHSI_FUNC_SDR50) pad_ctrl = USDHC_PAD_CTRL_100MHZ; switch (index) { diff --git a/drivers/mmc/imx_esdhc.c b/drivers/mmc/imx_esdhc.c index a1c4d9b..10d40d9 100644 --- a/drivers/mmc/imx_esdhc.c +++ b/drivers/mmc/imx_esdhc.c @@ -541,12 +541,12 @@ static void esdhc_dll_setup(struct mmc *mmc) * CPU and board-specific Ethernet initializations. Aliased function * signals caller to move on */ -static int __def_mmc_io_switch(u32 index, u32 clock) +static int __def_mmc_io_switch(u32 index, u32 uhs_mode) { return -1; } -int board_mmc_io_switch(u32 index, u32 clock) +int board_mmc_io_switch(u32 index, u32 uhs_mode) __attribute__((weak, alias("__def_mmc_io_switch"))); static void esdhc_set_ios(struct mmc *mmc) @@ -556,7 +556,7 @@ static void esdhc_set_ios(struct mmc *mmc) u32 tmp; /* Set the io pad*/ - board_mmc_io_switch(mmc->block_dev.dev, mmc->clock); + board_mmc_io_switch(mmc->block_dev.dev, mmc->card_uhs_mode); /* Set the clock speed */ set_sysctl(mmc, mmc->clock); |