diff options
author | Tero Kristo <t-kristo@ti.com> | 2014-10-27 11:39:24 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-10-27 11:39:24 -0400 |
commit | 128603f05af371acc09e4cfd9124388f1b3e2966 (patch) | |
tree | 73f6800d7fdd87c96f1ac26f3205f60d92a4347d /arch/arm/mach-omap2/omap_hwmod.c | |
parent | f2650d6e4fb797b436af5999ea89aa279712544b (diff) |
ARM: OMAP2+: CM: add common APIs for cm_module_enable/disable
Adds a generic CM driver API for enabling/disabling modules.
The SoC specific implementations are registered through cm_ll_data.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 03a42b37ef18..a8f57ef1e1d4 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -979,11 +979,9 @@ static void _omap4_enable_module(struct omap_hwmod *oh) | |||
979 | pr_debug("omap_hwmod: %s: %s: %d\n", | 979 | pr_debug("omap_hwmod: %s: %s: %d\n", |
980 | oh->name, __func__, oh->prcm.omap4.modulemode); | 980 | oh->name, __func__, oh->prcm.omap4.modulemode); |
981 | 981 | ||
982 | omap4_cminst_module_enable(oh->prcm.omap4.modulemode, | 982 | omap_cm_module_enable(oh->prcm.omap4.modulemode, |
983 | oh->clkdm->prcm_partition, | 983 | oh->clkdm->prcm_partition, |
984 | oh->clkdm->cm_inst, | 984 | oh->clkdm->cm_inst, oh->prcm.omap4.clkctrl_offs); |
985 | oh->clkdm->clkdm_offs, | ||
986 | oh->prcm.omap4.clkctrl_offs); | ||
987 | } | 985 | } |
988 | 986 | ||
989 | /** | 987 | /** |
@@ -1001,9 +999,8 @@ static void _am33xx_enable_module(struct omap_hwmod *oh) | |||
1001 | pr_debug("omap_hwmod: %s: %s: %d\n", | 999 | pr_debug("omap_hwmod: %s: %s: %d\n", |
1002 | oh->name, __func__, oh->prcm.omap4.modulemode); | 1000 | oh->name, __func__, oh->prcm.omap4.modulemode); |
1003 | 1001 | ||
1004 | am33xx_cm_module_enable(oh->prcm.omap4.modulemode, oh->clkdm->cm_inst, | 1002 | omap_cm_module_enable(oh->prcm.omap4.modulemode, 0, oh->clkdm->cm_inst, |
1005 | oh->clkdm->clkdm_offs, | 1003 | oh->prcm.omap4.clkctrl_offs); |
1006 | oh->prcm.omap4.clkctrl_offs); | ||
1007 | } | 1004 | } |
1008 | 1005 | ||
1009 | /** | 1006 | /** |
@@ -1857,10 +1854,8 @@ static int _omap4_disable_module(struct omap_hwmod *oh) | |||
1857 | 1854 | ||
1858 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); | 1855 | pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__); |
1859 | 1856 | ||
1860 | omap4_cminst_module_disable(oh->clkdm->prcm_partition, | 1857 | omap_cm_module_disable(oh->clkdm->prcm_partition, oh->clkdm->cm_inst, |
1861 | oh->clkdm->cm_inst, | 1858 | oh->prcm.omap4.clkctrl_offs); |
1862 | oh->clkdm->clkdm_offs, | ||
1863 | oh->prcm.omap4.clkctrl_offs); | ||
1864 | 1859 | ||
1865 | v = _omap4_wait_target_disable(oh); | 1860 | v = _omap4_wait_target_disable(oh); |
1866 | if (v) | 1861 | if (v) |
@@ -1889,8 +1884,8 @@ static int _am33xx_disable_module(struct omap_hwmod *oh) | |||
1889 | if (_are_any_hardreset_lines_asserted(oh)) | 1884 | if (_are_any_hardreset_lines_asserted(oh)) |
1890 | return 0; | 1885 | return 0; |
1891 | 1886 | ||
1892 | am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs, | 1887 | omap_cm_module_disable(0, oh->clkdm->cm_inst, |
1893 | oh->prcm.omap4.clkctrl_offs); | 1888 | oh->prcm.omap4.clkctrl_offs); |
1894 | 1889 | ||
1895 | v = _am33xx_wait_target_disable(oh); | 1890 | v = _am33xx_wait_target_disable(oh); |
1896 | if (v) | 1891 | if (v) |