Hook up AM33XX HWMOD data to OMAP framework.

Signed-off-by: Afzal Mohammed <af...@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaib...@ti.com>
---
 arch/arm/mach-omap2/Makefile     |    1 +
 arch/arm/mach-omap2/io.c         |    2 ++
 arch/arm/mach-omap2/omap_hwmod.c |   13 +++++++++----
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 19330dc..706a8ef 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -168,6 +168,7 @@ obj-$(CONFIG_SOC_OMAP2430)          += 
omap_hwmod_2xxx_ipblock_data.o \
 obj-$(CONFIG_ARCH_OMAP3)               += omap_hwmod_2xxx_3xxx_ipblock_data.o \
                                           
omap_hwmod_2xxx_3xxx_interconnect_data.o \
                                           omap_hwmod_3xxx_data.o
+obj-$(CONFIG_SOC_OMAPAM33XX)           += omap_hwmod_33xx_data.o
 obj-$(CONFIG_ARCH_OMAP4)               += omap_hwmod_44xx_data.o

 # EMU peripherals
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 82e2817..3afe4e6 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -468,6 +468,8 @@ void __init am33xx_init_early(void)
        am33xx_voltagedomains_init();
        am33xx_powerdomains_init();
        am33xx_clockdomains_init();
+       am33xx_hwmod_init();
+       omap_hwmod_init_postsetup();
        omap3xxx_clk_init();
 }
 #endif
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6b3088d..dfd3743 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1051,7 +1051,7 @@ static struct omap_hwmod *_lookup(const char *name)
  */
 static int _init_clkdm(struct omap_hwmod *oh)
 {
-       if (cpu_is_omap24xx() || cpu_is_omap34xx())
+       if (cpu_is_omap24xx() || (cpu_is_omap34xx() && !cpu_is_am33xx()))
                return 0;

        if (!oh->clkdm_name) {
@@ -1134,9 +1134,14 @@ static int _wait_target_ready(struct omap_hwmod *oh)
        /* XXX check clock enable states */

        if (cpu_is_omap24xx() || cpu_is_omap34xx()) {
-               ret = omap2_cm_wait_module_ready(oh->prcm.omap2.module_offs,
-                                                oh->prcm.omap2.idlest_reg_id,
-                                                
oh->prcm.omap2.idlest_idle_bit);
+               if (cpu_is_am33xx())
+                       ret = am33xx_cm_wait_module_ready(oh->clkdm->cm_inst,
+                                               oh->prcm.omap4.clkctrl_offs);
+               else
+                       ret = omap2_cm_wait_module_ready(
+                                               oh->prcm.omap2.module_offs,
+                                               oh->prcm.omap2.idlest_reg_id,
+                                               oh->prcm.omap2.idlest_idle_bit);
        } else if (cpu_is_omap44xx()) {
                if (!oh->clkdm)
                        return -EINVAL;
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to