diff options
author | Ye.Li <B37916@freescale.com> | 2015-03-26 15:31:17 +0800 |
---|---|---|
committer | Ye.Li <B37916@freescale.com> | 2015-03-27 16:52:25 +0800 |
commit | f215632cb25d1076ab5c5465efdfad2212010d8d (patch) | |
tree | 4fd6f030fdca4084a9509bb87c40629beaf6a2f3 /arch | |
parent | 725a3bbbe0a172a0f4619d99bc198b9367b9fc5d (diff) | |
download | u-boot-imx-f215632cb25d1076ab5c5465efdfad2212010d8d.zip u-boot-imx-f215632cb25d1076ab5c5465efdfad2212010d8d.tar.gz u-boot-imx-f215632cb25d1076ab5c5465efdfad2212010d8d.tar.bz2 |
MLK-10477-2 imx: mx7d: Add EPDC clock init and base address
Ungate the EPDC clock at system up if the EPDC is enabled
Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/mx7/clock.c | 33 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx7/imx-regs.h | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7/clock.c b/arch/arm/cpu/armv7/mx7/clock.c index c213f03..f9e0c0c 100644 --- a/arch/arm/cpu/armv7/mx7/clock.c +++ b/arch/arm/cpu/armv7/mx7/clock.c @@ -713,6 +713,25 @@ static void init_clk_wdog(void) } +#ifdef CONFIG_MXC_EPDC +static void init_clk_epdc(void) +{ + u32 target; + + /* disable the clock gate first */ + clock_enable(CCGR_EPDC, 0); + + /* 24Mhz */ + target = CLK_ROOT_ON | EPDC_PIXEL_CLK_ROOT_FROM_PLL_SYS_MAIN_480M_CLK | + CLK_ROOT_PRE_DIV(CLK_ROOT_PRE_DIV1) | + CLK_ROOT_POST_DIV(CLK_ROOT_POST_DIV12); + clock_set_target_val(EPDC_PIXEL_CLK_ROOT, target); + + /* enable the clock gate */ + clock_enable(CCGR_EPDC, 1); +} +#endif + static int enable_pll_enet(void) { u32 reg; @@ -988,6 +1007,9 @@ void clock_init(void) init_clk_weim(); init_clk_ecspi(); init_clk_wdog(); +#ifdef CONFIG_MXC_EPDC + init_clk_epdc(); +#endif enable_usboh3_clk(1); @@ -1010,6 +1032,17 @@ void hab_caam_clock_disable(void) } #endif +#ifdef CONFIG_MXC_EPDC +void epdc_clock_enable(void) +{ + clock_enable(CCGR_EPDC, 1); +} +void epdc_clock_disable(void) +{ + clock_enable(CCGR_EPDC, 0); +} +#endif + /* * Dump some core clockes. */ diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h index db148e9..3f82807 100644 --- a/arch/arm/include/asm/arch-mx7/imx-regs.h +++ b/arch/arm/include/asm/arch-mx7/imx-regs.h @@ -139,6 +139,7 @@ #define SYSCNT_CTRL_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xC0000) #define PCIE_PHY_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xD0000) #define EPDC_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0xF0000) +#define EPDC_BASE_ADDR EPDC_IPS_BASE_ADDR #define EPXP_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x100000) #define CSI1_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x110000) #define ELCDIF1_IPS_BASE_ADDR (AIPS2_OFF_BASE_ADDR+0x130000) |