summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch')
-rw-r--r--meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch b/meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch
new file mode 100644
index 0000000000..bf20f46a05
--- /dev/null
+++ b/meta/recipes-kernel/linux/linux-rp-2.6.24/pxa-serial-hack.patch
@@ -0,0 +1,90 @@
1---
2 drivers/serial/8250.c | 5 +++++
3 drivers/serial/serial_core.c | 1 +
4 drivers/serial/serial_cs.c | 12 +++++++++---
5 include/linux/serial_core.h | 1 +
6 4 files changed, 16 insertions(+), 3 deletions(-)
7
8Index: linux-2.6.20/drivers/serial/8250.c
9===================================================================
10--- linux-2.6.20.orig/drivers/serial/8250.c 2007-04-27 13:37:26.000000000 +0100
11+++ linux-2.6.20/drivers/serial/8250.c 2007-04-27 13:38:16.000000000 +0100
12@@ -2429,7 +2429,12 @@
13 .driver_name = "serial",
14 .dev_name = "ttyS",
15 .major = TTY_MAJOR,
16+#ifdef CONFIG_SERIAL_PXA
17+ .minor = 64 + 4,
18+ .name_base = 4,
19+#else
20 .minor = 64,
21+#endif
22 .nr = UART_NR,
23 .cons = SERIAL8250_CONSOLE,
24 };
25Index: linux-2.6.20/drivers/serial/serial_core.c
26===================================================================
27--- linux-2.6.20.orig/drivers/serial/serial_core.c 2007-02-04 18:44:54.000000000 +0000
28+++ linux-2.6.20/drivers/serial/serial_core.c 2007-04-27 13:39:39.000000000 +0100
29@@ -2068,7 +2068,8 @@
30 printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
31 port->dev ? port->dev->bus_id : "",
32 port->dev ? ": " : "",
33- drv->dev_name, port->line, address, port->irq, uart_type(port));
34+ drv->dev_name, port->line + drv->name_base, address, port->irq,
35+ uart_type(port));
36 }
37
38 static void
39@@ -2183,6 +2184,7 @@
40 normal->owner = drv->owner;
41 normal->driver_name = drv->driver_name;
42 normal->name = drv->dev_name;
43+ normal->name_base = drv->name_base;
44 normal->major = drv->major;
45 normal->minor_start = drv->minor;
46 normal->type = TTY_DRIVER_TYPE_SERIAL;
47Index: linux-2.6.20/include/linux/serial_core.h
48===================================================================
49--- linux-2.6.20.orig/include/linux/serial_core.h 2007-02-04 18:44:54.000000000 +0000
50+++ linux-2.6.20/include/linux/serial_core.h 2007-04-27 13:37:27.000000000 +0100
51@@ -341,6 +341,7 @@
52 struct module *owner;
53 const char *driver_name;
54 const char *dev_name;
55+ int name_base;
56 int major;
57 int minor;
58 int nr;
59Index: linux-2.6.20/drivers/serial/serial_cs.c
60===================================================================
61--- linux-2.6.20.orig/drivers/serial/serial_cs.c 2007-02-04 18:44:54.000000000 +0000
62+++ linux-2.6.20/drivers/serial/serial_cs.c 2007-04-27 13:40:34.000000000 +0100
63@@ -390,7 +390,7 @@
64 kio_addr_t iobase, int irq)
65 {
66 struct uart_port port;
67- int line;
68+ int line, linestart;
69
70 memset(&port, 0, sizeof (struct uart_port));
71 port.iobase = iobase;
72@@ -411,10 +411,16 @@
73 return -EINVAL;
74 }
75
76+#if CONFIG_SERIAL_PXA
77+ linestart = 4;
78+#else
79+ linestart = 0;
80+#endif
81+
82 info->line[info->ndev] = line;
83- sprintf(info->node[info->ndev].dev_name, "ttyS%d", line);
84+ sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart);
85 info->node[info->ndev].major = TTY_MAJOR;
86- info->node[info->ndev].minor = 0x40 + line;
87+ info->node[info->ndev].minor = 0x40 + line + linestart;
88 if (info->ndev > 0)
89 info->node[info->ndev - 1].next = &info->node[info->ndev];
90 info->ndev++;