From 5fa4a3cc5853928b6d66001039b0479641b00bd6 Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Fri, 4 Aug 2017 17:37:45 +0300 Subject: 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 --- arch/arm/mach-omap2/cm_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-omap2/cm_common.c') 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 -- cgit v1.2.3