From b6a4226c14001b0aa20b11c69190cb89d2237d3d Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Mon, 29 Oct 2012 20:50:21 -0600 Subject: ARM: OMAP2+: common: remove mach-omap2/common.c globals and map_common_io code Get rid of the mach-omap2/common.c globals by moving the global initialization for IP block addresses that must occur early into mach-omap2/io.c. In the process, remove the *_map_common_io*() and SoC-specific *set_globals* functions. Signed-off-by: Paul Walmsley Tested-by: Vaibhav Hiremath --- arch/arm/mach-omap2/common.h | 112 +++++-------------------------------------- 1 file changed, 12 insertions(+), 100 deletions(-) (limited to 'arch/arm/mach-omap2/common.h') diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index c925c805969f..ed21815edd4b 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -43,54 +43,6 @@ #define OMAP_INTC_START NR_IRQS -#ifdef CONFIG_SOC_OMAP2420 -extern void omap242x_map_common_io(void); -#else -static inline void omap242x_map_common_io(void) -{ -} -#endif - -#ifdef CONFIG_SOC_OMAP2430 -extern void omap243x_map_common_io(void); -#else -static inline void omap243x_map_common_io(void) -{ -} -#endif - -#ifdef CONFIG_ARCH_OMAP3 -extern void omap34xx_map_common_io(void); -#else -static inline void omap34xx_map_common_io(void) -{ -} -#endif - -#ifdef CONFIG_SOC_TI81XX -extern void omapti81xx_map_common_io(void); -#else -static inline void omapti81xx_map_common_io(void) -{ -} -#endif - -#ifdef CONFIG_SOC_AM33XX -extern void omapam33xx_map_common_io(void); -#else -static inline void omapam33xx_map_common_io(void) -{ -} -#endif - -#ifdef CONFIG_ARCH_OMAP4 -extern void omap44xx_map_common_io(void); -#else -static inline void omap44xx_map_common_io(void) -{ -} -#endif - #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2) int omap2_pm_init(void); #else @@ -127,14 +79,6 @@ static inline int omap_mux_late_init(void) } #endif -#ifdef CONFIG_SOC_OMAP5 -extern void omap5_map_common_io(void); -#else -static inline void omap5_map_common_io(void) -{ -} -#endif - extern void omap2_init_common_infrastructure(void); extern struct sys_timer omap2_timer; @@ -169,50 +113,18 @@ void omap4430_init_late(void); int omap2_common_pm_late_init(void); void omap_prcm_restart(char, const char *); -/* - * IO bases for various OMAP processors - * Except the tap base, rest all the io bases - * listed are physical addresses. - */ -struct omap_globals { - u32 class; /* OMAP class to detect */ - void __iomem *tap; /* Control module ID code */ - void __iomem *sdrc; /* SDRAM Controller */ - void __iomem *sms; /* SDRAM Memory Scheduler */ - void __iomem *ctrl; /* System Control Module */ - void __iomem *ctrl_pad; /* PAD Control Module */ - void __iomem *prm; /* Power and Reset Management */ - void __iomem *cm; /* Clock Management */ - void __iomem *cm2; - void __iomem *prcm_mpu; -}; - -void omap2_set_globals_242x(void); -void omap2_set_globals_243x(void); -void omap2_set_globals_3xxx(void); -void omap2_set_globals_443x(void); -void omap2_set_globals_5xxx(void); -void omap2_set_globals_ti81xx(void); -void omap2_set_globals_am33xx(void); - -/* These get called from omap2_set_globals_xxxx(), do not call these */ -void omap2_set_globals_tap(struct omap_globals *); -#if defined(CONFIG_SOC_HAS_OMAP2_SDRC) -void omap2_set_globals_sdrc(struct omap_globals *); -#else -static inline void omap2_set_globals_sdrc(struct omap_globals *omap2_globals) -{ } -#endif -void omap2_set_globals_control(struct omap_globals *); -void omap2_set_globals_prcm(struct omap_globals *); - -void omap242x_map_io(void); -void omap243x_map_io(void); -void omap3_map_io(void); -void am33xx_map_io(void); -void omap4_map_io(void); -void omap5_map_io(void); -void ti81xx_map_io(void); +/* This gets called from mach-omap2/io.c, do not call this */ +void __init omap2_set_globals_tap(u32 class, void __iomem *tap); + +void __init omap242x_map_io(void); +void __init omap243x_map_io(void); +void __init omap3_map_io(void); +void __init am33xx_map_io(void); +void __init omap4_map_io(void); +void __init omap5_map_io(void); +void __init ti81xx_map_io(void); + +/* omap_barriers_init() is OMAP4 only */ void omap_barriers_init(void); /** -- cgit From 2f334a3896714b47e24cc4cd08eed11d1a7f0d8e Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Mon, 29 Oct 2012 20:56:07 -0600 Subject: ARM: OMAP2+: PRCM: create SoC-specific chip restart functions Split omap_prcm_restart() from mach-omap2/prcm.c into SoC-specific variants. These functions need to be able to save the reboot reason into the scratchpad RAM. This implies a dependency on both the PRM and SCM IP blocks, so they've been moved into their own file. This will eventually call functions in the PRM and SCM drivers, once those are created. Vaibhav Hiremath identified an unused prototype in the first version of this patch - now removed. Tony Lindgren noted a compile problem with some RMK Kconfigs; resolved in this patch. Signed-off-by: Paul Walmsley Cc: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Cc: Tony Lindgren --- arch/arm/mach-omap2/common.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arch/arm/mach-omap2/common.h') diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index ed21815edd4b..349d0153791b 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -113,6 +113,30 @@ void omap4430_init_late(void); int omap2_common_pm_late_init(void); void omap_prcm_restart(char, const char *); +#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) +void omap2xxx_restart(char mode, const char *cmd); +#else +static inline void omap2xxx_restart(char mode, const char *cmd) +{ +} +#endif + +#ifdef CONFIG_ARCH_OMAP3 +void omap3xxx_restart(char mode, const char *cmd); +#else +static inline void omap3xxx_restart(char mode, const char *cmd) +{ +} +#endif + +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) +void omap44xx_restart(char mode, const char *cmd); +#else +static inline void omap44xx_restart(char mode, const char *cmd) +{ +} +#endif + /* This gets called from mach-omap2/io.c, do not call this */ void __init omap2_set_globals_tap(u32 class, void __iomem *tap); -- cgit From 187e3e06e8d7050a77c3208f54edff1e1bfae31d Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Mon, 29 Oct 2012 20:56:12 -0600 Subject: ARM: OMAP2+: board files: use SoC-specific system restart functions Modify the board files to use the SoC-specific system restart functions. At this point it's possible to remove omap_prcm_restart() from mach-omap2/prcm.c. While removing the prototypes for the now-unused restart functions, clean up a few more obsolete prototypes in mach-omap2/clock.h. Signed-off-by: Paul Walmsley Tested-by: Vaibhav Hiremath --- arch/arm/mach-omap2/common.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-omap2/common.h') diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 349d0153791b..c57eeeac7d11 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -111,7 +111,6 @@ void am35xx_init_late(void); void ti81xx_init_late(void); void omap4430_init_late(void); int omap2_common_pm_late_init(void); -void omap_prcm_restart(char, const char *); #if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) void omap2xxx_restart(char mode, const char *cmd); -- cgit From 26f01998b0657a61167a819f1c37cb9f9e9d674b Mon Sep 17 00:00:00 2001 From: Igor Grinberg Date: Sun, 18 Nov 2012 17:06:41 +0200 Subject: ARM: OMAP3: cm-t3517: use GPTIMER for system clock cm-t3517 starting from revision 1.2 does not have the 32K oscilator wired to the AM3517 SoC. Therefore switch to use the GPTIMER for system clock. Signed-off-by: Igor Grinberg Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-omap2/common.h') diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 426fcfcfd821..3f781d245cc6 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -138,6 +138,7 @@ extern void omap2_init_common_infrastructure(void); extern struct sys_timer omap2_timer; extern struct sys_timer omap3_timer; extern struct sys_timer omap3_secure_timer; +extern struct sys_timer omap3_gp_timer; extern struct sys_timer omap3_am33xx_timer; extern struct sys_timer omap4_timer; extern struct sys_timer omap5_timer; -- cgit