diff options
author | Michael Lauer <mickey@vanille-media.de> | 2006-05-11 17:23:44 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-05-11 17:23:44 +0000 |
commit | 844bf825c75c21864c1ba911642d58021e08e9ed (patch) | |
tree | a4fc24b7330cd955c23787749f4cf751bf35dc57 /packages/linux/linux-ezx/pxa_serial_bug_workaround.patch | |
parent | 2222e629a6bf3ebaafce55cfd533486ec9926887 (diff) |
add first stab at support for the Motorola A780 GSM phone
NOTE: for now, we use a dedicated linux-ezx kernel, but once this proves working,
we will probably unify with linux-openzaurus
Diffstat (limited to 'packages/linux/linux-ezx/pxa_serial_bug_workaround.patch')
-rw-r--r-- | packages/linux/linux-ezx/pxa_serial_bug_workaround.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/linux/linux-ezx/pxa_serial_bug_workaround.patch b/packages/linux/linux-ezx/pxa_serial_bug_workaround.patch new file mode 100644 index 0000000000..df443eebe6 --- /dev/null +++ b/packages/linux/linux-ezx/pxa_serial_bug_workaround.patch @@ -0,0 +1,36 @@ +Work around some errata in the pxa serial code (copied from motorolas 2.4.x tree) + +diff -Nru --exclude-from=/sunbeam/home/laforge/scripts/dontdiff linux-2.6.16.5/drivers/serial/pxa.c linux-2.6.16.5-exz/drivers/serial/pxa.c +--- linux-2.6.16.5/drivers/serial/pxa.c 2006-04-12 22:27:57.000000000 +0200 ++++ linux-2.6.16.5-exz/drivers/serial/pxa.c 2006-04-17 13:03:02.000000000 +0200 +@@ -30,6 +30,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> +@@ -205,6 +209,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, NULL); + } + } + +@@ -302,6 +308,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); + } + + |