summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2013-04-23 10:17:44 +0000
committerStefano Babic <sbabic@denx.de>2013-04-28 11:07:43 +0200
commit112fd2ec6c1a96c6ff51490c28eb971795a2dd95 (patch)
treed7cd2d012f71a2fc671e393d159b2e28c63f5294 /arch
parentf6bfd29b1184435ae6eb98ea0f43577b16a5e6d2 (diff)
downloadu-boot-imx-112fd2ec6c1a96c6ff51490c28eb971795a2dd95.zip
u-boot-imx-112fd2ec6c1a96c6ff51490c28eb971795a2dd95.tar.gz
u-boot-imx-112fd2ec6c1a96c6ff51490c28eb971795a2dd95.tar.bz2
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')
-rw-r--r--arch/arm/cpu/armv7/mx6/clock.c14
-rw-r--r--arch/arm/include/asm/arch-mx6/clock.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index 8cba4fd..3c0d908 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;
diff --git a/arch/arm/include/asm/arch-mx6/clock.h b/arch/arm/include/asm/arch-mx6/clock.h
index db377cc..cfd4edc 100644
--- a/arch/arm/include/asm/arch-mx6/clock.h
+++ b/arch/arm/include/asm/arch-mx6/clock.h
@@ -61,6 +61,7 @@ enum mxc_clock {
u32 imx_get_uartclk(void);
u32 imx_get_fecclk(void);
unsigned int mxc_get_clock(enum mxc_clock clk);
+void enable_ocotp_clk(unsigned char enable);
void enable_usboh3_clk(unsigned char enable);
int enable_sata_clock(void);
int enable_i2c_clk(unsigned char enable, unsigned i2c_num);