diff options
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | 2013-04-23 10:17:44 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2013-04-28 11:07:43 +0200 |
commit | 112fd2ec6c1a96c6ff51490c28eb971795a2dd95 (patch) | |
tree | d7cd2d012f71a2fc671e393d159b2e28c63f5294 /arch/arm/cpu | |
parent | f6bfd29b1184435ae6eb98ea0f43577b16a5e6d2 (diff) |
Add mxc_ocotp driver
Add an mxc_ocotp driver for i.MX6.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Diffstat (limited to 'arch/arm/cpu')
-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 8cba4fd78e..3c0d908d17 100644 --- a/arch/arm/cpu/armv7/mx6/clock.c +++ b/arch/arm/cpu/armv7/mx6/clock.c @@ -37,6 +37,20 @@ enum pll_clocks { struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; +#ifdef CONFIG_MXC_OCOTP +void enable_ocotp_clk(unsigned char enable) +{ + u32 reg; + + reg = __raw_readl(&imx_ccm->CCGR2); + if (enable) + reg |= MXC_CCM_CCGR2_OCOTP_CTRL_MASK; + else + reg &= ~MXC_CCM_CCGR2_OCOTP_CTRL_MASK; + __raw_writel(reg, &imx_ccm->CCGR2); +} +#endif + void enable_usboh3_clk(unsigned char enable) { u32 reg; |