aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/serial.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index b79bc8926cc9..da77930480e9 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -644,16 +644,21 @@ static void serial_out_override(struct uart_port *up, int offset, int value)
644} 644}
645void __init omap_serial_early_init(void) 645void __init omap_serial_early_init(void)
646{ 646{
647 int i; 647 int i, nr_ports;
648 char name[16]; 648 char name[16];
649 649
650 if (!(cpu_is_omap3630() || cpu_is_omap4430()))
651 nr_ports = 3;
652 else
653 nr_ports = ARRAY_SIZE(omap_uart);
654
650 /* 655 /*
651 * Make sure the serial ports are muxed on at this point. 656 * Make sure the serial ports are muxed on at this point.
652 * You have to mux them off in device drivers later on 657 * You have to mux them off in device drivers later on
653 * if not needed. 658 * if not needed.
654 */ 659 */
655 660
656 for (i = 0; i < ARRAY_SIZE(omap_uart); i++) { 661 for (i = 0; i < nr_ports; i++) {
657 struct omap_uart_state *uart = &omap_uart[i]; 662 struct omap_uart_state *uart = &omap_uart[i];
658 struct platform_device *pdev = &uart->pdev; 663 struct platform_device *pdev = &uart->pdev;
659 struct device *dev = &pdev->dev; 664 struct device *dev = &pdev->dev;
@@ -669,17 +674,17 @@ void __init omap_serial_early_init(void)
669 continue; 674 continue;
670 } 675 }
671 676
672 sprintf(name, "uart%d_ick", i+1); 677 sprintf(name, "uart%d_ick", i + 1);
673 uart->ick = clk_get(NULL, name); 678 uart->ick = clk_get(NULL, name);
674 if (IS_ERR(uart->ick)) { 679 if (IS_ERR(uart->ick)) {
675 printk(KERN_ERR "Could not get uart%d_ick\n", i+1); 680 printk(KERN_ERR "Could not get uart%d_ick\n", i + 1);
676 uart->ick = NULL; 681 uart->ick = NULL;
677 } 682 }
678 683
679 sprintf(name, "uart%d_fck", i+1); 684 sprintf(name, "uart%d_fck", i+1);
680 uart->fck = clk_get(NULL, name); 685 uart->fck = clk_get(NULL, name);
681 if (IS_ERR(uart->fck)) { 686 if (IS_ERR(uart->fck)) {
682 printk(KERN_ERR "Could not get uart%d_fck\n", i+1); 687 printk(KERN_ERR "Could not get uart%d_fck\n", i + 1);
683 uart->fck = NULL; 688 uart->fck = NULL;
684 } 689 }
685 690