summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2011-11-02 17:26:06 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 21:04:13 +0800
commit2be5bafd5d4bee5fce1bb7e1b33af4ac49c56057 (patch)
treee027cc7aae48299ff53da9b12fa0a364a235bedd /arch/arm/mach-mx5
parentc1ce8112f79ae58caebb7993e1a8021b03b2586b (diff)
ENGR00161234-2: Enable ocotp clock for mx6q
Add clock enable code to arch. OCOTP driver missed code to enable clock in driver. Thus if ocotp clock is not enabled in clock.c, ocotp will not work. We will remove ocotp clock enable code in board file and leave this operation to driver. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx5')
-rwxr-xr-xarch/arm/mach-mx5/clock_mx50.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/clock_mx50.c b/arch/arm/mach-mx5/clock_mx50.c
index 60d651687ef4..4d2c2b9b5e81 100755
--- a/arch/arm/mach-mx5/clock_mx50.c
+++ b/arch/arm/mach-mx5/clock_mx50.c
@@ -2664,6 +2664,11 @@ static struct clk gpmi_nfc_clk[] = {
},
};
+static unsigned long _clk_ocotp_get_rate(struct clk *clk)
+{
+ return clk_get_rate(clk->parent);
+}
+
static struct clk ocotp_clk = {
__INIT_CLK_DEBUG(ocotp_clk)
.parent = &ahb_clk,
@@ -2671,6 +2676,7 @@ static struct clk ocotp_clk = {
.enable_reg = MXC_CCM_CCGR7,
.enable_shift = MXC_CCM_CCGRx_CG13_OFFSET,
.disable = _clk_disable,
+ .get_rate = _clk_ocotp_get_rate,
};
static int _clk_gpu2d_set_parent(struct clk *clk, struct clk *parent)
@@ -3341,7 +3347,7 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "bch-apb", gpmi_nfc_clk[3]),
_REGISTER_CLOCK(NULL, "rng_clk", rng_clk),
_REGISTER_CLOCK(NULL, "dcp_clk", dcp_clk),
- _REGISTER_CLOCK(NULL, "ocotp_ctrl_apb", ocotp_clk),
+ _REGISTER_CLOCK(NULL, "ocotp_ctrl_ahb_clk", ocotp_clk),
_REGISTER_CLOCK(NULL, "ocram_clk", ocram_clk),
_REGISTER_CLOCK("mxs-dma-apbh", NULL, apbh_dma_clk),
_REGISTER_CLOCK(NULL, "sys_clk", sys_clk),
@@ -3475,8 +3481,6 @@ int __init mx50_clocks_init(unsigned long ckil, unsigned long osc, unsigned long
clk_enable(&main_bus_clk);
- clk_enable(&ocotp_clk);
-
databahn = ioremap(MX50_DATABAHN_BASE_ADDR, SZ_16K);
/* Initialise the parents to be axi_b, parents are set to