Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

mca.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * MCA bus driver code
  3. *
  4. * Abstracted from 3c509.c.
  5. *
  6. */
  7. #ifndef MCA_H
  8. #define MCA_H
  9. #include "isa_ids.h"
  10. #include "nic.h"
  11. #define MCA_BUS_TYPE 3
  12. /*
  13. * MCA constants
  14. *
  15. */
  16. #define MCA_MOTHERBOARD_SETUP_REG 0x94
  17. #define MCA_ADAPTER_SETUP_REG 0x96
  18. #define MCA_MAX_SLOT_NR 0x07 /* Must be 2^n - 1 */
  19. #define MCA_POS_REG(n) (0x100+(n))
  20. /* Is there a standard that would define this? */
  21. #define GENERIC_MCA_VENDOR ISA_VENDOR ( 'M', 'C', 'A' )
  22. /*
  23. * A location on an MCA bus
  24. *
  25. */
  26. struct mca_loc {
  27. unsigned int slot;
  28. };
  29. /*
  30. * A physical MCA device
  31. *
  32. */
  33. struct mca_device {
  34. const char *name;
  35. unsigned int slot;
  36. unsigned char pos[8];
  37. };
  38. #define MCA_ID(mca) ( ( (mca)->pos[1] << 8 ) + (mca)->pos[0] )
  39. /*
  40. * An individual MCA device identified by ID
  41. *
  42. */
  43. struct mca_id {
  44. const char *name;
  45. int id;
  46. };
  47. /*
  48. * An MCA driver, with a device ID (struct mca_id) table.
  49. *
  50. */
  51. struct mca_driver {
  52. struct mca_id *ids;
  53. unsigned int id_count;
  54. };
  55. /*
  56. * Define an MCA driver
  57. *
  58. */
  59. #define MCA_DRIVER( _name, _ids ) \
  60. static struct mca_driver _name = { \
  61. .ids = _ids, \
  62. .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \
  63. }
  64. /*
  65. * Functions in mca.c
  66. *
  67. */
  68. extern void mca_fill_nic ( struct nic *nic, struct mca_device *mca );
  69. /*
  70. * MCA bus global definition
  71. *
  72. */
  73. extern struct bus_driver mca_driver;
  74. #endif