lkml.org 
[lkml]   [1997]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectIRQs for 3rd and 4th serial ports as config options (final patch.)
This patch does what I intended to do, but the defaults doesn't change
anything from default setup of the kernel distribution (2.1.65). That is:
If you don't change any of the IRQs during config, it shouldn't
change/break anything.

Thanks for all your feedback,

Niels Kristian


diff -ur linux-2.1.65/drivers/char/Config.in linux/drivers/char/Config.in
--- linux-2.1.65/drivers/char/Config.in Mon Nov 24 07:33:22 1997
+++ linux/drivers/char/Config.in Mon Nov 24 10:11:49 1997
@@ -9,6 +9,8 @@
bool 'Console on virtual terminal' CONFIG_VT_CONSOLE
fi
tristate 'Standard/generic (dumb) serial support' CONFIG_SERIAL
+int ' IRQ for 3th serial port' COM3_IRQ 4
+int ' IRQ for 4th serial port' COM4_IRQ 3
bool 'Extended dumb serial driver options' CONFIG_SERIAL_EXTENDED
if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
bool ' Support more than 4 serial ports' CONFIG_SERIAL_MANY_PORTS
diff -ur linux-2.1.65/drivers/char/serial.c linux/drivers/char/serial.c
--- linux-2.1.65/drivers/char/serial.c Mon Nov 24 07:33:20 1997
+++ linux/drivers/char/serial.c Mon Nov 24 10:28:31 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: IRQs for the 3rd and 4th serial ports are a config option
+ * now. 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);

@@ -83,6 +86,9 @@
* SERIAL_PARANOIA_CHECK
* Check the magic number for the async_structure where
* ever possible.
+ *
+ * COM3_IRQ, COM4_IRQ
+ * IRQs for 3rd and 4th serial port.
*/

#define SERIAL_PARANOIA_CHECK
@@ -96,6 +102,8 @@
#define CONFIG_SERIAL_SHARE_IRQ
#define CONFIG_SERIAL_MULTIPORT
#define CONFIG_HUB6
+#define COM3_IRQ 4
+#define COM4_IRQ 3
#endif

/* Sanity checks */
@@ -115,6 +123,13 @@
#endif
#endif

+#ifndef COM3_IRQ
+#define COM3_IRQ 4
+#endif
+#ifndef COM4_IRQ
+#define COM4_IRQ 3
+#endif
+
/* Set of debugging defines */

#undef SERIAL_DEBUG_INTR
@@ -213,8 +228,8 @@
/* UART CLK PORT IRQ FLAGS */
{ 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 */
+ { 0, BASE_BAUD, 0x3E8, COM3_IRQ, STD_COM_FLAGS }, /* ttyS2 */
+ { 0, BASE_BAUD, 0x2E8, COM4_IRQ, STD_COM4_FLAGS }, /* ttyS3 */
#ifdef CONFIG_SERIAL_MANY_PORTS
{ 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */
{ 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:1.344 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site