patch-2.4.22 linux-2.4.22/include/asm-mips64/serial.h

Next file: linux-2.4.22/include/asm-mips64/sgi/gio.h
Previous file: linux-2.4.22/include/asm-mips64/semaphore.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/include/asm-mips64/serial.h linux-2.4.22/include/asm-mips64/serial.h
@@ -20,8 +20,6 @@
  */
 #define BASE_BAUD (1843200 / 16)
 
-#ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
-
 /* Standard COM flags (except for COM4, because of the 8514 problem) */
 #ifdef CONFIG_SERIAL_DETECT_IRQ
 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
@@ -31,6 +29,8 @@
 #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
 #endif
 
+#ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
+
 #define STD_SERIAL_PORT_DEFNS			\
 	/* UART CLK   PORT IRQ     FLAGS        */			\
 	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
@@ -52,6 +52,26 @@
 #define SEAD_SERIAL_PORT_DEFNS
 #endif
 
+#ifdef CONFIG_MOMENCO_OCELOT_C
+/* Ordinary NS16552 duart with a 20MHz crystal.  */
+#define OCELOT_C_BASE_BAUD ( 20000000 / 16 )
+
+#define OCELOT_C_SERIAL1_IRQ	80
+#define OCELOT_C_SERIAL1_BASE	0xfd000020
+
+#define OCELOT_C_SERIAL2_IRQ	81
+#define OCELOT_C_SERIAL2_BASE	0xfd000000
+
+#define _OCELOT_C_SERIAL_INIT(int, base)				\
+	{ baud_base: OCELOT_C_BASE_BAUD, irq: int, flags: STD_COM_FLAGS,\
+	  iomem_base: (u8 *) base, iomem_reg_shift: 2,			\
+	  io_type: SERIAL_IO_MEM }
+#define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS				\
+	_OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL1_IRQ, OCELOT_C_SERIAL1_BASE), \
+	_OCELOT_C_SERIAL_INIT(OCELOT_C_SERIAL2_IRQ, OCELOT_C_SERIAL2_BASE)
+#else
+#define MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS
+#endif
 
 #ifdef CONFIG_SGI_IP27
 
@@ -91,43 +111,9 @@
 #define IP27_SERIAL_PORT_DEFNS
 #endif /* CONFIG_SGI_IP27 */
 
-#ifdef CONFIG_SGI_IP32
-
-#include <asm/ip32/ip32_ints.h>
-
-/*
- * The IP32 (SGI O2) has standard serial ports (UART 16550A) mapped in memory
- */
-
-/* Standard COM flags (except for COM4, because of the 8514 problem) */
-#ifdef CONFIG_SERIAL_DETECT_IRQ
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
-#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
-#else
-#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF/* | ASYNC_SKIP_TEST*/)
-#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
-#endif
-
-#define IP32_SERIAL_PORT_DEFNS				\
-        { baud_base: BASE_BAUD,				\
-	  irq: MACEISA_SERIAL1_IRQ,			\
-          flags: STD_COM_FLAGS,				\
-          iomem_base: (u8*)MACE_BASE+MACEISA_SER1_BASE,	\
-          iomem_reg_shift: 8,				\
-          io_type: SERIAL_IO_MEM},                      \
-        { baud_base: BASE_BAUD,				\
-	  irq: MACEISA_SERIAL2_IRQ,			\
-          flags: STD_COM_FLAGS,				\
-          iomem_base: (u8*)MACE_BASE+MACEISA_SER2_BASE,	\
-          iomem_reg_shift: 8,				\
-          io_type: SERIAL_IO_MEM},
-#else
-#define IP32_SERIAL_PORT_DEFNS
-#endif /* CONFIG_SGI_IP31 */
-
 #define SERIAL_PORT_DFNS				\
 	IP27_SERIAL_PORT_DEFNS				\
-	IP32_SERIAL_PORT_DEFNS				\
+	MOMENCO_OCELOT_C_SERIAL_PORT_DEFNS		\
 	SEAD_SERIAL_PORT_DEFNS				\
 	STD_SERIAL_PORT_DEFNS
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)