diff options
Diffstat (limited to 'meta/packages/linux/linux-rp-2.6.17/pxa-serial-hack.patch')
| -rw-r--r-- | meta/packages/linux/linux-rp-2.6.17/pxa-serial-hack.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.17/pxa-serial-hack.patch b/meta/packages/linux/linux-rp-2.6.17/pxa-serial-hack.patch new file mode 100644 index 0000000000..b3a7f786ea --- /dev/null +++ b/meta/packages/linux/linux-rp-2.6.17/pxa-serial-hack.patch | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | Index: linux-2.6.14/drivers/serial/8250.c | ||
| 2 | =================================================================== | ||
| 3 | --- linux-2.6.14.orig/drivers/serial/8250.c 2005-11-07 18:10:50.000000000 +0000 | ||
| 4 | +++ linux-2.6.14/drivers/serial/8250.c 2005-11-07 19:01:21.000000000 +0000 | ||
| 5 | @@ -2333,7 +2333,12 @@ | ||
| 6 | .devfs_name = "tts/", | ||
| 7 | .dev_name = "ttyS", | ||
| 8 | .major = TTY_MAJOR, | ||
| 9 | +#ifdef CONFIG_SERIAL_PXA | ||
| 10 | + .minor = 64 + 3, | ||
| 11 | + .name_base = 3, | ||
| 12 | +#else | ||
| 13 | .minor = 64, | ||
| 14 | +#endif | ||
| 15 | .nr = UART_NR, | ||
| 16 | .cons = SERIAL8250_CONSOLE, | ||
| 17 | }; | ||
| 18 | Index: linux-2.6.14/drivers/serial/serial_core.c | ||
| 19 | =================================================================== | ||
| 20 | --- linux-2.6.14.orig/drivers/serial/serial_core.c 2005-11-07 18:10:50.000000000 +0000 | ||
| 21 | +++ linux-2.6.14/drivers/serial/serial_core.c 2005-11-07 19:01:21.000000000 +0000 | ||
| 22 | @@ -2126,6 +2126,7 @@ | ||
| 23 | normal->driver_name = drv->driver_name; | ||
| 24 | normal->devfs_name = drv->devfs_name; | ||
| 25 | normal->name = drv->dev_name; | ||
| 26 | + normal->name_base = drv->name_base; | ||
| 27 | normal->major = drv->major; | ||
| 28 | normal->minor_start = drv->minor; | ||
| 29 | normal->type = TTY_DRIVER_TYPE_SERIAL; | ||
| 30 | Index: linux-2.6.14/include/linux/serial_core.h | ||
| 31 | =================================================================== | ||
| 32 | --- linux-2.6.14.orig/include/linux/serial_core.h 2005-11-07 18:10:56.000000000 +0000 | ||
| 33 | +++ linux-2.6.14/include/linux/serial_core.h 2005-11-07 19:01:21.000000000 +0000 | ||
| 34 | @@ -322,6 +322,7 @@ | ||
| 35 | const char *driver_name; | ||
| 36 | const char *dev_name; | ||
| 37 | const char *devfs_name; | ||
| 38 | + int name_base; | ||
| 39 | int major; | ||
| 40 | int minor; | ||
| 41 | int nr; | ||
| 42 | Index: linux-2.6.14/drivers/serial/serial_cs.c | ||
| 43 | =================================================================== | ||
| 44 | --- linux-2.6.14.orig/drivers/serial/serial_cs.c 2005-10-28 01:02:08.000000000 +0100 | ||
| 45 | +++ linux-2.6.14/drivers/serial/serial_cs.c 2005-11-07 19:01:21.000000000 +0000 | ||
| 46 | @@ -294,7 +294,7 @@ | ||
| 47 | kio_addr_t iobase, int irq) | ||
| 48 | { | ||
| 49 | struct uart_port port; | ||
| 50 | - int line; | ||
| 51 | + int line, linestart; | ||
| 52 | |||
| 53 | memset(&port, 0, sizeof (struct uart_port)); | ||
| 54 | port.iobase = iobase; | ||
| 55 | @@ -311,10 +311,16 @@ | ||
| 56 | return -EINVAL; | ||
| 57 | } | ||
| 58 | |||
| 59 | +#if CONFIG_SERIAL_PXA | ||
| 60 | + linestart = 3; | ||
| 61 | +#else | ||
| 62 | + linestart = 0; | ||
| 63 | +#endif | ||
| 64 | + | ||
| 65 | info->line[info->ndev] = line; | ||
| 66 | - sprintf(info->node[info->ndev].dev_name, "ttyS%d", line); | ||
| 67 | + sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart); | ||
| 68 | info->node[info->ndev].major = TTY_MAJOR; | ||
| 69 | - info->node[info->ndev].minor = 0x40 + line; | ||
| 70 | + info->node[info->ndev].minor = 0x40 + line + linestart; | ||
| 71 | if (info->ndev > 0) | ||
| 72 | info->node[info->ndev - 1].next = &info->node[info->ndev]; | ||
| 73 | info->ndev++; | ||
