diff options
Diffstat (limited to 'openembedded/packages/linux/linux-openzaurus-2.6.14-rc4/pxa-serial-hack.patch')
| -rw-r--r-- | openembedded/packages/linux/linux-openzaurus-2.6.14-rc4/pxa-serial-hack.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/openembedded/packages/linux/linux-openzaurus-2.6.14-rc4/pxa-serial-hack.patch b/openembedded/packages/linux/linux-openzaurus-2.6.14-rc4/pxa-serial-hack.patch new file mode 100644 index 0000000000..7892a0f929 --- /dev/null +++ b/openembedded/packages/linux/linux-openzaurus-2.6.14-rc4/pxa-serial-hack.patch | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | Index: linux-2.6.13/drivers/serial/8250.c | ||
| 2 | =================================================================== | ||
| 3 | --- linux-2.6.13.orig/drivers/serial/8250.c 2005-09-15 09:26:00.000000000 +0100 | ||
| 4 | +++ linux-2.6.13/drivers/serial/8250.c 2005-09-15 09:28:49.000000000 +0100 | ||
| 5 | @@ -2312,7 +2312,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.13/drivers/serial/serial_core.c | ||
| 19 | =================================================================== | ||
| 20 | --- linux-2.6.13.orig/drivers/serial/serial_core.c 2005-09-15 09:26:00.000000000 +0100 | ||
| 21 | +++ linux-2.6.13/drivers/serial/serial_core.c 2005-09-15 09:30:16.000000000 +0100 | ||
| 22 | @@ -1969,7 +1969,7 @@ | ||
| 23 | } | ||
| 24 | |||
| 25 | printk(KERN_INFO "%s%d at %s (irq = %d) is a %s\n", | ||
| 26 | - drv->dev_name, port->line, address, port->irq, uart_type(port)); | ||
| 27 | + drv->dev_name, port->line + drv->name_base, address, port->irq, uart_type(port)); | ||
| 28 | } | ||
| 29 | |||
| 30 | static void | ||
| 31 | @@ -2133,6 +2133,7 @@ | ||
| 32 | normal->driver_name = drv->driver_name; | ||
| 33 | normal->devfs_name = drv->devfs_name; | ||
| 34 | normal->name = drv->dev_name; | ||
| 35 | + normal->name_base = drv->name_base; | ||
| 36 | normal->major = drv->major; | ||
| 37 | normal->minor_start = drv->minor; | ||
| 38 | normal->type = TTY_DRIVER_TYPE_SERIAL; | ||
| 39 | Index: linux-2.6.13/include/linux/serial_core.h | ||
| 40 | =================================================================== | ||
| 41 | --- linux-2.6.13.orig/include/linux/serial_core.h 2005-09-15 09:26:03.000000000 +0100 | ||
| 42 | +++ linux-2.6.13/include/linux/serial_core.h 2005-09-15 09:28:49.000000000 +0100 | ||
| 43 | @@ -318,6 +318,7 @@ | ||
| 44 | const char *driver_name; | ||
| 45 | const char *dev_name; | ||
| 46 | const char *devfs_name; | ||
| 47 | + int name_base; | ||
| 48 | int major; | ||
| 49 | int minor; | ||
| 50 | int nr; | ||
| 51 | Index: linux-2.6.13/drivers/serial/serial_cs.c | ||
| 52 | =================================================================== | ||
| 53 | --- linux-2.6.13.orig/drivers/serial/serial_cs.c 2005-09-15 09:26:00.000000000 +0100 | ||
| 54 | +++ linux-2.6.13/drivers/serial/serial_cs.c 2005-09-15 09:28:49.000000000 +0100 | ||
| 55 | @@ -298,7 +298,7 @@ | ||
| 56 | kio_addr_t iobase, int irq) | ||
| 57 | { | ||
| 58 | struct uart_port port; | ||
| 59 | - int line; | ||
| 60 | + int line, linestart; | ||
| 61 | |||
| 62 | memset(&port, 0, sizeof (struct uart_port)); | ||
| 63 | port.iobase = iobase; | ||
| 64 | @@ -315,10 +315,16 @@ | ||
| 65 | return -EINVAL; | ||
| 66 | } | ||
| 67 | |||
| 68 | +#if CONFIG_SERIAL_PXA | ||
| 69 | + linestart = 3; | ||
| 70 | +#else | ||
| 71 | + linestart = 0; | ||
| 72 | +#endif | ||
| 73 | + | ||
| 74 | info->line[info->ndev] = line; | ||
| 75 | - sprintf(info->node[info->ndev].dev_name, "ttyS%d", line); | ||
| 76 | + sprintf(info->node[info->ndev].dev_name, "ttyS%d", line+linestart); | ||
| 77 | info->node[info->ndev].major = TTY_MAJOR; | ||
| 78 | - info->node[info->ndev].minor = 0x40 + line; | ||
| 79 | + info->node[info->ndev].minor = 0x40 + line + linestart; | ||
| 80 | if (info->ndev > 0) | ||
| 81 | info->node[info->ndev - 1].next = &info->node[info->ndev]; | ||
| 82 | info->ndev++; | ||
