diff options
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm_cortexa8/mx6/generic.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cpu/arm_cortexa8/mx6/generic.c b/cpu/arm_cortexa8/mx6/generic.c index f959b95..11fac50 100644 --- a/cpu/arm_cortexa8/mx6/generic.c +++ b/cpu/arm_cortexa8/mx6/generic.c @@ -770,3 +770,27 @@ void ipu_clk_enable(void) void ipu_clk_disable(void) { } + +int otp_clk_enable(void) +{ + u32 reg = 0; + + reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR2); + if (!(reg & 0x3000)) + reg |= 0x3000; + writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR2); + return 0; +} + +int otp_clk_disable(void) +{ + u32 reg = 0; + + reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR2); + if ((reg & 0x3000) == 0x3000) + reg &= ~(0x3000); + writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR2); + return 0; +} + + |