diff options
author | Koen Kooi <koen@openembedded.org> | 2008-01-28 11:27:21 +0000 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2008-01-28 11:27:21 +0000 |
commit | 43f3297970d794c9720998ea07ad45d57b371b71 (patch) | |
tree | 2ebc3bffa3a50477a83cbf3b9a2b14afe4638e58 /packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch | |
parent | 85b5683120b7aa53f10639b4356ead1f1c0d8d47 (diff) |
linux-ezx: add 2.6.24
Diffstat (limited to 'packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch')
-rw-r--r-- | packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch b/packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch new file mode 100644 index 0000000000..efff7e06a5 --- /dev/null +++ b/packages/linux/linux-ezx-2.6.24/patches/ezx-serial-bug-workaround.patch @@ -0,0 +1,45 @@ +Work around some errata in the pxa serial code (copied from motorolas 2.4.x tree) + +Index: linux-2.6.24/drivers/serial/pxa.c +=================================================================== +--- linux-2.6.24.orig/drivers/serial/pxa.c ++++ linux-2.6.24/drivers/serial/pxa.c +@@ -29,6 +29,10 @@ + #define SUPPORT_SYSRQ + #endif + ++#define pxa_buggy_port(x) ({ \ ++ int cpu_ver; asm("mrc%? p15, 0, %0, c0, c0" : "=r" (cpu_ver)); \ ++ ((x) == PORT_PXA && (cpu_ver & ~1) == 0x69052100); }) ++ + #include <linux/module.h> + #include <linux/ioport.h> + #include <linux/init.h> +@@ -196,7 +200,7 @@ + if (uart_circ_empty(xmit)) + serial_pxa_stop_tx(&up->port); + } +- ++static inline irqreturn_t serial_pxa_irq(int, void *); + static void serial_pxa_start_tx(struct uart_port *port) + { + struct uart_pxa_port *up = (struct uart_pxa_port *)port; +@@ -204,6 +208,8 @@ + if (!(up->ier & UART_IER_THRI)) { + up->ier |= UART_IER_THRI; + serial_out(up, UART_IER, up->ier); ++ if (pxa_buggy_port(up->port.type)) ++ serial_pxa_irq(up->port.irq, NULL); + } + } + +@@ -299,6 +305,9 @@ + + mcr |= up->mcr; + ++ if (pxa_buggy_port(up->port.type) && up->port.irq != 0) ++ mcr ^= UART_MCR_OUT2; ++ + serial_out(up, UART_MCR, mcr); + } + |