diff options
author | Tero Kristo <t-kristo@ti.com> | 2017-08-09 04:55:49 -0400 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2017-12-04 04:35:21 -0500 |
commit | 85ab016cc3b76e529726605d9149f1f1c31ae9ba (patch) | |
tree | 9843469365a46a33976187adb15128f2f72ae96e | |
parent | 17d56e80f1afcd779909224265dcd3a2bb20d6c7 (diff) |
ARM: AM33xx: CM: add support for getting physical address for a register
Needed for mapping the hwmods towards their corresponding clkctrl
providers and clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/cm33xx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index a9e08d89104e..cf75bbe6eec2 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c | |||
@@ -333,6 +333,11 @@ static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm) | |||
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
335 | 335 | ||
336 | static u32 am33xx_cm_xlate_clkctrl(u8 part, u16 inst, u16 offset) | ||
337 | { | ||
338 | return cm_base.pa + inst + offset; | ||
339 | } | ||
340 | |||
336 | struct clkdm_ops am33xx_clkdm_operations = { | 341 | struct clkdm_ops am33xx_clkdm_operations = { |
337 | .clkdm_sleep = am33xx_clkdm_sleep, | 342 | .clkdm_sleep = am33xx_clkdm_sleep, |
338 | .clkdm_wakeup = am33xx_clkdm_wakeup, | 343 | .clkdm_wakeup = am33xx_clkdm_wakeup, |
@@ -347,6 +352,7 @@ static struct cm_ll_data am33xx_cm_ll_data = { | |||
347 | .wait_module_idle = &am33xx_cm_wait_module_idle, | 352 | .wait_module_idle = &am33xx_cm_wait_module_idle, |
348 | .module_enable = &am33xx_cm_module_enable, | 353 | .module_enable = &am33xx_cm_module_enable, |
349 | .module_disable = &am33xx_cm_module_disable, | 354 | .module_disable = &am33xx_cm_module_disable, |
355 | .xlate_clkctrl = &am33xx_cm_xlate_clkctrl, | ||
350 | }; | 356 | }; |
351 | 357 | ||
352 | int __init am33xx_cm_init(const struct omap_prcm_init_data *data) | 358 | int __init am33xx_cm_init(const struct omap_prcm_init_data *data) |