aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-12-16 11:20:54 -0500
committerMichael Turquette <mturquette@linaro.org>2015-01-30 13:55:23 -0500
commit3dbb048b7c49d1b9030c34c62410c1c5fcf4c4b4 (patch)
treef1c8936c540103f766933d1fae7cc7deb3033d28 /arch/arm/mach-omap2
parent74807dffcdd72bb4c0786214e8486ef9bb088156 (diff)
ARM: OMAP3: PRM: add support for legacy iomapping init
As the legacy clock data is being moved under clock driver, the clock data will be using the same low level infrastructure for register accesses. This requires the clk_memmaps to be initialized properly. This patch adds a support hook to the PRM driver to initialize the mappings. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/prm.h1
-rw-r--r--arch/arm/mach-omap2/prm_common.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h
index 77752e49d8d4..b9061a6a2db8 100644
--- a/arch/arm/mach-omap2/prm.h
+++ b/arch/arm/mach-omap2/prm.h
@@ -20,6 +20,7 @@ extern void __iomem *prm_base;
20extern u16 prm_features; 20extern u16 prm_features;
21extern void omap2_set_globals_prm(void __iomem *prm); 21extern void omap2_set_globals_prm(void __iomem *prm);
22int of_prcm_init(void); 22int of_prcm_init(void);
23void omap3_prcm_legacy_iomaps_init(void);
23# endif 24# endif
24 25
25/* 26/*
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 779940cb6e56..542dd9dbd035 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -35,6 +35,8 @@
35#include "prm44xx.h" 35#include "prm44xx.h"
36#include "common.h" 36#include "common.h"
37#include "clock.h" 37#include "clock.h"
38#include "cm.h"
39#include "control.h"
38 40
39/* 41/*
40 * OMAP_PRCM_MAX_NR_PENDING_REG: maximum number of PRM_IRQ*_MPU regs 42 * OMAP_PRCM_MAX_NR_PENDING_REG: maximum number of PRM_IRQ*_MPU regs
@@ -627,6 +629,15 @@ int __init of_prcm_init(void)
627 return 0; 629 return 0;
628} 630}
629 631
632void __init omap3_prcm_legacy_iomaps_init(void)
633{
634 ti_clk_ll_ops = &omap_clk_ll_ops;
635
636 clk_memmaps[TI_CLKM_CM] = cm_base + OMAP3430_IVA2_MOD;
637 clk_memmaps[TI_CLKM_PRM] = prm_base + OMAP3430_IVA2_MOD;
638 clk_memmaps[TI_CLKM_SCRM] = omap_ctrl_base_get();
639}
640
630static int __init prm_late_init(void) 641static int __init prm_late_init(void)
631{ 642{
632 if (prm_ll_data->late_init) 643 if (prm_ll_data->late_init)