cleanup
[linux-2.4.git] / arch / ppc / platforms / sandpoint_serial.h
1 /*
2  * include/asm-ppc/sandpoint_serial.h
3  * 
4  * Definitions for Motorola SPS Sandpoint Test Platform
5  *
6  * Author: Mark A. Greer
7  *         mgreer@mvista.com
8  *
9  * Copyright 2001 MontaVista Software Inc.
10  *
11  * This program is free software; you can redistribute  it and/or modify it
12  * under  the terms of  the GNU General Public License as published by the
13  * Free Software Foundation;  either version 2 of the  License, or (at your
14  * option) any later version.
15  */
16
17 #ifndef __ASMPPC_SANDPOINT_SERIAL_H
18 #define __ASMPPC_SANDPOINT_SERIAL_H
19
20 #include <linux/config.h>
21 #if 0
22 #define SANDPOINT_SERIAL_0              0xfe0003f8
23 #define SANDPOINT_SERIAL_1              0xfe0002f8
24 #endif //REX:
25
26 //jackl
27 #define TWO_CONSOLE 1
28 //#define       CPU_266 1
29 #define CPU_200 1
30 //#define       CPU_166 1
31
32 //jackl add
33 #define UART0_INT       121\r
34 #define UART1_INT       122
35 //jackl end
36
37 #define SANDPOINT_SERIAL_0 0xFC004500
38 #define SANDPOINT_SERIAL_1 0xFC004600   //jackl
39
40 #ifdef CONFIG_SERIAL_MANY_PORTS
41 #define RS_TABLE_SIZE  2        //64    jackl
42 #else
43 #define RS_TABLE_SIZE 1 
44 #endif
45
46 /* Rate for the 1.8432 Mhz clock for the onboard serial chip */
47 //#define BASE_BAUD ( 1843200 / 16 )
48 //REX:
49
50 //jackl+
51 #ifdef CPU_266
52 #define BASE_BAUD (133000000/16)
53 #endif
54 #ifdef CPU_200
55 #define BASE_BAUD (100000000/16)
56 #endif
57 #ifdef CPU_166
58 #define BASE_BAUD (66000000/16)
59 #endif
60 //jackl end
61
62 #ifdef CONFIG_SERIAL_DETECT_IRQ
63 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
64 #else
65 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
66 #endif
67
68 //jackl+
69 #ifndef TWO_CONSOLE
70 #define STD_SERIAL_PORT_DFNS \
71         { 0, BASE_BAUD, SANDPOINT_SERIAL_0, 121, STD_COM_FLAGS, /* ttyS0 */ \
72                 iomem_base: (u8 *)SANDPOINT_SERIAL_0,                     \
73                 io_type: SERIAL_IO_MEM },                                
74
75 #define SERIAL_PORT_DFNS \
76         STD_SERIAL_PORT_DFNS
77 #else
78
79 #define STD_SERIAL_PORT_DFNS(num) \
80         { 0, BASE_BAUD, SANDPOINT_SERIAL_##num, UART##num##_INT , STD_COM_FLAGS, /* ttyS0 */ \
81                 iomem_base: (u8 *)SANDPOINT_SERIAL_##num,                         \
82                 io_type: SERIAL_IO_MEM },                                
83
84 #define SERIAL_PORT_DFNS \
85         STD_SERIAL_PORT_DFNS(0) \
86         STD_SERIAL_PORT_DFNS(1)
87 #endif        
88 //jackl end
89
90 #endif /* __ASMPPC_SANDPOINT_SERIAL_H */