diff options
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index da77930480e9..ef91fc0390b4 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -664,6 +664,12 @@ void __init omap_serial_early_init(void) | |||
664 | struct device *dev = &pdev->dev; | 664 | struct device *dev = &pdev->dev; |
665 | struct plat_serial8250_port *p = dev->platform_data; | 665 | struct plat_serial8250_port *p = dev->platform_data; |
666 | 666 | ||
667 | /* Don't map zero-based physical address */ | ||
668 | if (p->mapbase == 0) { | ||
669 | printk(KERN_WARNING "omap serial: No physical address" | ||
670 | " for uart#%d, so skipping early_init...\n", i); | ||
671 | continue; | ||
672 | } | ||
667 | /* | 673 | /* |
668 | * Module 4KB + L4 interconnect 4KB | 674 | * Module 4KB + L4 interconnect 4KB |
669 | * Static mapping, never released | 675 | * Static mapping, never released |
@@ -727,6 +733,13 @@ void __init omap_serial_init_port(int port) | |||
727 | pdev = &uart->pdev; | 733 | pdev = &uart->pdev; |
728 | dev = &pdev->dev; | 734 | dev = &pdev->dev; |
729 | 735 | ||
736 | /* Don't proceed if there's no clocks available */ | ||
737 | if (unlikely(!uart->ick || !uart->fck)) { | ||
738 | WARN(1, "%s: can't init uart%d, no clocks available\n", | ||
739 | kobject_name(&dev->kobj), port); | ||
740 | return; | ||
741 | } | ||
742 | |||
730 | omap_uart_enable_clocks(uart); | 743 | omap_uart_enable_clocks(uart); |
731 | 744 | ||
732 | omap_uart_reset(uart); | 745 | omap_uart_reset(uart); |