diff options
author | Tony Lindgren <tony@atomide.com> | 2010-03-22 17:06:38 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-22 17:06:38 -0400 |
commit | b3c7740a120c8a7775cb63b4d094466da5c01692 (patch) | |
tree | 829761bf38b84630ca07b8fe7e34d4feaa7905dc /arch | |
parent | 220bf991b0366cc50a94feede3d7341fa5710ee4 (diff) | |
parent | e6e8ea63f5d745e5a3030eec1964d0429b93107d (diff) |
Merge branch 'omap-fixes-for-tony' of git://dev.omapzoom.org/pub/scm/saaguirre/linux-omap-camera into omap-fixes-for-linus
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/omap_zoom2_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/configs/omap_zoom3_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-3630sdp.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-debugboard.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 35 |
6 files changed, 22 insertions, 21 deletions
diff --git a/arch/arm/configs/omap_zoom2_defconfig b/arch/arm/configs/omap_zoom2_defconfig index f5c6e11cf189..881faea03d79 100644 --- a/arch/arm/configs/omap_zoom2_defconfig +++ b/arch/arm/configs/omap_zoom2_defconfig | |||
@@ -661,7 +661,7 @@ CONFIG_DEVKMEM=y | |||
661 | CONFIG_SERIAL_8250=y | 661 | CONFIG_SERIAL_8250=y |
662 | CONFIG_SERIAL_8250_CONSOLE=y | 662 | CONFIG_SERIAL_8250_CONSOLE=y |
663 | CONFIG_SERIAL_8250_NR_UARTS=32 | 663 | CONFIG_SERIAL_8250_NR_UARTS=32 |
664 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 664 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 |
665 | CONFIG_SERIAL_8250_EXTENDED=y | 665 | CONFIG_SERIAL_8250_EXTENDED=y |
666 | CONFIG_SERIAL_8250_MANY_PORTS=y | 666 | CONFIG_SERIAL_8250_MANY_PORTS=y |
667 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 667 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/arm/configs/omap_zoom3_defconfig b/arch/arm/configs/omap_zoom3_defconfig index ea9a5012d332..5e55b550a408 100644 --- a/arch/arm/configs/omap_zoom3_defconfig +++ b/arch/arm/configs/omap_zoom3_defconfig | |||
@@ -680,7 +680,7 @@ CONFIG_DEVKMEM=y | |||
680 | CONFIG_SERIAL_8250=y | 680 | CONFIG_SERIAL_8250=y |
681 | CONFIG_SERIAL_8250_CONSOLE=y | 681 | CONFIG_SERIAL_8250_CONSOLE=y |
682 | CONFIG_SERIAL_8250_NR_UARTS=32 | 682 | CONFIG_SERIAL_8250_NR_UARTS=32 |
683 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 683 | CONFIG_SERIAL_8250_RUNTIME_UARTS=1 |
684 | CONFIG_SERIAL_8250_EXTENDED=y | 684 | CONFIG_SERIAL_8250_EXTENDED=y |
685 | CONFIG_SERIAL_8250_MANY_PORTS=y | 685 | CONFIG_SERIAL_8250_MANY_PORTS=y |
686 | CONFIG_SERIAL_8250_SHARE_IRQ=y | 686 | CONFIG_SERIAL_8250_SHARE_IRQ=y |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index a0a2a113465c..504d2bd222fe 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -96,6 +96,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
96 | static void __init omap_sdp_init(void) | 96 | static void __init omap_sdp_init(void) |
97 | { | 97 | { |
98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); |
99 | omap_serial_init(); | ||
99 | zoom_peripherals_init(); | 100 | zoom_peripherals_init(); |
100 | board_smc91x_init(); | 101 | board_smc91x_init(); |
101 | enable_board_wakeup_source(); | 102 | enable_board_wakeup_source(); |
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c index bb4018b60642..e15d2e87cfc1 100644 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ b/arch/arm/mach-omap2/board-zoom-debugboard.c | |||
@@ -96,7 +96,7 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
96 | 96 | ||
97 | static struct platform_device zoom_debugboard_serial_device = { | 97 | static struct platform_device zoom_debugboard_serial_device = { |
98 | .name = "serial8250", | 98 | .name = "serial8250", |
99 | .id = 3, | 99 | .id = PLAT8250_DEV_PLATFORM, |
100 | .dev = { | 100 | .dev = { |
101 | .platform_data = serial_platform_data, | 101 | .platform_data = serial_platform_data, |
102 | }, | 102 | }, |
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index ca95d8d64136..6b3984964cc5 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -280,7 +280,6 @@ static void enable_board_wakeup_source(void) | |||
280 | void __init zoom_peripherals_init(void) | 280 | void __init zoom_peripherals_init(void) |
281 | { | 281 | { |
282 | omap_i2c_init(); | 282 | omap_i2c_init(); |
283 | omap_serial_init(); | ||
284 | usb_musb_init(&musb_board_data); | 283 | usb_musb_init(&musb_board_data); |
285 | enable_board_wakeup_source(); | 284 | enable_board_wakeup_source(); |
286 | } | 285 | } |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index da77930480e9..3771254dfa81 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -115,7 +115,6 @@ static struct plat_serial8250_port serial_platform_data2[] = { | |||
115 | } | 115 | } |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
119 | static struct plat_serial8250_port serial_platform_data3[] = { | 118 | static struct plat_serial8250_port serial_platform_data3[] = { |
120 | { | 119 | { |
121 | .irq = 70, | 120 | .irq = 70, |
@@ -128,23 +127,12 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
128 | } | 127 | } |
129 | }; | 128 | }; |
130 | 129 | ||
131 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
132 | { | ||
133 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; | ||
134 | } | ||
135 | #else | ||
136 | static inline void omap2_set_globals_uart4(struct omap_globals *omap2_globals) | ||
137 | { | ||
138 | } | ||
139 | #endif | ||
140 | |||
141 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) | 130 | void __init omap2_set_globals_uart(struct omap_globals *omap2_globals) |
142 | { | 131 | { |
143 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; | 132 | serial_platform_data0[0].mapbase = omap2_globals->uart1_phys; |
144 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; | 133 | serial_platform_data1[0].mapbase = omap2_globals->uart2_phys; |
145 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; | 134 | serial_platform_data2[0].mapbase = omap2_globals->uart3_phys; |
146 | if (cpu_is_omap3630() || cpu_is_omap44xx()) | 135 | serial_platform_data3[0].mapbase = omap2_globals->uart4_phys; |
147 | omap2_set_globals_uart4(omap2_globals); | ||
148 | } | 136 | } |
149 | 137 | ||
150 | static inline unsigned int __serial_read_reg(struct uart_port *up, | 138 | static inline unsigned int __serial_read_reg(struct uart_port *up, |
@@ -550,7 +538,7 @@ static ssize_t sleep_timeout_store(struct device *dev, | |||
550 | unsigned int value; | 538 | unsigned int value; |
551 | 539 | ||
552 | if (sscanf(buf, "%u", &value) != 1) { | 540 | if (sscanf(buf, "%u", &value) != 1) { |
553 | printk(KERN_ERR "sleep_timeout_store: Invalid value\n"); | 541 | dev_err(dev, "sleep_timeout_store: Invalid value\n"); |
554 | return -EINVAL; | 542 | return -EINVAL; |
555 | } | 543 | } |
556 | 544 | ||
@@ -664,27 +652,33 @@ void __init omap_serial_early_init(void) | |||
664 | struct device *dev = &pdev->dev; | 652 | struct device *dev = &pdev->dev; |
665 | struct plat_serial8250_port *p = dev->platform_data; | 653 | struct plat_serial8250_port *p = dev->platform_data; |
666 | 654 | ||
655 | /* Don't map zero-based physical address */ | ||
656 | if (p->mapbase == 0) { | ||
657 | dev_warn(dev, "no physical address for uart#%d," | ||
658 | " so skipping early_init...\n", i); | ||
659 | continue; | ||
660 | } | ||
667 | /* | 661 | /* |
668 | * Module 4KB + L4 interconnect 4KB | 662 | * Module 4KB + L4 interconnect 4KB |
669 | * Static mapping, never released | 663 | * Static mapping, never released |
670 | */ | 664 | */ |
671 | p->membase = ioremap(p->mapbase, SZ_8K); | 665 | p->membase = ioremap(p->mapbase, SZ_8K); |
672 | if (!p->membase) { | 666 | if (!p->membase) { |
673 | printk(KERN_ERR "ioremap failed for uart%i\n", i + 1); | 667 | dev_err(dev, "ioremap failed for uart%i\n", i + 1); |
674 | continue; | 668 | continue; |
675 | } | 669 | } |
676 | 670 | ||
677 | sprintf(name, "uart%d_ick", i + 1); | 671 | sprintf(name, "uart%d_ick", i + 1); |
678 | uart->ick = clk_get(NULL, name); | 672 | uart->ick = clk_get(NULL, name); |
679 | if (IS_ERR(uart->ick)) { | 673 | if (IS_ERR(uart->ick)) { |
680 | printk(KERN_ERR "Could not get uart%d_ick\n", i + 1); | 674 | dev_err(dev, "Could not get uart%d_ick\n", i + 1); |
681 | uart->ick = NULL; | 675 | uart->ick = NULL; |
682 | } | 676 | } |
683 | 677 | ||
684 | sprintf(name, "uart%d_fck", i+1); | 678 | sprintf(name, "uart%d_fck", i+1); |
685 | uart->fck = clk_get(NULL, name); | 679 | uart->fck = clk_get(NULL, name); |
686 | if (IS_ERR(uart->fck)) { | 680 | if (IS_ERR(uart->fck)) { |
687 | printk(KERN_ERR "Could not get uart%d_fck\n", i + 1); | 681 | dev_err(dev, "Could not get uart%d_fck\n", i + 1); |
688 | uart->fck = NULL; | 682 | uart->fck = NULL; |
689 | } | 683 | } |
690 | 684 | ||
@@ -727,6 +721,13 @@ void __init omap_serial_init_port(int port) | |||
727 | pdev = &uart->pdev; | 721 | pdev = &uart->pdev; |
728 | dev = &pdev->dev; | 722 | dev = &pdev->dev; |
729 | 723 | ||
724 | /* Don't proceed if there's no clocks available */ | ||
725 | if (unlikely(!uart->ick || !uart->fck)) { | ||
726 | WARN(1, "%s: can't init uart%d, no clocks available\n", | ||
727 | kobject_name(&dev->kobj), port); | ||
728 | return; | ||
729 | } | ||
730 | |||
730 | omap_uart_enable_clocks(uart); | 731 | omap_uart_enable_clocks(uart); |
731 | 732 | ||
732 | omap_uart_reset(uart); | 733 | omap_uart_reset(uart); |