From 5668545a08c80e0d9dc325bd6c79028b19227e5d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 1 Sep 2008 21:25:33 +0100 Subject: [ARM] omap: improve is_omap_port() Make is_omap_port() take the uart_8250_port structure so it can do whatever test it desires. Convert the test to compare the physical addresses rather than virtual addresses. Signed-off-by: Russell King --- drivers/serial/8250.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/serial') diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 9ccc563d873..47a60960bb1 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2213,7 +2213,7 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, #ifdef CONFIG_ARCH_OMAP15XX /* Workaround to enable 115200 baud on OMAP1510 internal ports */ - if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) { + if (cpu_is_omap1510() && is_omap_port(up)) { if (baud == 115200) { quot = 1; serial_out(up, UART_OMAP_OSC_12M_SEL, 1); -- cgit v1.2.3 From f2eda27d1cd218f6544cd9367be47fb01c70a95d Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 1 Sep 2008 21:47:59 +0100 Subject: [SERIAL] 8250: serial8250_port_size() - omap ports are larger A function to contain common code for the size of the resource we need to allocate or free. OMAP ports need 22 bytes rather than the standard 8 bytes. Signed-off-by: Russell King --- drivers/serial/8250.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'drivers/serial') diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 47a60960bb1..8058533f841 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -2211,7 +2211,7 @@ serial8250_set_termios(struct uart_port *port, struct ktermios *termios, serial_outp(up, UART_EFR, efr); } -#ifdef CONFIG_ARCH_OMAP15XX +#ifdef CONFIG_ARCH_OMAP /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (cpu_is_omap1510() && is_omap_port(up)) { if (baud == 115200) { @@ -2266,18 +2266,27 @@ serial8250_pm(struct uart_port *port, unsigned int state, p->pm(port, state, oldstate); } +static unsigned int serial8250_port_size(struct uart_8250_port *pt) +{ + if (pt->port.iotype == UPIO_AU) + return 0x100000; +#ifdef CONFIG_ARCH_OMAP + if (is_omap_port(pt)) + return 0x16 << pt->port.regshift; +#endif + return 8 << pt->port.regshift; +} + /* * Resource handling. */ static int serial8250_request_std_resource(struct uart_8250_port *up) { - unsigned int size = 8 << up->port.regshift; + unsigned int size = serial8250_port_size(up); int ret = 0; switch (up->port.iotype) { case UPIO_AU: - size = 0x100000; - /* fall thru */ case UPIO_TSI: case UPIO_MEM32: case UPIO_MEM: @@ -2311,12 +2320,10 @@ static int serial8250_request_std_resource(struct uart_8250_port *up) static void serial8250_release_std_resource(struct uart_8250_port *up) { - unsigned int size = 8 << up->port.regshift; + unsigned int size = serial8250_port_size(up); switch (up->port.iotype) { case UPIO_AU: - size = 0x100000; - /* fall thru */ case UPIO_TSI: case UPIO_MEM32: case UPIO_MEM: -- cgit v1.2.3 From a2b7ba9ca471438c2bb0c3bdf0ff2ed7fdce3d2f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Tue, 7 Oct 2008 22:26:09 +0100 Subject: [ARM] S3C24XX: Move files out of include/asm-arm/plat-s3c* First move of items out of include/asm-arm/plat-s3c* to their new homes under arch/arm/plat-s3c/include/plat and arch/arm/plat-s3c24xx/include/plat directories. Note, we have to create a dummy arch/arm/plat-s3c/Makefile to allow us to add arch/arm/plat-s3c/include/plat to the path. Signed-off-by: Ben Dooks --- drivers/serial/s3c2400.c | 2 +- drivers/serial/s3c2410.c | 2 +- drivers/serial/s3c2412.c | 2 +- drivers/serial/s3c2440.c | 2 +- drivers/serial/samsung.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/serial') diff --git a/drivers/serial/s3c2400.c b/drivers/serial/s3c2400.c index c8b4266ac35..4873f2978bd 100644 --- a/drivers/serial/s3c2400.c +++ b/drivers/serial/s3c2400.c @@ -19,7 +19,7 @@ #include -#include +#include #include #include "samsung.h" diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 40a2531b554..87c182ef71b 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "samsung.h" diff --git a/drivers/serial/s3c2412.c b/drivers/serial/s3c2412.c index d0170319c72..fd017b37556 100644 --- a/drivers/serial/s3c2412.c +++ b/drivers/serial/s3c2412.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "samsung.h" diff --git a/drivers/serial/s3c2440.c b/drivers/serial/s3c2440.c index d4a2b17b249..317d239ab74 100644 --- a/drivers/serial/s3c2440.c +++ b/drivers/serial/s3c2440.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "samsung.h" diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c index 5a88b3f9fe9..1e219d3d035 100644 --- a/drivers/serial/samsung.c +++ b/drivers/serial/samsung.c @@ -47,7 +47,7 @@ #include -#include +#include #include #include "samsung.h" -- cgit v1.2.3