Messages in this thread Patch in this message | | | Date | Tue, 21 Sep 1999 15:23:50 +0200 | From | Pavel Machek <> | Subject | Re: Serial support patch for over 115K |
| |
Hi!
> This patch looks relatively straightforward to port to 2.3, however it's > been out for quite sometime so somebody must have looked at it before? > Has it been discounted as a permanent kernel patch? > > http://www.os.rim.or.jp/~gigo/over115K/index_e.html
I'll take a look.
I had patch which allowed to use > 115K on many chipsets, and Tytso told me I had better put it into setserial. [I do not know what your patch does.] I also did lots of cleanups. Pavel PS: Here's what I have. enable_hispeed() needs to be called from right place.
PPS: I'm also attaching userland version. It would be nice to integrate my changes to serial.c into official serial.c, plus integrate hispeed-user into setserial. You only need to perform enable_hispeed and then tell kernel that uart type is hispeed.
Once you have hispeed-user integrated into setserial, talk to tytso, and he is likely to accept that into official distribution
--- clean/drivers/char/serial.c Wed Sep 8 20:41:54 1999 +++ linux/drivers/char/serial.c Wed Sep 8 20:36:46 1999 @@ -34,6 +34,8 @@ * 4/98: Added changes to support the ARM architecture proposed by * Russell King * + * 10/98: Added support for hispeed serials. Pavel Machek <pavel@ucw.cz> + * * 5/99: Updated to include support for the XR16C850 and ST16C654 * uarts. Stuart MacDonald <stuartm@connecttech.com> * @@ -260,6 +262,7 @@ UART_STARTECH }, { "XR16850", 128, UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH }, + { "hispeed", 16, UART_CLEAR_FIFO | UART_USE_FIFO}, { 0, 0} }; @@ -1656,6 +1659,10 @@ (cflag & CRTSCTS) ? UART_EFR_CTS : 0); } serial_outp(info, UART_LCR, cval | UART_LCR_DLAB); /* set DLAB */ + if (info->state->type == PORT_HISPEED) /* Use alternate registers in bank 2 */ + serial_outp(info, UART_LCR, 0xe0); /* select bank 2 */ + + serial_outp(info, UART_DLL, quot & 0xff); /* LS of divisor */ serial_outp(info, UART_DLM, quot >> 8); /* MS of divisor */ if (info->state->type == PORT_16750) @@ -2174,6 +2181,7 @@ (info->state->port != 0) && (info->state->type != PORT_UNKNOWN)) info->state->irq = detect_uart_irq(info->state); + print_info(info->state); retval = startup(info); if (retval) @@ -3538,6 +3546,15 @@ int register_serial(struct serial_struct *req); void unregister_serial(int line); +static int print_info(struct serial_state * state) +{ + printk(KERN_INFO "ttyS%02d%s at 0x%04x (irq = %d) is a %s\n", + state->line + SERIAL_DEV_OFFSET, + (state->flags & ASYNC_FOURPORT) ? " FourPort" : "", + state->port, state->irq, + uart_config[state->type].name); +} + #if (LINUX_VERSION_CODE > 0x20100) EXPORT_SYMBOL(register_serial); EXPORT_SYMBOL(unregister_serial); @@ -3983,11 +4000,7 @@ && (state->flags & ASYNC_AUTO_IRQ) && (state->port != 0)) state->irq = detect_uart_irq(state); - printk(KERN_INFO "ttyS%02d%s at 0x%04x (irq = %d) is a %s\n", - state->line + SERIAL_DEV_OFFSET, - (state->flags & ASYNC_FOURPORT) ? " FourPort" : "", - state->port, state->irq, - uart_config[state->type].name); + print_info(state); } #ifdef ENABLE_SERIAL_PCI probe_serial_pci(); -- I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel Hi! I'm a .signature virus! Copy me into your ~/.signature, please! [unhandled content-type:application/octet-stream][unhandled content-type:application/octet-stream] | |