patch-2.4.0-test12 linux/include/asm-mips64/serial.h
Next file: linux/include/asm-mips64/sgi/sgint23.h
Previous file: linux/include/asm-mips64/semaphore.h
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
Tue Nov 28 21:42:04 2000
- Orig file:
v2.4.0-test11/linux/include/asm-mips64/serial.h
- Orig date:
Sun Jul 9 22:18:15 2000
diff -u --recursive --new-file v2.4.0-test11/linux/include/asm-mips64/serial.h linux/include/asm-mips64/serial.h
@@ -10,10 +10,6 @@
#ifndef _ASM_SERIAL_H
#define _ASM_SERIAL_H
-#include <linux/config.h>
-
-#include <asm/sn/sn0/ip27.h>
-
/*
* This assumes you have a 1.8432 MHz clock for your UART.
*
@@ -23,32 +19,36 @@
*/
#define BASE_BAUD (1843200 / 16)
-/* Standard COM flags (except for COM4, because of the 8514 problem) */
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-
/*
+ * Note about serial ports and consoles:
+ * For console output, everyone uses the IOC3 UARTA (offset 0x178)
+ * connected to the master node (look in ip27_setup_console() and
+ * ip27prom_console_write()).
+ *
+ * For serial (/dev/ttyS0 etc), we can not have hardcoded serial port
+ * addresses on a partitioned machine. Since we currently use the ioc3
+ * serial ports, we use dynamic serial port discovery that the serial.c
+ * driver uses for pci/pnp ports (there is an entry for the SGI ioc3
+ * boards in pci_boards[]). Unfortunately, UARTA's pio address is greater
+ * than UARTB's, although UARTA on o200s has traditionally been known as
+ * port 0. So, we just use one serial port from each ioc3 (since the
+ * serial driver adds addresses to get to higher ports).
+ *
+ * The first one to do a register_console becomes the preferred console
+ * (if there is no kernel command line console= directive). /dev/console
+ * (ie 5, 1) is then "aliased" into the device number returned by the
+ * "device" routine referred to in this console structure
+ * (ip27prom_console_dev).
+ *
+ * Also look in ip27-pci.c:pci_fixuop_ioc3() for some comments on working
+ * around ioc3 oddities in this respect.
+ *
* The IOC3 serials use a 22MHz clock rate with an additional divider by 3.
+ * (IOC3_BAUD = (22000000 / (3*16)))
*/
-#define IOC3_BAUD (22000000 / (3*16))
-#define IOC3_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
-
-/* Let the compiler figure out the size. */
-#define RS_TABLE_SIZE
-
-#ifdef CONFIG_SGI_IP27
-#define _ORIGIN_SERIAL_INIT(int, base) \
- { baud_base: IOC3_BAUD, irq: int, flags: IOC3_COM_FLAGS, \
- iomem_base: (u8 *) base, iomem_reg_shift: 0, \
- io_type: SERIAL_IO_MEM }
-#define ORIGIN_SERIAL_PORT_DFNS \
- _ORIGIN_SERIAL_INIT(0, 0x9200000008620178UL), \
- _ORIGIN_SERIAL_INIT(0, 0x9200000008620170UL),
-#else
-#define ORIGIN_SERIAL_PORT_DFNS
-#endif
+#define RS_TABLE_SIZE 64
-#define SERIAL_PORT_DFNS \
- ORIGIN_SERIAL_PORT_DFNS
+#define SERIAL_PORT_DFNS
#endif /* _ASM_SERIAL_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)