diff options
author | Tero Kristo <t-kristo@ti.com> | 2015-02-20 03:08:52 -0500 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2015-03-31 14:26:58 -0400 |
commit | efde234674d9db08b762d9faef4dbbaa2eba3a2e (patch) | |
tree | 8ee5483eeca28398f39d526d3438b4678f4b56b5 | |
parent | 23d34981c7e36fb609d3eaacf0a52a05d75ae008 (diff) |
ARM: OMAP4+: control: remove support for legacy pad read/write
omap4_ctrl_pad_readl/writel are no longer used by anybody, so remove
these. Syscon / pinctrl should be used to access the padconf area
instead.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/control.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-omap2/control.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 11 |
3 files changed, 6 insertions, 34 deletions
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 404778449ef7..c8565d3dbefe 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c | |||
@@ -36,7 +36,6 @@ | |||
36 | 36 | ||
37 | static void __iomem *omap2_ctrl_base; | 37 | static void __iomem *omap2_ctrl_base; |
38 | static s16 omap2_ctrl_offset; | 38 | static s16 omap2_ctrl_offset; |
39 | static void __iomem *omap4_ctrl_pad_base; | ||
40 | static struct regmap *omap2_ctrl_syscon; | 39 | static struct regmap *omap2_ctrl_syscon; |
41 | 40 | ||
42 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | 41 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) |
@@ -139,13 +138,9 @@ struct omap3_control_regs { | |||
139 | static struct omap3_control_regs control_context; | 138 | static struct omap3_control_regs control_context; |
140 | #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ | 139 | #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ |
141 | 140 | ||
142 | #define OMAP4_CTRL_PAD_REGADDR(reg) (omap4_ctrl_pad_base + (reg)) | 141 | void __init omap2_set_globals_control(void __iomem *ctrl) |
143 | |||
144 | void __init omap2_set_globals_control(void __iomem *ctrl, | ||
145 | void __iomem *ctrl_pad) | ||
146 | { | 142 | { |
147 | omap2_ctrl_base = ctrl; | 143 | omap2_ctrl_base = ctrl; |
148 | omap4_ctrl_pad_base = ctrl_pad; | ||
149 | } | 144 | } |
150 | 145 | ||
151 | u8 omap_ctrl_readb(u16 offset) | 146 | u8 omap_ctrl_readb(u16 offset) |
@@ -218,23 +213,6 @@ void omap_ctrl_writel(u32 val, u16 offset) | |||
218 | val); | 213 | val); |
219 | } | 214 | } |
220 | 215 | ||
221 | /* | ||
222 | * On OMAP4 control pad are not addressable from control | ||
223 | * core base. So the common omap_ctrl_read/write APIs breaks | ||
224 | * Hence export separate APIs to manage the omap4 pad control | ||
225 | * registers. This APIs will work only for OMAP4 | ||
226 | */ | ||
227 | |||
228 | u32 omap4_ctrl_pad_readl(u16 offset) | ||
229 | { | ||
230 | return readl_relaxed(OMAP4_CTRL_PAD_REGADDR(offset)); | ||
231 | } | ||
232 | |||
233 | void omap4_ctrl_pad_writel(u32 val, u16 offset) | ||
234 | { | ||
235 | writel_relaxed(val, OMAP4_CTRL_PAD_REGADDR(offset)); | ||
236 | } | ||
237 | |||
238 | #ifdef CONFIG_ARCH_OMAP3 | 216 | #ifdef CONFIG_ARCH_OMAP3 |
239 | 217 | ||
240 | /** | 218 | /** |
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index 5353ff45bf83..80d2b7d8e36e 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -443,11 +443,9 @@ | |||
443 | extern u8 omap_ctrl_readb(u16 offset); | 443 | extern u8 omap_ctrl_readb(u16 offset); |
444 | extern u16 omap_ctrl_readw(u16 offset); | 444 | extern u16 omap_ctrl_readw(u16 offset); |
445 | extern u32 omap_ctrl_readl(u16 offset); | 445 | extern u32 omap_ctrl_readl(u16 offset); |
446 | extern u32 omap4_ctrl_pad_readl(u16 offset); | ||
447 | extern void omap_ctrl_writeb(u8 val, u16 offset); | 446 | extern void omap_ctrl_writeb(u8 val, u16 offset); |
448 | extern void omap_ctrl_writew(u16 val, u16 offset); | 447 | extern void omap_ctrl_writew(u16 val, u16 offset); |
449 | extern void omap_ctrl_writel(u32 val, u16 offset); | 448 | extern void omap_ctrl_writel(u32 val, u16 offset); |
450 | extern void omap4_ctrl_pad_writel(u32 val, u16 offset); | ||
451 | 449 | ||
452 | extern void omap3_save_scratchpad_contents(void); | 450 | extern void omap3_save_scratchpad_contents(void); |
453 | extern void omap3_clear_scratchpad_contents(void); | 451 | extern void omap3_clear_scratchpad_contents(void); |
@@ -465,8 +463,7 @@ extern int omap3_ctrl_save_padconf(void); | |||
465 | void omap3_ctrl_init(void); | 463 | void omap3_ctrl_init(void); |
466 | int omap2_control_base_init(void); | 464 | int omap2_control_base_init(void); |
467 | int omap_control_init(void); | 465 | int omap_control_init(void); |
468 | extern void omap2_set_globals_control(void __iomem *ctrl, | 466 | void omap2_set_globals_control(void __iomem *ctrl); |
469 | void __iomem *ctrl_pad); | ||
470 | void __init omap3_control_legacy_iomap_init(void); | 467 | void __init omap3_control_legacy_iomap_init(void); |
471 | #else | 468 | #else |
472 | #define omap_ctrl_readb(x) 0 | 469 | #define omap_ctrl_readb(x) 0 |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index c3fa739ab4c8..6c39cc0caebc 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -443,7 +443,7 @@ void __init omap3_init_early(void) | |||
443 | /* XXX: remove these once OMAP3 is DT only */ | 443 | /* XXX: remove these once OMAP3 is DT only */ |
444 | if (!of_have_populated_dt()) { | 444 | if (!of_have_populated_dt()) { |
445 | omap2_set_globals_control( | 445 | omap2_set_globals_control( |
446 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), NULL); | 446 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE)); |
447 | omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE)); | 447 | omap2_set_globals_prm(OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE)); |
448 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), | 448 | omap2_set_globals_cm(OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), |
449 | NULL); | 449 | NULL); |
@@ -631,8 +631,7 @@ void __init omap4430_init_early(void) | |||
631 | { | 631 | { |
632 | omap2_set_globals_tap(OMAP443X_CLASS, | 632 | omap2_set_globals_tap(OMAP443X_CLASS, |
633 | OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); | 633 | OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); |
634 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | 634 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); |
635 | OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE)); | ||
636 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); | 635 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); |
637 | omap4xxx_check_revision(); | 636 | omap4xxx_check_revision(); |
638 | omap4xxx_check_features(); | 637 | omap4xxx_check_features(); |
@@ -660,8 +659,7 @@ void __init omap5_init_early(void) | |||
660 | { | 659 | { |
661 | omap2_set_globals_tap(OMAP54XX_CLASS, | 660 | omap2_set_globals_tap(OMAP54XX_CLASS, |
662 | OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); | 661 | OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); |
663 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE), | 662 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); |
664 | OMAP2_L4_IO_ADDRESS(OMAP54XX_CTRL_BASE)); | ||
665 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); | 663 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); |
666 | omap4_pm_init_early(); | 664 | omap4_pm_init_early(); |
667 | omap2_prcm_base_init(); | 665 | omap2_prcm_base_init(); |
@@ -686,8 +684,7 @@ void __init omap5_init_late(void) | |||
686 | void __init dra7xx_init_early(void) | 684 | void __init dra7xx_init_early(void) |
687 | { | 685 | { |
688 | omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); | 686 | omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); |
689 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE), | 687 | omap2_set_globals_control(OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); |
690 | OMAP2_L4_IO_ADDRESS(DRA7XX_CTRL_BASE)); | ||
691 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); | 688 | omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); |
692 | omap4_pm_init_early(); | 689 | omap4_pm_init_early(); |
693 | omap2_prcm_base_init(); | 690 | omap2_prcm_base_init(); |