Messages in this thread Patch in this message | | | Date | Mon, 24 Nov 1997 04:29:51 +0100 (MET) | From | Niels Kristian Bech Jensen <> | Subject | [2.1.65] New patch for serial port IRQ setup. |
| |
I've been made aware that some manufacturers of internal modems recommend using irq 2 for COM 4, while other recommende using irq 9. I've made this a configuration option.
Please test this patch and let me know what you think.
diff -urN linux-2.1.65/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.1.65/Documentation/Configure.help Mon Nov 24 03:35:58 1997 +++ linux/Documentation/Configure.help Mon Nov 24 03:40:46 1997 @@ -684,7 +684,10 @@ CONFIG_SERIAL_SHARE_IRQ Some serial boards have hardware support which allows multiple dumb serial ports on the same board to share a single IRQ. To enable - support for this in the serial driver, say Y here. + support for this in the serial driver, say Y here. You also have to + say Y here if you want COM 1 and 2 to share interrupts with COM 3 + and 4 respectively. Beware that it is not recommended to use two of + the first four serial ports with shared interrupts at the same time! Support special multiport boards CONFIG_SERIAL_MULTIPORT diff -urN linux-2.1.65/drivers/char/Config.in linux/drivers/char/Config.in --- linux-2.1.65/drivers/char/Config.in Mon Nov 24 03:35:39 1997 +++ linux/drivers/char/Config.in Mon Nov 24 03:40:37 1997 @@ -17,6 +17,9 @@ bool ' Support the Bell Technologies HUB6 card' CONFIG_HUB6 bool ' Console on serial port' CONFIG_SERIAL_CONSOLE fi +if [ "$CONFIG_SERIAL_SHARE_IRQ" != "y" ]; then + int 'IRQ for 4th serial port (COM4_IRQ) 2 or 9' COM4_IRQ 2 +fi bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then tristate 'Comtrol Rocketport support' CONFIG_ROCKETPORT diff -urN linux-2.1.65/drivers/char/serial.c linux/drivers/char/serial.c --- linux-2.1.65/drivers/char/serial.c Mon Nov 24 03:32:39 1997 +++ linux/drivers/char/serial.c Mon Nov 24 03:43:56 1997 @@ -22,6 +22,9 @@ * 1/97: Extended dumb serial ports are a config option now. * Saves 4k. Michael A. Griffith <grif@acm.org> * + * 11/97: Configuration of shared IRQs between COM 1/3 and COM 2/4 via + * CONFIG_SERIAL_SHARE_IRQ. Niels Kristian Bech Jensen <nkbj@image.dk> + * * This module exports the following rs232 io functions: * * int rs_init(void); @@ -53,7 +56,7 @@ #include <asm/bitops.h> static char *serial_name = "Serial driver"; -static char *serial_version = "4.24"; +static char *serial_version = "4.25"; static DECLARE_TASK_QUEUE(tq_serial); @@ -94,6 +97,7 @@ #define CONFIG_SERIAL_MANY_PORTS #define CONFIG_SERIAL_SHARE_IRQ +#define COM4_IRQ 2 #define CONFIG_SERIAL_MULTIPORT #define CONFIG_HUB6 #endif @@ -112,6 +116,9 @@ #endif #ifndef CONFIG_SERIAL_SHARE_IRQ #define CONFIG_SERIAL_SHARE_IRQ +#ifndef COM4_IRQ +#define COM4_IRQ 2 +#endif #endif #endif @@ -211,10 +218,17 @@ static struct serial_state rs_table[] = { /* UART CLK PORT IRQ FLAGS */ +#ifdef CONFIG_SERIAL_SHARE_IRQ { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ +#else /* Default is no shared IRQs, remember to set up hardware */ + { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ + { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ + { 0, BASE_BAUD, 0x3E8, 5, STD_COM_FLAGS }, /* ttyS2 */ + { 0, BASE_BAUD, 0x2E8, COM4_IRQ, STD_COM4_FLAGS }, /* ttyS3 */ +#endif /* CONFIG_SERIAL_SHARE_IRQ */ #ifdef CONFIG_SERIAL_MANY_PORTS { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */
-- Med venlig hilsen / Regards
Niels Kristian Bech Jensen nkbj@image.dk http://www.image.dk/~nkbj/
| |