summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx3/clock-imx35.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/clock-imx35.c')
-rw-r--r--arch/arm/mach-mx3/clock-imx35.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c
index 9f3e943e2232..afd9fe7ea524 100644
--- a/arch/arm/mach-mx3/clock-imx35.c
+++ b/arch/arm/mach-mx3/clock-imx35.c
@@ -21,6 +21,7 @@
#include <linux/list.h>
#include <linux/clk.h>
#include <linux/io.h>
+#include <linux/module.h>
#include <asm/clkdev.h>
@@ -370,7 +371,8 @@ DEFINE_CLOCK(rngc_clk, 0, CCM_CGR1, 30, get_rate_ipg, NULL);
DEFINE_CLOCK(rtc_clk, 0, CCM_CGR2, 0, get_rate_ipg, NULL);
DEFINE_CLOCK(rtic_clk, 0, CCM_CGR2, 2, get_rate_ahb, NULL);
DEFINE_CLOCK(scc_clk, 0, CCM_CGR2, 4, get_rate_ipg, NULL);
-DEFINE_CLOCK(sdma_clk, 0, CCM_CGR2, 6, NULL, NULL);
+DEFINE_CLOCK(sdma_a_clk, 0, CCM_CGR2, 6, get_rate_ahb, NULL);
+DEFINE_CLOCK(sdma_p_clk, 0, CCM_CGR2, 6, get_rate_ipg, NULL);
DEFINE_CLOCK(spba_clk, 0, CCM_CGR2, 8, get_rate_ipg, NULL);
DEFINE_CLOCK(spdif_clk, 0, CCM_CGR2, 10, NULL, NULL);
DEFINE_CLOCK(ssi1_clk, 0, CCM_CGR2, 12, get_rate_ssi, NULL);
@@ -438,9 +440,9 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "epit", epit1_clk)
_REGISTER_CLOCK(NULL, "epit", epit2_clk)
_REGISTER_CLOCK(NULL, "esai", esai_clk)
- _REGISTER_CLOCK(NULL, "sdhc", esdhc1_clk)
- _REGISTER_CLOCK(NULL, "sdhc", esdhc2_clk)
- _REGISTER_CLOCK(NULL, "sdhc", esdhc3_clk)
+ _REGISTER_CLOCK("mxsdhci.0", NULL, esdhc1_clk)
+ _REGISTER_CLOCK("mxsdhci.1", NULL, esdhc2_clk)
+ _REGISTER_CLOCK("mxsdhci.2", NULL, esdhc3_clk)
_REGISTER_CLOCK("fec.0", NULL, fec_clk)
_REGISTER_CLOCK(NULL, "gpio", gpio1_clk)
_REGISTER_CLOCK(NULL, "gpio", gpio2_clk)
@@ -461,7 +463,8 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "rtc", rtc_clk)
_REGISTER_CLOCK(NULL, "rtic", rtic_clk)
_REGISTER_CLOCK(NULL, "scc", scc_clk)
- _REGISTER_CLOCK(NULL, "sdma", sdma_clk)
+ _REGISTER_CLOCK(NULL, "sdma_ahb_clk", sdma_a_clk)
+ _REGISTER_CLOCK(NULL, "sdma_ipg_clk", sdma_p_clk)
_REGISTER_CLOCK(NULL, "spba", spba_clk)
_REGISTER_CLOCK(NULL, "spdif", spdif_clk)
_REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
@@ -483,9 +486,12 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk)
};
+static struct mxc_clk mxc_clks[ARRAY_SIZE(lookups)];
+
int __init mx35_clocks_init()
{
unsigned int ll = 0;
+ int i;
#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
ll = (3 << 16);
@@ -493,6 +499,16 @@ int __init mx35_clocks_init()
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
+ for (i = 0; i < ARRAY_SIZE(lookups); i++) {
+ mxc_clks[i].reg_clk = lookups[i].clk;
+ if (lookups[i].con_id != NULL)
+ strcpy(mxc_clks[i].name, lookups[i].con_id);
+ else
+ strcpy(mxc_clks[i].name, lookups[i].dev_id);
+ clk_register(&mxc_clks[i]);
+ }
+
+
/* Turn off all clocks except the ones we need to survive, namely:
* EMI, GPIO1/2/3, GPT, IOMUX, MAX and eventually uart
*/