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>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <plat/control.h>
|
||||
#include <plat/mux.h>
|
||||
#include <plat/fpga.h>
|
||||
#include <plat/serial.h>
|
||||
|
||||
#include <plat/clock.h>
|
||||
|
||||
@@ -219,6 +220,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
|
||||
omap2_set_globals_sdrc(omap2_globals);
|
||||
omap2_set_globals_control(omap2_globals);
|
||||
omap2_set_globals_prcm(omap2_globals);
|
||||
omap2_set_globals_uart(omap2_globals);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -233,6 +235,9 @@ static struct omap_globals omap242x_globals = {
|
||||
.ctrl = OMAP2_L4_IO_ADDRESS(OMAP2420_CTRL_BASE),
|
||||
.prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE),
|
||||
.cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE),
|
||||
.uart1_phys = OMAP2_UART1_BASE,
|
||||
.uart2_phys = OMAP2_UART2_BASE,
|
||||
.uart3_phys = OMAP2_UART3_BASE,
|
||||
};
|
||||
|
||||
void __init omap2_set_globals_242x(void)
|
||||
@@ -251,6 +256,9 @@ static struct omap_globals omap243x_globals = {
|
||||
.ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE),
|
||||
.prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE),
|
||||
.cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE),
|
||||
.uart1_phys = OMAP2_UART1_BASE,
|
||||
.uart2_phys = OMAP2_UART2_BASE,
|
||||
.uart3_phys = OMAP2_UART3_BASE,
|
||||
};
|
||||
|
||||
void __init omap2_set_globals_243x(void)
|
||||
@@ -259,9 +267,9 @@ void __init omap2_set_globals_243x(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3430)
|
||||
#if defined(CONFIG_ARCH_OMAP3)
|
||||
|
||||
static struct omap_globals omap343x_globals = {
|
||||
static struct omap_globals omap3_globals = {
|
||||
.class = OMAP343X_CLASS,
|
||||
.tap = OMAP2_L4_IO_ADDRESS(0x4830A000),
|
||||
.sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE),
|
||||
@@ -269,11 +277,21 @@ static struct omap_globals omap343x_globals = {
|
||||
.ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE),
|
||||
.prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE),
|
||||
.cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE),
|
||||
.uart1_phys = OMAP3_UART1_BASE,
|
||||
.uart2_phys = OMAP3_UART2_BASE,
|
||||
.uart3_phys = OMAP3_UART3_BASE,
|
||||
};
|
||||
|
||||
void __init omap2_set_globals_343x(void)
|
||||
{
|
||||
__omap2_set_globals(&omap343x_globals);
|
||||
__omap2_set_globals(&omap3_globals);
|
||||
}
|
||||
|
||||
void __init omap2_set_globals_36xx(void)
|
||||
{
|
||||
omap3_globals.uart4_phys = OMAP3_UART4_BASE;
|
||||
|
||||
__omap2_set_globals(&omap3_globals);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -285,6 +303,10 @@ static struct omap_globals omap4_globals = {
|
||||
.prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
|
||||
.cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE),
|
||||
.cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE),
|
||||
.uart1_phys = OMAP4_UART1_BASE,
|
||||
.uart2_phys = OMAP4_UART2_BASE,
|
||||
.uart3_phys = OMAP4_UART3_BASE,
|
||||
.uart4_phys = OMAP4_UART4_BASE,
|
||||
};
|
||||
|
||||
void __init omap2_set_globals_443x(void)
|
||||
@@ -292,6 +314,7 @@ void __init omap2_set_globals_443x(void)
|
||||
omap2_set_globals_tap(&omap4_globals);
|
||||
omap2_set_globals_control(&omap4_globals);
|
||||
omap2_set_globals_prcm(&omap4_globals);
|
||||
omap2_set_globals_uart(&omap4_globals);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user