aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/common.h')
-rw-r--r--arch/arm/mach-omap2/common.h151
1 files changed, 49 insertions, 102 deletions
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 7045e4d61ac3..948bcaa82eb6 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -28,63 +28,18 @@
28 28
29#include <linux/irq.h> 29#include <linux/irq.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/i2c.h>
31#include <linux/i2c/twl.h> 32#include <linux/i2c/twl.h>
33#include <linux/i2c-omap.h>
32 34
33#include <asm/proc-fns.h> 35#include <asm/proc-fns.h>
34 36
35#include <plat/cpu.h> 37#include "i2c.h"
36#include <plat/serial.h> 38#include "serial.h"
37#include <plat/common.h>
38 39
39#define OMAP_INTC_START NR_IRQS 40#include "usb.h"
40
41#ifdef CONFIG_SOC_OMAP2420
42extern void omap242x_map_common_io(void);
43#else
44static inline void omap242x_map_common_io(void)
45{
46}
47#endif
48
49#ifdef CONFIG_SOC_OMAP2430
50extern void omap243x_map_common_io(void);
51#else
52static inline void omap243x_map_common_io(void)
53{
54}
55#endif
56
57#ifdef CONFIG_ARCH_OMAP3
58extern void omap34xx_map_common_io(void);
59#else
60static inline void omap34xx_map_common_io(void)
61{
62}
63#endif
64
65#ifdef CONFIG_SOC_TI81XX
66extern void omapti81xx_map_common_io(void);
67#else
68static inline void omapti81xx_map_common_io(void)
69{
70}
71#endif
72 41
73#ifdef CONFIG_SOC_AM33XX 42#define OMAP_INTC_START NR_IRQS
74extern void omapam33xx_map_common_io(void);
75#else
76static inline void omapam33xx_map_common_io(void)
77{
78}
79#endif
80
81#ifdef CONFIG_ARCH_OMAP4
82extern void omap44xx_map_common_io(void);
83#else
84static inline void omap44xx_map_common_io(void)
85{
86}
87#endif
88 43
89#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2) 44#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP2)
90int omap2_pm_init(void); 45int omap2_pm_init(void);
@@ -122,19 +77,12 @@ static inline int omap_mux_late_init(void)
122} 77}
123#endif 78#endif
124 79
125#ifdef CONFIG_SOC_OMAP5
126extern void omap5_map_common_io(void);
127#else
128static inline void omap5_map_common_io(void)
129{
130}
131#endif
132
133extern void omap2_init_common_infrastructure(void); 80extern void omap2_init_common_infrastructure(void);
134 81
135extern struct sys_timer omap2_timer; 82extern struct sys_timer omap2_timer;
136extern struct sys_timer omap3_timer; 83extern struct sys_timer omap3_timer;
137extern struct sys_timer omap3_secure_timer; 84extern struct sys_timer omap3_secure_timer;
85extern struct sys_timer omap3_gp_timer;
138extern struct sys_timer omap3_am33xx_timer; 86extern struct sys_timer omap3_am33xx_timer;
139extern struct sys_timer omap4_timer; 87extern struct sys_timer omap4_timer;
140extern struct sys_timer omap5_timer; 88extern struct sys_timer omap5_timer;
@@ -162,52 +110,43 @@ void am35xx_init_late(void);
162void ti81xx_init_late(void); 110void ti81xx_init_late(void);
163void omap4430_init_late(void); 111void omap4430_init_late(void);
164int omap2_common_pm_late_init(void); 112int omap2_common_pm_late_init(void);
165void omap_prcm_restart(char, const char *);
166 113
167/* 114#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
168 * IO bases for various OMAP processors 115void omap2xxx_restart(char mode, const char *cmd);
169 * Except the tap base, rest all the io bases 116#else
170 * listed are physical addresses. 117static inline void omap2xxx_restart(char mode, const char *cmd)
171 */ 118{
172struct omap_globals { 119}
173 u32 class; /* OMAP class to detect */ 120#endif
174 void __iomem *tap; /* Control module ID code */ 121
175 void __iomem *sdrc; /* SDRAM Controller */ 122#ifdef CONFIG_ARCH_OMAP3
176 void __iomem *sms; /* SDRAM Memory Scheduler */ 123void omap3xxx_restart(char mode, const char *cmd);
177 void __iomem *ctrl; /* System Control Module */ 124#else
178 void __iomem *ctrl_pad; /* PAD Control Module */ 125static inline void omap3xxx_restart(char mode, const char *cmd)
179 void __iomem *prm; /* Power and Reset Management */ 126{
180 void __iomem *cm; /* Clock Management */ 127}
181 void __iomem *cm2; 128#endif
182 void __iomem *prcm_mpu; 129
183}; 130#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
184 131void omap44xx_restart(char mode, const char *cmd);
185void omap2_set_globals_242x(void);
186void omap2_set_globals_243x(void);
187void omap2_set_globals_3xxx(void);
188void omap2_set_globals_443x(void);
189void omap2_set_globals_5xxx(void);
190void omap2_set_globals_ti81xx(void);
191void omap2_set_globals_am33xx(void);
192
193/* These get called from omap2_set_globals_xxxx(), do not call these */
194void omap2_set_globals_tap(struct omap_globals *);
195#if defined(CONFIG_SOC_HAS_OMAP2_SDRC)
196void omap2_set_globals_sdrc(struct omap_globals *);
197#else 132#else
198static inline void omap2_set_globals_sdrc(struct omap_globals *omap2_globals) 133static inline void omap44xx_restart(char mode, const char *cmd)
199{ } 134{
135}
200#endif 136#endif
201void omap2_set_globals_control(struct omap_globals *); 137
202void omap2_set_globals_prcm(struct omap_globals *); 138/* This gets called from mach-omap2/io.c, do not call this */
203 139void __init omap2_set_globals_tap(u32 class, void __iomem *tap);
204void omap242x_map_io(void); 140
205void omap243x_map_io(void); 141void __init omap242x_map_io(void);
206void omap3_map_io(void); 142void __init omap243x_map_io(void);
207void am33xx_map_io(void); 143void __init omap3_map_io(void);
208void omap4_map_io(void); 144void __init am33xx_map_io(void);
209void omap5_map_io(void); 145void __init omap4_map_io(void);
210void ti81xx_map_io(void); 146void __init omap5_map_io(void);
147void __init ti81xx_map_io(void);
148
149/* omap_barriers_init() is OMAP4 only */
211void omap_barriers_init(void); 150void omap_barriers_init(void);
212 151
213/** 152/**
@@ -275,6 +214,9 @@ static inline void __iomem *omap4_get_scu_base(void)
275#endif 214#endif
276 215
277extern void __init gic_init_irq(void); 216extern void __init gic_init_irq(void);
217extern void gic_dist_disable(void);
218extern bool gic_dist_disabled(void);
219extern void gic_timer_retrigger(void);
278extern void omap_smc1(u32 fn, u32 arg); 220extern void omap_smc1(u32 fn, u32 arg);
279extern void __iomem *omap4_get_sar_ram_base(void); 221extern void __iomem *omap4_get_sar_ram_base(void);
280extern void omap_do_wfi(void); 222extern void omap_do_wfi(void);
@@ -282,6 +224,7 @@ extern void omap_do_wfi(void);
282#ifdef CONFIG_SMP 224#ifdef CONFIG_SMP
283/* Needed for secondary core boot */ 225/* Needed for secondary core boot */
284extern void omap_secondary_startup(void); 226extern void omap_secondary_startup(void);
227extern void omap_secondary_startup_4460(void);
285extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); 228extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);
286extern void omap_auxcoreboot_addr(u32 cpu_addr); 229extern void omap_auxcoreboot_addr(u32 cpu_addr);
287extern u32 omap_read_auxcoreboot0(void); 230extern u32 omap_read_auxcoreboot0(void);
@@ -338,6 +281,10 @@ extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
338 struct omap_sdrc_params *sdrc_cs1); 281 struct omap_sdrc_params *sdrc_cs1);
339struct omap2_hsmmc_info; 282struct omap2_hsmmc_info;
340extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers); 283extern int omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers);
284extern void omap_reserve(void);
285
286struct omap_hwmod;
287extern int omap_dss_reset(struct omap_hwmod *);
341 288
342#endif /* __ASSEMBLER__ */ 289#endif /* __ASSEMBLER__ */
343#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ 290#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */