diff options
author | Lukasz Majewski <l.majewski@majess.pl> | 2016-11-28 07:18:14 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-11-30 09:57:19 +0100 |
commit | 4db4d42ee290a8cad00b358b2e7ef6a00483893b (patch) | |
tree | 0879ef7a41f87be91218de11b27dfff844d0e678 /arch/arm/cpu/armv7/mx6 | |
parent | 730d25443aa894a32b9f66ebde3bfbf64b73ac7a (diff) |
imx6: clock: Enable External Memory Interface [EIM] clock (eim_slow_clock)
This patch extends the imx6 clock code to enable or disable the EIM
slow clock, which in necessary when one wants to use EIM interface t
o read/write from external memory (e.g. NOR).
Signed-off-by: Lukasz Majewski <l.majewski@majess.pl>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/clock.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c index 96fbd81d08..299562884a 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -1384,6 +1384,20 @@ void select_ldb_di_clock_source(enum ldb_di_clock clk) } #endif +#ifndef CONFIG_SYS_NO_FLASH +void enable_eim_clk(unsigned char enable) +{ + u32 reg; + + reg = __raw_readl(&imx_ccm->CCGR6); + if (enable) + reg |= MXC_CCM_CCGR6_EMI_SLOW_MASK; + else + reg &= ~MXC_CCM_CCGR6_EMI_SLOW_MASK; + __raw_writel(reg, &imx_ccm->CCGR6); +} +#endif + /***************************************************/ U_BOOT_CMD( |