summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-03-03 17:23:26 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2016-03-04 15:53:41 +0800
commit8c8da023f9c530254486cda4bccb3a45d0ae6e28 (patch)
tree609d04081e339771c2175d4e05fd2691241bc6e0
parent2f8eaed32b99e436c085802322407f990c43ee05 (diff)
downloadu-boot-imx-8c8da023f9c530254486cda4bccb3a45d0ae6e28.zip
u-boot-imx-8c8da023f9c530254486cda4bccb3a45d0ae6e28.tar.gz
u-boot-imx-8c8da023f9c530254486cda4bccb3a45d0ae6e28.tar.bz2
MLK-12488 mx6sl/ul/sx: Fix incorrect clear mmdc_ch0 handshake mask
Since the MX6UL/SL/SX only has one DDR channel, in CCM_CCDR register the bit[17] for mmdc_ch0 is reserved and its proper state should be 1. When clear this bit, the periph_clk_sel cannot be set and that CDHIPR[periph_clk_sel_busy] handshake never clears. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 4c3e6cd60f1f15061b391965ebc1ccb158129286)
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 4e1ea01..4689924 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -269,7 +269,10 @@ static void clear_mmdc_ch_mask(void)
reg = readl(&mxc_ccm->ccdr);
/* Clear MMDC channel mask */
- reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK | MXC_CCM_CCDR_MMDC_CH0_HS_MASK);
+ if (is_cpu_type(MXC_CPU_MX6SX) || is_cpu_type(MXC_CPU_MX6UL) || is_cpu_type(MXC_CPU_MX6SL))
+ reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK);
+ else
+ reg &= ~(MXC_CCM_CCDR_MMDC_CH1_HS_MASK | MXC_CCM_CCDR_MMDC_CH0_HS_MASK);
writel(reg, &mxc_ccm->ccdr);
}