ip2.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. #include "ip2types.h"
  19. #include "i2cmd.h"
  20. /*************/
  21. /* Constants */
  22. /*************/
  23. /* Device major numbers - since version 2.0.26. */
  24. #define IP2_TTY_MAJOR 71
  25. #define IP2_CALLOUT_MAJOR 72
  26. #define IP2_IPL_MAJOR 73
  27. /* Board configuration array.
  28. * This array defines the hardware irq and address for up to IP2_MAX_BOARDS
  29. * (4 supported per ip2_types.h) ISA board addresses and irqs MUST be specified,
  30. * PCI and EISA boards are probed for and automagicly configed
  31. * iff the addresses are set to 1 and 2 respectivily.
  32. * 0x0100 - 0x03f0 == ISA
  33. * 1 == PCI
  34. * 2 == EISA
  35. * 0 == (skip this board)
  36. * This array defines the hardware addresses for them. Special
  37. * addresses are EISA and PCI which go sniffing for boards.
  38. * In a multiboard system the position in the array determines which port
  39. * devices are assigned to each board:
  40. * board 0 is assigned ttyF0.. to ttyF63,
  41. * board 1 is assigned ttyF64 to ttyF127,
  42. * board 2 is assigned ttyF128 to ttyF191,
  43. * board 3 is assigned ttyF192 to ttyF255.
  44. *
  45. * In PCI and EISA bus systems each range is mapped to card in
  46. * monotonically increasing slot number order, ISA position is as specified
  47. * here.
  48. * If the irqs are ALL set to 0,0,0,0 all boards operate in
  49. * polled mode. For interrupt operation ISA boards require that the IRQ be
  50. * specified, while PCI and EISA boards any nonzero entry
  51. * will enable interrupts using the BIOS configured irq for the board.
  52. * An invalid irq entry will default to polled mode for that card and print
  53. * console warning.
  54. * When the driver is loaded as a module these setting can be overridden on the
  55. * modprobe command line or on an option line in /etc/modprobe.conf.
  56. * If the driver is built-in the configuration must be
  57. * set here for ISA cards and address set to 1 and 2 for PCI and EISA.
  58. *
  59. * Here is an example that shows most if not all possibe combinations:
  60. *static ip2config_t ip2config =
  61. *{
  62. * {11,1,0,0}, // irqs
  63. * { // Addresses
  64. * 0x0308, // Board 0, ttyF0 - ttyF63// ISA card at io=0x308, irq=11
  65. * 0x0001, // Board 1, ttyF64 - ttyF127//PCI card configured by BIOS
  66. * 0x0000, // Board 2, ttyF128 - ttyF191// Slot skipped
  67. * 0x0002 // Board 3, ttyF192 - ttyF255//EISA card configured by BIOS
  68. * // but polled not irq driven
  69. * }
  70. *};
  71. */
  72. /* this structure is zeroed out because the suggested method is to configure
  73. * the driver as a module, set up the parameters with an options line in
  74. * /etc/modprobe.conf and load with modprobe or kmod, the kernel
  75. * module loader
  76. */
  77. /* This structure is NOW always initialized when the driver is initialized.
  78. * Compiled in defaults MUST be added to the io and irq arrays in
  79. * ip2.c. Those values are configurable from insmod parameters in the
  80. * case of modules or from command line parameters (ip2=io,irq) when
  81. * compiled in.
  82. */
  83. static ip2config_t ip2config =
  84. {
  85. {0,0,0,0}, // irqs
  86. { // Addresses
  87. /* Do NOT set compile time defaults HERE! Use the arrays in
  88. ip2.c! These WILL be overwritten! =mhw= */
  89. 0x0000, // Board 0, ttyF0 - ttyF63
  90. 0x0000, // Board 1, ttyF64 - ttyF127
  91. 0x0000, // Board 2, ttyF128 - ttyF191
  92. 0x0000 // Board 3, ttyF192 - ttyF255
  93. }
  94. };
  95. #endif