summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e4b751d)
raw | patch | inline | side by side (parent: e4b751d)
author | Vaibhav Hiremath <hvaibhav@ti.com> | |
Tue, 4 Oct 2011 12:23:49 +0000 (17:53 +0530) | ||
committer | Vaibhav Hiremath <hvaibhav@ti.com> | |
Mon, 23 Jan 2012 19:13:51 +0000 (00:43 +0530) |
AM335X is bit different than OMAP3/4 architecture when it comes to
PRCM module, for example, the way module is enabled/disabled.
Although it is closer to OMAP4 architecure but the register offset
and PRCM partitions won't match, so we need to seperate API's
for AM335X.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
PRCM module, for example, the way module is enabled/disabled.
Although it is closer to OMAP4 architecure but the register offset
and PRCM partitions won't match, so we need to seperate API's
for AM335X.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
arch/arm/mach-omap2/omap_hwmod.c | patch | blob | history |
index 7d2d3a6765be6bb318c94cfecf2dcee9b8bde0c9..128cc4d2d45dda08b271b680487584837926a4d2 100644 (file)
#include "cm2xxx_3xxx.h"
#include "cminst44xx.h"
+#include "cminst33xx.h"
#include "prm2xxx_3xxx.h"
#include "prm44xx.h"
#include "prm33xx.h"
static void _enable_module(struct omap_hwmod *oh)
{
/* The module mode does not exist prior OMAP4 */
- if (cpu_is_omap24xx() || cpu_is_omap34xx())
+ if (!cpu_is_am33xx() && (cpu_is_omap24xx() || cpu_is_omap34xx()))
return;
if (!oh->clkdm || !oh->prcm.omap4.modulemode)
pr_debug("omap_hwmod: %s: _enable_module: %d\n",
oh->name, oh->prcm.omap4.modulemode);
- omap4_cminst_module_enable(oh->prcm.omap4.modulemode,
+ if (cpu_is_am33xx())
+ am33xx_cminst_module_enable(oh->prcm.omap4.modulemode,
+ oh->clkdm->cm_inst,
+ oh->clkdm->clkdm_offs,
+ oh->prcm.omap4.clkctrl_offs);
+ else
+ omap4_cminst_module_enable(oh->prcm.omap4.modulemode,
oh->clkdm->prcm_partition,
oh->clkdm->cm_inst,
oh->clkdm->clkdm_offs,
int v;
/* The module mode does not exist prior OMAP4 */
- if (!cpu_is_omap44xx())
+ if (!cpu_is_omap44xx() && !cpu_is_am33xx())
return -EINVAL;
if (!oh->clkdm || !oh->prcm.omap4.modulemode)
pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
- omap4_cminst_module_disable(oh->clkdm->prcm_partition,
+ if (cpu_is_am33xx())
+ am33xx_cminst_module_disable(oh->clkdm->cm_inst,
+ oh->clkdm->clkdm_offs,
+ oh->prcm.omap4.clkctrl_offs);
+ else
+ omap4_cminst_module_disable(oh->clkdm->prcm_partition,
oh->clkdm->cm_inst,
oh->clkdm->clkdm_offs,
oh->prcm.omap4.clkctrl_offs);