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>
This commit is contained in:
Tero Kristo
2017-08-04 17:37:45 +03:00
parent 4fbd8d194f
commit 5fa4a3cc58
2 changed files with 13 additions and 0 deletions

View File

@@ -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