diff options
Diffstat (limited to 'arch/arm/mach-omap1/serial.c')
-rw-r--r-- | arch/arm/mach-omap1/serial.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index d23979bc0fd5..5ebf0946c76a 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -22,10 +22,10 @@ | |||
22 | 22 | ||
23 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
24 | 24 | ||
25 | #include <mach/board.h> | 25 | #include <plat/board.h> |
26 | #include <mach/mux.h> | 26 | #include <plat/mux.h> |
27 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
28 | #include <mach/fpga.h> | 28 | #include <plat/fpga.h> |
29 | 29 | ||
30 | static struct clk * uart1_ck; | 30 | static struct clk * uart1_ck; |
31 | static struct clk * uart2_ck; | 31 | static struct clk * uart2_ck; |
@@ -64,7 +64,6 @@ static void __init omap_serial_reset(struct plat_serial8250_port *p) | |||
64 | 64 | ||
65 | static struct plat_serial8250_port serial_platform_data[] = { | 65 | static struct plat_serial8250_port serial_platform_data[] = { |
66 | { | 66 | { |
67 | .membase = OMAP1_IO_ADDRESS(OMAP_UART1_BASE), | ||
68 | .mapbase = OMAP_UART1_BASE, | 67 | .mapbase = OMAP_UART1_BASE, |
69 | .irq = INT_UART1, | 68 | .irq = INT_UART1, |
70 | .flags = UPF_BOOT_AUTOCONF, | 69 | .flags = UPF_BOOT_AUTOCONF, |
@@ -73,7 +72,6 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
73 | .uartclk = OMAP16XX_BASE_BAUD * 16, | 72 | .uartclk = OMAP16XX_BASE_BAUD * 16, |
74 | }, | 73 | }, |
75 | { | 74 | { |
76 | .membase = OMAP1_IO_ADDRESS(OMAP_UART2_BASE), | ||
77 | .mapbase = OMAP_UART2_BASE, | 75 | .mapbase = OMAP_UART2_BASE, |
78 | .irq = INT_UART2, | 76 | .irq = INT_UART2, |
79 | .flags = UPF_BOOT_AUTOCONF, | 77 | .flags = UPF_BOOT_AUTOCONF, |
@@ -82,7 +80,6 @@ static struct plat_serial8250_port serial_platform_data[] = { | |||
82 | .uartclk = OMAP16XX_BASE_BAUD * 16, | 80 | .uartclk = OMAP16XX_BASE_BAUD * 16, |
83 | }, | 81 | }, |
84 | { | 82 | { |
85 | .membase = OMAP1_IO_ADDRESS(OMAP_UART3_BASE), | ||
86 | .mapbase = OMAP_UART3_BASE, | 83 | .mapbase = OMAP_UART3_BASE, |
87 | .irq = INT_UART3, | 84 | .irq = INT_UART3, |
88 | .flags = UPF_BOOT_AUTOCONF, | 85 | .flags = UPF_BOOT_AUTOCONF, |
@@ -110,18 +107,11 @@ void __init omap_serial_init(void) | |||
110 | { | 107 | { |
111 | int i; | 108 | int i; |
112 | 109 | ||
113 | if (cpu_is_omap730()) { | 110 | if (cpu_is_omap7xx()) { |
114 | serial_platform_data[0].regshift = 0; | 111 | serial_platform_data[0].regshift = 0; |
115 | serial_platform_data[1].regshift = 0; | 112 | serial_platform_data[1].regshift = 0; |
116 | serial_platform_data[0].irq = INT_730_UART_MODEM_1; | 113 | serial_platform_data[0].irq = INT_7XX_UART_MODEM_1; |
117 | serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2; | 114 | serial_platform_data[1].irq = INT_7XX_UART_MODEM_IRDA_2; |
118 | } | ||
119 | |||
120 | if (cpu_is_omap850()) { | ||
121 | serial_platform_data[0].regshift = 0; | ||
122 | serial_platform_data[1].regshift = 0; | ||
123 | serial_platform_data[0].irq = INT_850_UART_MODEM_1; | ||
124 | serial_platform_data[1].irq = INT_850_UART_MODEM_IRDA_2; | ||
125 | } | 115 | } |
126 | 116 | ||
127 | if (cpu_is_omap15xx()) { | 117 | if (cpu_is_omap15xx()) { |
@@ -131,6 +121,14 @@ void __init omap_serial_init(void) | |||
131 | } | 121 | } |
132 | 122 | ||
133 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { | 123 | for (i = 0; i < OMAP_MAX_NR_PORTS; i++) { |
124 | |||
125 | /* Static mapping, never released */ | ||
126 | serial_platform_data[i].membase = | ||
127 | ioremap(serial_platform_data[i].mapbase, SZ_2K); | ||
128 | if (!serial_platform_data[i].membase) { | ||
129 | printk(KERN_ERR "Could not ioremap uart%i\n", i); | ||
130 | continue; | ||
131 | } | ||
134 | switch (i) { | 132 | switch (i) { |
135 | case 0: | 133 | case 0: |
136 | uart1_ck = clk_get(NULL, "uart1_ck"); | 134 | uart1_ck = clk_get(NULL, "uart1_ck"); |