#define __ASMPPC_SANDPOINT_SERIAL_H
#include <linux/config.h>
-
+#if 0
#define SANDPOINT_SERIAL_0 0xfe0003f8
#define SANDPOINT_SERIAL_1 0xfe0002f8
+#endif //REX:
+
+//jackl
+#define TWO_CONSOLE 1
+//#define CPU_266 1
+#define CPU_200 1
+//#define CPU_166 1
+
+//jackl add
+#define UART0_INT 121\r
+#define UART1_INT 122
+//jackl end
+
+#define SANDPOINT_SERIAL_0 0xFC004500
+#define SANDPOINT_SERIAL_1 0xFC004600 //jackl
#ifdef CONFIG_SERIAL_MANY_PORTS
-#define RS_TABLE_SIZE 64
+#define RS_TABLE_SIZE 2 //64 jackl
#else
-#define RS_TABLE_SIZE 2
+#define RS_TABLE_SIZE 1
#endif
/* Rate for the 1.8432 Mhz clock for the onboard serial chip */
-#define BASE_BAUD ( 1843200 / 16 )
+//#define BASE_BAUD ( 1843200 / 16 )
+//REX:
+
+//jackl+
+#ifdef CPU_266
+#define BASE_BAUD (133000000/16)
+#endif
+#ifdef CPU_200
+#define BASE_BAUD (100000000/16)
+#endif
+#ifdef CPU_166
+#define BASE_BAUD (66000000/16)
+#endif
+//jackl end
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
+#endif
+
+//jackl+
+#ifndef TWO_CONSOLE
#define STD_SERIAL_PORT_DFNS \
- /* ttyS0 */ \
- { 0, BASE_BAUD, SANDPOINT_SERIAL_0, 4, ASYNC_BOOT_AUTOCONF, \
- iomem_base: (u8 *)SANDPOINT_SERIAL_0, \
- io_type: SERIAL_IO_MEM }, \
- /* ttyS1 */ \
- { 0, BASE_BAUD, SANDPOINT_SERIAL_1, 3, ASYNC_BOOT_AUTOCONF, \
- iomem_base: (u8 *)SANDPOINT_SERIAL_1, \
- io_type: SERIAL_IO_MEM },
+ { 0, BASE_BAUD, SANDPOINT_SERIAL_0, 121, STD_COM_FLAGS, /* ttyS0 */ \
+ iomem_base: (u8 *)SANDPOINT_SERIAL_0, \
+ io_type: SERIAL_IO_MEM },
#define SERIAL_PORT_DFNS \
STD_SERIAL_PORT_DFNS
+#else
+
+#define STD_SERIAL_PORT_DFNS(num) \
+ { 0, BASE_BAUD, SANDPOINT_SERIAL_##num, UART##num##_INT , STD_COM_FLAGS, /* ttyS0 */ \
+ iomem_base: (u8 *)SANDPOINT_SERIAL_##num, \
+ io_type: SERIAL_IO_MEM },
+
+#define SERIAL_PORT_DFNS \
+ STD_SERIAL_PORT_DFNS(0) \
+ STD_SERIAL_PORT_DFNS(1)
+#endif
+//jackl end
#endif /* __ASMPPC_SANDPOINT_SERIAL_H */