summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cm_common.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2017-08-04 17:37:45 +0300
committerTero Kristo <t-kristo@ti.com>2017-12-04 11:35:20 +0200
commit5fa4a3cc5853928b6d66001039b0479641b00bd6 (patch)
tree183f24df333e26be2f63bf1e95e8d4ab363f1069 /arch/arm/mach-omap2/cm_common.c
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
downloadlinux-5fa4a3cc5853928b6d66001039b0479641b00bd6.tar.bz2
ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register
Add a new CM API for fetching the physical address of a hwmod clkctrl register. This is needed to map omap hwmods against clkctrl clocks, the existing support for clkdm address translation was not sufficient to handle the mutant cases where the clockdomain offset is completely off from the clkctrl ones. Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/cm_common.c')
-rw-r--r--arch/arm/mach-omap2/cm_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c
index d555791cf349..1752e92e77c6 100644
--- a/arch/arm/mach-omap2/cm_common.c
+++ b/arch/arm/mach-omap2/cm_common.c
@@ -175,6 +175,16 @@ int omap_cm_module_disable(u8 part, u16 inst, u16 clkctrl_offs)
return 0;
}
+u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs)
+{
+ if (!cm_ll_data->xlate_clkctrl) {
+ WARN_ONCE(1, "cm: %s: no low-level function defined\n",
+ __func__);
+ return 0;
+ }
+ return cm_ll_data->xlate_clkctrl(part, inst, clkctrl_offs);
+}
+
/**
* cm_register - register per-SoC low-level data with the CM
* @cld: low-level per-SoC OMAP CM data & function pointers to register