diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-09-01 02:13:44 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-18 05:33:04 -0400 |
commit | 2555e663b367b8d555e76023f4de3f6338c28d6c (patch) | |
tree | 9a786ada8d1e7e4942a14f6c3681932831e506c5 | |
parent | 6f315cb5620c1810e59e93fffb1a7f9c793c7213 (diff) |
ARM: S5P64X0: Add UART serial support for S5P6450
This patch adds UART serial port support for S5P6450 SoC.
The S5P6450 has 6 UARTs, so adds resource of UART4 and UART5.
And to fix membase which is in serial/samsung.c is from Ben Dooks.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Ben Dooks <ben-linux@fluff.org>
-rw-r--r-- | arch/arm/plat-s5p/dev-uart.c | 58 | ||||
-rw-r--r-- | drivers/serial/Kconfig | 7 | ||||
-rw-r--r-- | drivers/serial/samsung.c | 2 |
3 files changed, 63 insertions, 4 deletions
diff --git a/arch/arm/plat-s5p/dev-uart.c b/arch/arm/plat-s5p/dev-uart.c index a89331ef4ae1..6a7342886171 100644 --- a/arch/arm/plat-s5p/dev-uart.c +++ b/arch/arm/plat-s5p/dev-uart.c | |||
@@ -119,6 +119,56 @@ static struct resource s5p_uart3_resource[] = { | |||
119 | #endif | 119 | #endif |
120 | }; | 120 | }; |
121 | 121 | ||
122 | static struct resource s5p_uart4_resource[] = { | ||
123 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 4 | ||
124 | [0] = { | ||
125 | .start = S5P_PA_UART4, | ||
126 | .end = S5P_PA_UART4 + S5P_SZ_UART, | ||
127 | .flags = IORESOURCE_MEM, | ||
128 | }, | ||
129 | [1] = { | ||
130 | .start = IRQ_S5P_UART_RX4, | ||
131 | .end = IRQ_S5P_UART_RX4, | ||
132 | .flags = IORESOURCE_IRQ, | ||
133 | }, | ||
134 | [2] = { | ||
135 | .start = IRQ_S5P_UART_TX4, | ||
136 | .end = IRQ_S5P_UART_TX4, | ||
137 | .flags = IORESOURCE_IRQ, | ||
138 | }, | ||
139 | [3] = { | ||
140 | .start = IRQ_S5P_UART_ERR4, | ||
141 | .end = IRQ_S5P_UART_ERR4, | ||
142 | .flags = IORESOURCE_IRQ, | ||
143 | }, | ||
144 | #endif | ||
145 | }; | ||
146 | |||
147 | static struct resource s5p_uart5_resource[] = { | ||
148 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 5 | ||
149 | [0] = { | ||
150 | .start = S5P_PA_UART5, | ||
151 | .end = S5P_PA_UART5 + S5P_SZ_UART, | ||
152 | .flags = IORESOURCE_MEM, | ||
153 | }, | ||
154 | [1] = { | ||
155 | .start = IRQ_S5P_UART_RX5, | ||
156 | .end = IRQ_S5P_UART_RX5, | ||
157 | .flags = IORESOURCE_IRQ, | ||
158 | }, | ||
159 | [2] = { | ||
160 | .start = IRQ_S5P_UART_TX5, | ||
161 | .end = IRQ_S5P_UART_TX5, | ||
162 | .flags = IORESOURCE_IRQ, | ||
163 | }, | ||
164 | [3] = { | ||
165 | .start = IRQ_S5P_UART_ERR5, | ||
166 | .end = IRQ_S5P_UART_ERR5, | ||
167 | .flags = IORESOURCE_IRQ, | ||
168 | }, | ||
169 | #endif | ||
170 | }; | ||
171 | |||
122 | struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { | 172 | struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { |
123 | [0] = { | 173 | [0] = { |
124 | .resources = s5p_uart0_resource, | 174 | .resources = s5p_uart0_resource, |
@@ -136,4 +186,12 @@ struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { | |||
136 | .resources = s5p_uart3_resource, | 186 | .resources = s5p_uart3_resource, |
137 | .nr_resources = ARRAY_SIZE(s5p_uart3_resource), | 187 | .nr_resources = ARRAY_SIZE(s5p_uart3_resource), |
138 | }, | 188 | }, |
189 | [4] = { | ||
190 | .resources = s5p_uart4_resource, | ||
191 | .nr_resources = ARRAY_SIZE(s5p_uart4_resource), | ||
192 | }, | ||
193 | [5] = { | ||
194 | .resources = s5p_uart5_resource, | ||
195 | .nr_resources = ARRAY_SIZE(s5p_uart5_resource), | ||
196 | }, | ||
139 | }; | 197 | }; |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 12900f7083b0..3198c5335f0b 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -458,6 +458,7 @@ config SERIAL_SAMSUNG_UARTS | |||
458 | int | 458 | int |
459 | depends on ARM && PLAT_SAMSUNG | 459 | depends on ARM && PLAT_SAMSUNG |
460 | default 2 if ARCH_S3C2400 | 460 | default 2 if ARCH_S3C2400 |
461 | default 6 if ARCH_S5P6450 | ||
461 | default 4 if SERIAL_SAMSUNG_UARTS_4 | 462 | default 4 if SERIAL_SAMSUNG_UARTS_4 |
462 | default 3 | 463 | default 3 |
463 | help | 464 | help |
@@ -526,12 +527,12 @@ config SERIAL_S3C24A0 | |||
526 | Serial port support for the Samsung S3C24A0 SoC | 527 | Serial port support for the Samsung S3C24A0 SoC |
527 | 528 | ||
528 | config SERIAL_S3C6400 | 529 | config SERIAL_S3C6400 |
529 | tristate "Samsung S3C6400/S3C6410/S5P6440/S5PC100 Serial port support" | 530 | tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support" |
530 | depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5PC100) | 531 | depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100) |
531 | select SERIAL_SAMSUNG_UARTS_4 | 532 | select SERIAL_SAMSUNG_UARTS_4 |
532 | default y | 533 | default y |
533 | help | 534 | help |
534 | Serial port support for the Samsung S3C6400, S3C6410, S5P6440 | 535 | Serial port support for the Samsung S3C6400, S3C6410, S5P6440, S5P6450 |
535 | and S5PC100 SoCs | 536 | and S5PC100 SoCs |
536 | 537 | ||
537 | config SERIAL_S5PV210 | 538 | config SERIAL_S5PV210 |
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c index b1156ba8ad14..7ac2bf5167cd 100644 --- a/drivers/serial/samsung.c +++ b/drivers/serial/samsung.c | |||
@@ -1101,7 +1101,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
1101 | dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); | 1101 | dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); |
1102 | 1102 | ||
1103 | port->mapbase = res->start; | 1103 | port->mapbase = res->start; |
1104 | port->membase = S3C_VA_UART + res->start - (S3C_PA_UART & 0xfff00000); | 1104 | port->membase = S3C_VA_UART + (res->start & 0xfffff); |
1105 | ret = platform_get_irq(platdev, 0); | 1105 | ret = platform_get_irq(platdev, 0); |
1106 | if (ret < 0) | 1106 | if (ret < 0) |
1107 | port->irq = 0; | 1107 | port->irq = 0; |