This patch does the following changes to the UART HWMOD layer:
a.) Binding 8250 code with CONFIG_8250 and omap-serial code with
CONFIG_OMAP_SERIAL needs to re-considered.
The reason being during multi-omap builds both can be enabled.
For ZOOM boards where we have a debug board uart which needs to
be handled with 8250 and omap-uarts can be handled either using
omap-serial or 8250 in such scenearios both driver will try to
take over omap-uarts. So keeping dependency towards omap-serial,
if it is enabled then we will use omap-serial to handle omap-uarts
else if it is not defined we will use 8250 to handle omap-uarts.
b.) Use driver name defined in omap-serial.h for name parameter.
c.) Since we request threaded_irq during omap_uart_idle_init
we need to use threaded_irq only while enabling and disabling
the interrupt line.
Cc: Kevin Hilman <[email protected]>
Signed-off-by: Govindraj.R <[email protected]>
---
arch/arm/mach-omap2/serial.c | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9b71c1e..38a74d0 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -25,12 +25,9 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
-
-#ifdef CONFIG_SERIAL_8250_CONSOLE
#include <linux/serial_8250.h>
-#endif
-#ifdef CONFIG_SERIAL_OMAP_CONSOLE
+#ifdef CONFIG_SERIAL_OMAP
#include <plat/omap-serial.h>
#endif
@@ -483,8 +480,11 @@ void omap_uart_enable_irqs(int enable)
list_for_each_entry(uart, &uart_list, node) {
if (enable)
- ret = request_irq(uart->irq, omap_uart_interrupt,
- IRQF_SHARED, "serial idle", (void *)uart);
+ ret = request_threaded_irq(uart->irq, NULL,
+ omap_uart_interrupt,
+ IRQF_SHARED,
+ "serial idle",
+ (void *)uart);
else
free_irq(uart->irq, (void *)uart);
}
@@ -529,11 +529,11 @@ DEVICE_ATTR(sleep_timeout, 0644, sleep_timeout_show,
sleep_timeout_store);
#define DEV_CREATE_FILE(dev, attr) WARN_ON(device_create_file(dev, attr))
#else
static inline void omap_uart_idle_init(struct omap_uart_state *uart) {}
+static void omap_uart_block_sleep(struct omap_uart_state *uart) {}
#define DEV_CREATE_FILE(dev, attr)
#endif /* CONFIG_PM */
-
-#ifdef CONFIG_SERIAL_8250_CONSOLE
+#ifndef CONFIG_SERIAL_OMAP
/*
* Override the default 8250 read handler: mem_serial_in()
* Empty RX fifo read causes an abort on omap3630 and omap4
@@ -635,14 +635,13 @@ void __init omap_serial_init_port(int port)
void *pdata = NULL;
u32 pdata_size = 0;
char *name;
-#ifdef CONFIG_SERIAL_8250_CONSOLE
+#ifndef CONFIG_SERIAL_OMAP
struct plat_serial8250_port ports[2] = {
{},
{.flags = 0},
};
struct plat_serial8250_port *p = &ports[0];
-#endif
-#ifdef CONFIG_SERIAL_OMAP_CONSOLE
+#else
struct omap_uart_port_info omap_up;
#endif
@@ -657,7 +656,7 @@ void __init omap_serial_init_port(int port)
oh = uart->oh;
uart->dma_enabled = 0;
-#ifdef CONFIG_SERIAL_8250_CONSOLE
+#ifndef CONFIG_SERIAL_OMAP
name = "serial8250";
/*
@@ -680,7 +679,6 @@ void __init omap_serial_init_port(int port)
p->irqflags = IRQF_SHARED;
p->private_data = uart;
-#if 0
/*
* omap44xx: Never read empty UART fifo
* omap3xxx: Never read empty UART fifo on UARTs
@@ -696,13 +694,12 @@ void __init omap_serial_init_port(int port)
p->serial_in = serial_in_override;
p->serial_out = serial_out_override;
}
-#endif
pdata = &ports[0];
pdata_size = 2 * sizeof(struct plat_serial8250_port);
-#endif
-#ifdef CONFIG_SERIAL_OMAP_CONSOLE
- name = "omap-hsuart";
+#else
+
+ name = DRIVER_NAME;
omap_up.dma_enabled = uart->dma_enabled;
omap_up.uartclk = OMAP24XX_BASE_BAUD * 16;
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html