diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
commit | 2e57572a50a4de41c6cbc879a4866a312d4cd316 (patch) | |
tree | c4f58ec96c06642c4b415b881d3f0a3b673d5b44 /drivers/serial | |
parent | 9b2e43ae4e9609f80034dfe8de895045cac52d77 (diff) | |
parent | f948cc6ab9e61a8e88d70ee9aafc690e6d26f92c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:
arch/sparc64/kernel/pci_psycho.c
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250.c | 16 | ||||
-rw-r--r-- | drivers/serial/8250.h | 1 | ||||
-rw-r--r-- | drivers/serial/bfin_5xx.c | 2 | ||||
-rw-r--r-- | drivers/serial/imx.c | 27 |
4 files changed, 36 insertions, 10 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 342e12fb1c25..9ccc563d8730 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1908,15 +1908,23 @@ static int serial8250_startup(struct uart_port *port) | |||
1908 | * kick the UART on a regular basis. | 1908 | * kick the UART on a regular basis. |
1909 | */ | 1909 | */ |
1910 | if (!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) { | 1910 | if (!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) { |
1911 | up->bugs |= UART_BUG_THRE; | ||
1911 | pr_debug("ttyS%d - using backup timer\n", port->line); | 1912 | pr_debug("ttyS%d - using backup timer\n", port->line); |
1912 | up->timer.function = serial8250_backup_timeout; | ||
1913 | up->timer.data = (unsigned long)up; | ||
1914 | mod_timer(&up->timer, jiffies + | ||
1915 | poll_timeout(up->port.timeout) + HZ / 5); | ||
1916 | } | 1913 | } |
1917 | } | 1914 | } |
1918 | 1915 | ||
1919 | /* | 1916 | /* |
1917 | * The above check will only give an accurate result the first time | ||
1918 | * the port is opened so this value needs to be preserved. | ||
1919 | */ | ||
1920 | if (up->bugs & UART_BUG_THRE) { | ||
1921 | up->timer.function = serial8250_backup_timeout; | ||
1922 | up->timer.data = (unsigned long)up; | ||
1923 | mod_timer(&up->timer, jiffies + | ||
1924 | poll_timeout(up->port.timeout) + HZ / 5); | ||
1925 | } | ||
1926 | |||
1927 | /* | ||
1920 | * If the "interrupt" for this port doesn't correspond with any | 1928 | * If the "interrupt" for this port doesn't correspond with any |
1921 | * hardware interrupt, we use a timer-based system. The original | 1929 | * hardware interrupt, we use a timer-based system. The original |
1922 | * driver used to do this with IRQ0. | 1930 | * driver used to do this with IRQ0. |
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index 78c00162b04e..520260326f3d 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h | |||
@@ -47,6 +47,7 @@ struct serial8250_config { | |||
47 | #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ | 47 | #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ |
48 | #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ | 48 | #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ |
49 | #define UART_BUG_NOMSR (1 << 2) /* UART has buggy MSR status bits (Au1x00) */ | 49 | #define UART_BUG_NOMSR (1 << 2) /* UART has buggy MSR status bits (Au1x00) */ |
50 | #define UART_BUG_THRE (1 << 3) /* UART has buggy THRE reassertion */ | ||
50 | 51 | ||
51 | #define PROBE_RSA (1 << 0) | 52 | #define PROBE_RSA (1 << 0) |
52 | #define PROBE_ANY (~0) | 53 | #define PROBE_ANY (~0) |
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index efcd44344fb1..4a0d30bed9f1 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #include <asm/gpio.h> | 30 | #include <asm/gpio.h> |
31 | #include <asm/mach/bfin_serial_5xx.h> | 31 | #include <mach/bfin_serial_5xx.h> |
32 | 32 | ||
33 | #ifdef CONFIG_SERIAL_BFIN_DMA | 33 | #ifdef CONFIG_SERIAL_BFIN_DMA |
34 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 6a29f9330a73..3f90f1bbbbcd 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -127,8 +127,13 @@ | |||
127 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ | 127 | #define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */ |
128 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ | 128 | #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */ |
129 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ | 129 | #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */ |
130 | #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz */ | 130 | #ifdef CONFIG_ARCH_IMX |
131 | #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz */ | 131 | #define UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */ |
132 | #define UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */ | ||
133 | #endif | ||
134 | #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3 | ||
135 | #define UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */ | ||
136 | #endif | ||
132 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ | 137 | #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */ |
133 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ | 138 | #define UCR3_BPEN (1<<0) /* Preset registers enable */ |
134 | #define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */ | 139 | #define UCR4_CTSTL_32 (32<<10) /* CTS trigger level (32 chars) */ |
@@ -445,7 +450,7 @@ static irqreturn_t imx_int(int irq, void *dev_id) | |||
445 | readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) | 450 | readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) |
446 | imx_txint(irq, dev_id); | 451 | imx_txint(irq, dev_id); |
447 | 452 | ||
448 | if (sts & USR1_RTSS) | 453 | if (sts & USR1_RTSD) |
449 | imx_rtsint(irq, dev_id); | 454 | imx_rtsint(irq, dev_id); |
450 | 455 | ||
451 | return IRQ_HANDLED; | 456 | return IRQ_HANDLED; |
@@ -598,6 +603,12 @@ static int imx_startup(struct uart_port *port) | |||
598 | temp |= (UCR2_RXEN | UCR2_TXEN); | 603 | temp |= (UCR2_RXEN | UCR2_TXEN); |
599 | writel(temp, sport->port.membase + UCR2); | 604 | writel(temp, sport->port.membase + UCR2); |
600 | 605 | ||
606 | #if defined CONFIG_ARCH_MX2 || defined CONFIG_ARCH_MX3 | ||
607 | temp = readl(sport->port.membase + UCR3); | ||
608 | temp |= UCR3_RXDMUXSEL; | ||
609 | writel(temp, sport->port.membase + UCR3); | ||
610 | #endif | ||
611 | |||
601 | /* | 612 | /* |
602 | * Enable modem status interrupts | 613 | * Enable modem status interrupts |
603 | */ | 614 | */ |
@@ -1133,13 +1144,19 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1133 | if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) | 1144 | if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) |
1134 | sport->have_rtscts = 1; | 1145 | sport->have_rtscts = 1; |
1135 | 1146 | ||
1136 | if (pdata->init) | 1147 | if (pdata->init) { |
1137 | pdata->init(pdev); | 1148 | ret = pdata->init(pdev); |
1149 | if (ret) | ||
1150 | goto clkput; | ||
1151 | } | ||
1138 | 1152 | ||
1139 | uart_add_one_port(&imx_reg, &sport->port); | 1153 | uart_add_one_port(&imx_reg, &sport->port); |
1140 | platform_set_drvdata(pdev, &sport->port); | 1154 | platform_set_drvdata(pdev, &sport->port); |
1141 | 1155 | ||
1142 | return 0; | 1156 | return 0; |
1157 | clkput: | ||
1158 | clk_put(sport->clk); | ||
1159 | clk_disable(sport->clk); | ||
1143 | unmap: | 1160 | unmap: |
1144 | iounmap(sport->port.membase); | 1161 | iounmap(sport->port.membase); |
1145 | free: | 1162 | free: |