aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/serial.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-09-03 13:14:02 -0400
committerpaul <paul@twilight.(none)>2009-09-03 13:14:02 -0400
commitb3c6df3ab2b17cd7ddf927d39a64f235b25ac8d4 (patch)
tree58d26a0b0dc5dc597519260ef04f8bff67cc4f8c /arch/arm/mach-omap2/serial.c
parent71348bcaac6f4c372525d4d62e88a82a7330435b (diff)
OMAP2/3 board-*.c files: read bootloader configuration earlier
Most board-*.c files read configuration data from the bootloader in their .init_machine() function. This needs to happen earlier, at some point before omap2_init_common_hw() is called. This is because a future patch will use the bootloader serial console port information to enable the UART clocks earlier, immediately after omap2_clk_init(). This is in turn necessary since otherwise clock tree usecounts on clocks like dpll4_m2x2_ck will be bogus, which can cause the currently-active console UART clock to be disabled during boot. Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r--arch/arm/mach-omap2/serial.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index dd3c735b5588..ca28424f2fbd 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -552,7 +552,7 @@ static struct omap_uart_state omap_uart[OMAP_MAX_NR_PORTS] = {
552 }, 552 },
553}; 553};
554 554
555void __init omap_serial_init(void) 555void __init omap_serial_early_init(void)
556{ 556{
557 int i; 557 int i;
558 char name[16]; 558 char name[16];
@@ -595,6 +595,18 @@ void __init omap_serial_init(void)
595 p->irq += 32; 595 p->irq += 32;
596 596
597 omap_uart_enable_clocks(uart); 597 omap_uart_enable_clocks(uart);
598 }
599}
600
601void __init omap_serial_init(void)
602{
603 int i;
604
605 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
606 struct omap_uart_state *uart = &omap_uart[i];
607 struct platform_device *pdev = &uart->pdev;
608 struct device *dev = &pdev->dev;
609
598 omap_uart_reset(uart); 610 omap_uart_reset(uart);
599 omap_uart_idle_init(uart); 611 omap_uart_idle_init(uart);
600 612