diff options
author | Ye Li <ye.li@nxp.com> | 2016-03-11 14:20:23 +0800 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2016-03-25 16:02:33 +0800 |
commit | 416dea861c2dd5a197bf2354069bba8415a20b12 (patch) | |
tree | 6056b1268b231eb464e9515f7908253d1c067546 /arch | |
parent | 95302eefcde6f37b248ea1cc9892867cc3600910 (diff) | |
download | u-boot-imx-416dea861c2dd5a197bf2354069bba8415a20b12.zip u-boot-imx-416dea861c2dd5a197bf2354069bba8415a20b12.tar.gz u-boot-imx-416dea861c2dd5a197bf2354069bba8415a20b12.tar.bz2 |
MLK-12533 mx6sx: select OSC as uart's clk parent
As M4 is sourcing UART clk from OSC, to make UART work
when M4 is enabled, need to select OSC as clk parent,
24M OSC is enough for debug UART in uboot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit b5e1b393192099e91c5cb75b69291c87eacb9f60)
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index b648704..7192d67 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -367,6 +367,16 @@ void vadc_power_down(void) } #endif +static void set_uart_from_osc(void) +{ + u32 reg; + + /* set uart clk to OSC */ + reg = readl(CCM_BASE_ADDR + 0x24); + reg |= MXC_CCM_CSCDR1_UART_CLK_SEL; + writel(reg, CCM_BASE_ADDR + 0x24); +} + int arch_cpu_init(void) { init_aips(); @@ -403,6 +413,9 @@ int arch_cpu_init(void) set_preclk_from_osc(); #endif + if (is_cpu_type(MXC_CPU_MX6SX)) + set_uart_from_osc(); + imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */ #ifdef CONFIG_APBH_DMA |