diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/char/ip2/ip2.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'drivers/char/ip2/ip2.h')
-rw-r--r-- | drivers/char/ip2/ip2.h | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/drivers/char/ip2/ip2.h b/drivers/char/ip2/ip2.h new file mode 100644 index 000000000000..936ccc533949 --- /dev/null +++ b/drivers/char/ip2/ip2.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /******************************************************************************* | ||
2 | * | ||
3 | * (c) 1998 by Computone Corporation | ||
4 | * | ||
5 | ******************************************************************************** | ||
6 | * | ||
7 | * | ||
8 | * PACKAGE: Linux tty Device Driver for IntelliPort II family of multiport | ||
9 | * serial I/O controllers. | ||
10 | * | ||
11 | * DESCRIPTION: Driver constants for configuration and tuning | ||
12 | * | ||
13 | * NOTES: | ||
14 | * | ||
15 | *******************************************************************************/ | ||
16 | #ifndef IP2_H | ||
17 | #define IP2_H | ||
18 | |||
19 | #include "ip2types.h" | ||
20 | #include "i2cmd.h" | ||
21 | |||
22 | /*************/ | ||
23 | /* Constants */ | ||
24 | /*************/ | ||
25 | |||
26 | /* Device major numbers - since version 2.0.26. */ | ||
27 | #define IP2_TTY_MAJOR 71 | ||
28 | #define IP2_CALLOUT_MAJOR 72 | ||
29 | #define IP2_IPL_MAJOR 73 | ||
30 | |||
31 | /* Board configuration array. | ||
32 | * This array defines the hardware irq and address for up to IP2_MAX_BOARDS | ||
33 | * (4 supported per ip2_types.h) ISA board addresses and irqs MUST be specified, | ||
34 | * PCI and EISA boards are probed for and automagicly configed | ||
35 | * iff the addresses are set to 1 and 2 respectivily. | ||
36 | * 0x0100 - 0x03f0 == ISA | ||
37 | * 1 == PCI | ||
38 | * 2 == EISA | ||
39 | * 0 == (skip this board) | ||
40 | * This array defines the hardware addresses for them. Special | ||
41 | * addresses are EISA and PCI which go sniffing for boards. | ||
42 | |||
43 | * In a multiboard system the position in the array determines which port | ||
44 | * devices are assigned to each board: | ||
45 | * board 0 is assigned ttyF0.. to ttyF63, | ||
46 | * board 1 is assigned ttyF64 to ttyF127, | ||
47 | * board 2 is assigned ttyF128 to ttyF191, | ||
48 | * board 3 is assigned ttyF192 to ttyF255. | ||
49 | * | ||
50 | * In PCI and EISA bus systems each range is mapped to card in | ||
51 | * monotonically increasing slot number order, ISA position is as specified | ||
52 | * here. | ||
53 | |||
54 | * If the irqs are ALL set to 0,0,0,0 all boards operate in | ||
55 | * polled mode. For interrupt operation ISA boards require that the IRQ be | ||
56 | * specified, while PCI and EISA boards any nonzero entry | ||
57 | * will enable interrupts using the BIOS configured irq for the board. | ||
58 | * An invalid irq entry will default to polled mode for that card and print | ||
59 | * console warning. | ||
60 | |||
61 | * When the driver is loaded as a module these setting can be overridden on the | ||
62 | * modprobe command line or on an option line in /etc/modprobe.conf. | ||
63 | * If the driver is built-in the configuration must be | ||
64 | * set here for ISA cards and address set to 1 and 2 for PCI and EISA. | ||
65 | * | ||
66 | * Here is an example that shows most if not all possibe combinations: | ||
67 | |||
68 | *static ip2config_t ip2config = | ||
69 | *{ | ||
70 | * {11,1,0,0}, // irqs | ||
71 | * { // Addresses | ||
72 | * 0x0308, // Board 0, ttyF0 - ttyF63// ISA card at io=0x308, irq=11 | ||
73 | * 0x0001, // Board 1, ttyF64 - ttyF127//PCI card configured by BIOS | ||
74 | * 0x0000, // Board 2, ttyF128 - ttyF191// Slot skipped | ||
75 | * 0x0002 // Board 3, ttyF192 - ttyF255//EISA card configured by BIOS | ||
76 | * // but polled not irq driven | ||
77 | * } | ||
78 | *}; | ||
79 | */ | ||
80 | |||
81 | /* this structure is zeroed out because the suggested method is to configure | ||
82 | * the driver as a module, set up the parameters with an options line in | ||
83 | * /etc/modprobe.conf and load with modprobe or kmod, the kernel | ||
84 | * module loader | ||
85 | */ | ||
86 | |||
87 | /* This structure is NOW always initialized when the driver is initialized. | ||
88 | * Compiled in defaults MUST be added to the io and irq arrays in | ||
89 | * ip2.c. Those values are configurable from insmod parameters in the | ||
90 | * case of modules or from command line parameters (ip2=io,irq) when | ||
91 | * compiled in. | ||
92 | */ | ||
93 | |||
94 | static ip2config_t ip2config = | ||
95 | { | ||
96 | {0,0,0,0}, // irqs | ||
97 | { // Addresses | ||
98 | /* Do NOT set compile time defaults HERE! Use the arrays in | ||
99 | ip2.c! These WILL be overwritten! =mhw= */ | ||
100 | 0x0000, // Board 0, ttyF0 - ttyF63 | ||
101 | 0x0000, // Board 1, ttyF64 - ttyF127 | ||
102 | 0x0000, // Board 2, ttyF128 - ttyF191 | ||
103 | 0x0000 // Board 3, ttyF192 - ttyF255 | ||
104 | } | ||
105 | }; | ||
106 | |||
107 | #endif | ||