aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/common.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
committerTony Lindgren <tony@atomide.com>2010-02-15 11:48:53 -0500
commit4f2c49fedf833e522001bc51824b894732900a3d (patch)
tree3fa99c328a2acac5752edf7c91d97c10a2b6bafa /arch/arm/plat-omap/common.c
parent4e6d488af37980d224cbf298224db6173673f362 (diff)
omap: Clean the serial port defines
This way we don't have conflicts with the defines with compiling in multiple omaps. Set the addresses for uarts in struct omap_globals for the early serial init code. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/common.c')
-rw-r--r--arch/arm/plat-omap/common.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index bf1eaf3a27d4..dddce037ab12 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -34,6 +34,7 @@
34#include <plat/control.h> 34#include <plat/control.h>
35#include <plat/mux.h> 35#include <plat/mux.h>
36#include <plat/fpga.h> 36#include <plat/fpga.h>
37#include <plat/serial.h>
37 38
38#include <plat/clock.h> 39#include <plat/clock.h>
39 40
@@ -219,6 +220,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
219 omap2_set_globals_sdrc(omap2_globals); 220 omap2_set_globals_sdrc(omap2_globals);
220 omap2_set_globals_control(omap2_globals); 221 omap2_set_globals_control(omap2_globals);
221 omap2_set_globals_prcm(omap2_globals); 222 omap2_set_globals_prcm(omap2_globals);
223 omap2_set_globals_uart(omap2_globals);
222} 224}
223 225
224#endif 226#endif
@@ -233,6 +235,9 @@ static struct omap_globals omap242x_globals = {
233 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE), 235 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE),
234 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE), 236 .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE),
235 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), 237 .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE),
238 .uart1_phys = OMAP2_UART1_BASE,
239 .uart2_phys = OMAP2_UART2_BASE,
240 .uart3_phys = OMAP2_UART3_BASE,
236}; 241};
237 242
238void __init omap2_set_globals_242x(void) 243void __init omap2_set_globals_242x(void)
@@ -251,6 +256,9 @@ static struct omap_globals omap243x_globals = {
251 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), 256 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE),
252 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE), 257 .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE),
253 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), 258 .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE),
259 .uart1_phys = OMAP2_UART1_BASE,
260 .uart2_phys = OMAP2_UART2_BASE,
261 .uart3_phys = OMAP2_UART3_BASE,
254}; 262};
255 263
256void __init omap2_set_globals_243x(void) 264void __init omap2_set_globals_243x(void)
@@ -259,9 +267,9 @@ void __init omap2_set_globals_243x(void)
259} 267}
260#endif 268#endif
261 269
262#if defined(CONFIG_ARCH_OMAP3430) 270#if defined(CONFIG_ARCH_OMAP3)
263 271
264static struct omap_globals omap343x_globals = { 272static struct omap_globals omap3_globals = {
265 .class = OMAP343X_CLASS, 273 .class = OMAP343X_CLASS,
266 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), 274 .tap = OMAP2_L4_IO_ADDRESS(0x4830A000),
267 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), 275 .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
@@ -269,11 +277,21 @@ static struct omap_globals omap343x_globals = {
269 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), 277 .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE),
270 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE), 278 .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE),
271 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), 279 .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
280 .uart1_phys = OMAP3_UART1_BASE,
281 .uart2_phys = OMAP3_UART2_BASE,
282 .uart3_phys = OMAP3_UART3_BASE,
272}; 283};
273 284
274void __init omap2_set_globals_343x(void) 285void __init omap2_set_globals_343x(void)
275{ 286{
276 __omap2_set_globals(&omap343x_globals); 287 __omap2_set_globals(&omap3_globals);
288}
289
290void __init omap2_set_globals_36xx(void)
291{
292 omap3_globals.uart4_phys = OMAP3_UART4_BASE;
293
294 __omap2_set_globals(&omap3_globals);
277} 295}
278#endif 296#endif
279 297
@@ -285,6 +303,10 @@ static struct omap_globals omap4_globals = {
285 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), 303 .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
286 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), 304 .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
287 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), 305 .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
306 .uart1_phys = OMAP4_UART1_BASE,
307 .uart2_phys = OMAP4_UART2_BASE,
308 .uart3_phys = OMAP4_UART3_BASE,
309 .uart4_phys = OMAP4_UART4_BASE,
288}; 310};
289 311
290void __init omap2_set_globals_443x(void) 312void __init omap2_set_globals_443x(void)
@@ -292,6 +314,7 @@ void __init omap2_set_globals_443x(void)
292 omap2_set_globals_tap(&omap4_globals); 314 omap2_set_globals_tap(&omap4_globals);
293 omap2_set_globals_control(&omap4_globals); 315 omap2_set_globals_control(&omap4_globals);
294 omap2_set_globals_prcm(&omap4_globals); 316 omap2_set_globals_prcm(&omap4_globals);
317 omap2_set_globals_uart(&omap4_globals);
295} 318}
296#endif 319#endif
297 320