Changeset d55af6d in rtems
- Timestamp:
- 11/09/99 15:38:47 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b671c6a
- Parents:
- 53b1847
- Location:
- c/src/lib/libbsp/powerpc/ppcn_60x/console
- Files:
-
- 6 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/ppcn_60x/console/Makefile.in
r53b1847 rd55af6d 17 17 18 18 # C source names, if any, go here -- minus the .c 19 C_PIECES = console ns16550 z85c30 i8042vga i8042vga19 C_PIECES = console i8042vga i8042 ns16550cfg z85c30cfg vga 20 20 C_FILES = $(C_PIECES:%=%.c) 21 21 C_O_FILES = $(C_PIECES:%=${ARCH}/%.o) -
c/src/lib/libbsp/powerpc/ppcn_60x/console/config.c
r53b1847 rd55af6d 18 18 */ 19 19 20 #include <libchip/serial.h> 21 #include <libchip/mc68681.h> 22 #include <libchip/z85c30.h> 20 23 #include "i8042vga.h" 21 #include "ns16550.h" 22 #include "z85c30.h" 24 25 #include "ns16550cfg.h" 26 #include "z85c30cfg.h" 23 27 24 28 #include <pci.h> … … 26 30 #define PMX1553_BUS 2 27 31 #define PMX1553_SLOT 1 32 33 /* 34 * Based on BSP configuration information decide whether to do polling IO 35 * or interrupt driven IO. 36 */ 37 38 #if (CONSOLE_USE_INTERRUPTS) 39 #define NS16550_FUNCTIONS &ns16550_fns 40 #define Z85C30_FUNCTIONS &z85c30_fns 41 #else 42 #define NS16550_FUNCTIONS &ns16550_fns_polled 43 #define Z85C30_FUNCTIONS &z85c30_fns_polled 44 #endif 28 45 29 46 /* … … 74 91 { 75 92 "/dev/vga", /* sDeviceName */ 93 SERIAL_CUSTOM, /* deviceType */ 76 94 &i8042vga_fns, /* pDeviceFns */ 77 95 NULL, /* deviceProbe */ … … 83 101 0, /* ulCtrlPort2 */ 84 102 I8042_DATA, /* ulDataPort */ 103 Read_ns16550_register, /* getRegister */ 104 Write_ns16550_register, /* setRegister */ 105 NULL, /* getData */ 106 NULL, /* setData */ 107 0, /* ulClock */ 85 108 PPCN_60X_IRQ_KBD /* ulIntVector */ 86 109 }, 87 110 { 88 111 "/dev/com1", /* sDeviceName */ 89 &ns16550_fns, /* pDeviceFns */ 112 SERIAL_NS16550, /* deviceType */ 113 NS16550_FUNCTIONS, /* pDeviceFns */ 90 114 NULL, /* deviceProbe */ 91 115 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 96 120 0, /* ulCtrlPort2 */ 97 121 NS16550_PORT_A, /* ulDataPort */ 122 Read_ns16550_register, /* getRegister */ 123 Write_ns16550_register, /* setRegister */ 124 NULL, /* getData */ 125 NULL, /* setData */ 126 0, /* ulClock */ 98 127 PPCN_60X_IRQ_COM1 /* ulIntVector */ 99 128 }, 100 129 { 101 130 "/dev/ser1", /* sDeviceName */ 102 &ns16550_fns, /* pDeviceFns */ 131 SERIAL_NS16550, /* deviceType */ 132 NS16550_FUNCTIONS, /* pDeviceFns */ 103 133 config_PMX1553_probe, /* deviceProbe */ 104 134 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 109 139 PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */ 110 140 1, /* Channel 1-4 */ /* ulDataPort */ 141 NULL, /* getRegister */ 142 NULL, /* setRegister */ 143 NULL, /* getData */ 144 NULL, /* setData */ 145 0, /* ulClock */ 111 146 0 /* RS232 */ /* ulIntVector */ 112 147 }, 113 148 { 114 149 "/dev/ser2", /* sDeviceName */ 115 &ns16550_fns, /* pDeviceFns */ 150 SERIAL_NS16550, /* deviceType */ 151 NS16550_FUNCTIONS, /* pDeviceFns */ 116 152 config_PMX1553_probe, /* deviceProbe */ 117 153 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 122 158 PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */ 123 159 2, /* Channel 1-4 */ /* ulDataPort */ 160 Read_ns16550_register, /* getRegister */ 161 Write_ns16550_register, /* setRegister */ 162 NULL, /* getData */ 163 NULL, /* setData */ 164 0, /* ulClock */ 124 165 0 /* RS232 */ /* ulIntVector */ 125 166 }, 126 167 { 127 168 "/dev/ser3", /* sDeviceName */ 128 &ns16550_fns, /* pDeviceFns */ 169 SERIAL_NS16550, /* deviceType */ 170 NS16550_FUNCTIONS, /* pDeviceFns */ 129 171 config_PMX1553_probe, /* deviceProbe */ 130 172 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 135 177 PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */ 136 178 3, /* Channel 1-4 */ /* ulDataPort */ 179 Read_ns16550_register, /* getRegister */ 180 Write_ns16550_register, /* setRegister */ 181 NULL, /* getData */ 182 NULL, /* setData */ 183 0, /* ulClock */ 137 184 0 /* RS232 */ /* ulIntVector */ 138 185 }, 139 186 { 140 187 "/dev/ser4", /* sDeviceName */ 141 &ns16550_fns, /* pDeviceFns */ 188 SERIAL_NS16550, /* deviceType */ 189 NS16550_FUNCTIONS, /* pDeviceFns */ 142 190 config_PMX1553_probe, /* deviceProbe */ 143 191 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 148 196 PMX1553_SLOT, /* PCI slot */ /* ulCtrlPort2 */ 149 197 4, /* Channel 1-4 */ /* ulDataPort */ 198 Read_ns16550_register, /* getRegister */ 199 Write_ns16550_register, /* setRegister */ 200 NULL, /* getData */ 201 NULL, /* setData */ 202 0, /* ulClock */ 150 203 0 /* RS232 */ /* ulIntVector */ 151 204 }, … … 153 206 { 154 207 "/dev/com2", /* sDeviceName */ 155 &ns16550_fns, /* pDeviceFns */ 208 SERIAL_NS16550, /* deviceType */ 209 NS16550_FUNCTIONS, /* pDeviceFns */ 156 210 NULL, /* deviceProbe */ 157 211 &ns16550_flow_RTSCTS, /* pDeviceFlow */ … … 162 216 0, /* ulCtrlPort2 */ 163 217 NS16550_PORT_B, /* ulDataPort */ 218 Read_ns16550_register, /* getRegister */ 219 Write_ns16550_register, /* setRegister */ 220 NULL, /* getData */ 221 NULL, /* setData */ 222 0, /* ulClock */ 164 223 PPCN_60X_IRQ_COM2 /* ulIntVector */ 165 224 }, … … 167 226 { 168 227 "/dev/com3", /* sDeviceName */ 169 &z85c30_fns, /* pDeviceFns */ 228 SERIAL_Z85C30, /* deviceType */ 229 Z85C30_FUNCTIONS, /* pDeviceFns */ 170 230 config_z85c30_probe, /* deviceProbe */ 171 231 &z85c30_flow_RTSCTS, /* pDeviceFlow */ … … 176 236 Z85C30_CTRL_A, /* ulCtrlPort2 */ 177 237 Z85C30_DATA_A, /* ulDataPort */ 238 Read_85c30_register, /* getRegister */ 239 Write_85c30_register, /* setRegister */ 240 Read_85c30_data, /* getData */ 241 Write_85c30_data, /* setData */ 242 0, /* ulClock */ 178 243 PPCN_60X_IRQ_COM3_4 /* ulIntVector */ 179 244 }, 180 245 { 181 246 "/dev/com4", /* sDeviceName */ 182 &z85c30_fns, /* pDeviceFns */ 247 SERIAL_Z85C30, /* deviceType */ 248 Z85C30_FUNCTIONS, /* pDeviceFns */ 183 249 config_z85c30_probe, /* deviceProbe */ 184 250 &z85c30_flow_RTSCTS, /* pDeviceFlow */ … … 189 255 Z85C30_CTRL_A, /* ulCtrlPort2 */ 190 256 Z85C30_DATA_B, /* ulDataPort */ 257 Read_85c30_register, /* getRegister */ 258 Write_85c30_register, /* setRegister */ 259 Read_85c30_data, /* getData */ 260 Write_85c30_data, /* setData */ 261 0, /* ulClock */ 191 262 PPCN_60X_IRQ_COM3_4 /* ulIntVector */ 192 263 } -
c/src/lib/libbsp/powerpc/ppcn_60x/console/console.h
r53b1847 rd55af6d 21 21 22 22 #include <ringbuf.h> 23 24 typedef struct _console_fns { 25 boolean (*deviceProbe)(int minor); 26 int (*deviceFirstOpen)(int major, int minor, void *arg); 27 int (*deviceLastClose)(int major, int minor, void *arg); 28 int (*deviceRead)(int minor); 29 int (*deviceWrite)(int minor, const char *buf, int len); 30 void (*deviceInitialize)(int minor); 31 int (*deviceSetAttributes)(int minor, const struct termios *); 32 void (*deviceWritePolled)(int minor, char cChar); 33 int deviceOutputUsesInterrupts; 34 } console_fns; 35 36 typedef struct _console_flow { 37 int (*deviceStopRemoteTx)(int minor); 38 int (*deviceStartRemoteTx)(int minor); 39 } console_flow; 40 41 typedef struct _console_tbl { 42 char *sDeviceName; 43 console_fns *pDeviceFns; 44 boolean (*deviceProbe)(int minor); 45 console_flow *pDeviceFlow; 46 unsigned32 ulMargin; 47 unsigned32 ulHysteresis; 48 void *pDeviceParams; 49 unsigned32 ulCtrlPort1; 50 unsigned32 ulCtrlPort2; 51 unsigned32 ulDataPort; 52 unsigned int ulIntVector; 53 } console_tbl; 54 55 typedef struct _console_data { 56 void *termios_data; 57 volatile boolean bActive; 58 volatile Ring_buffer_t TxBuffer; 59 /* 60 * This field may be used for any purpose required by the driver 61 */ 62 void *pDeviceContext; 63 } console_data; 23 #include <libchip/serial.h> 24 #include <libchip/ns16550.h> 25 #include <libchip/z85c30.h> 64 26 65 27 extern console_tbl Console_Port_Tbl[]; -
c/src/lib/libbsp/powerpc/ppcn_60x/console/i8042.c
r53b1847 rd55af6d 25 25 #include <bsp.h> 26 26 #include <rtems/libio.h> 27 #include <libchip/serial.h> 27 28 #include <ringbuf.h> 28 29
Note: See TracChangeset
for help on using the changeset viewer.