You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mca.h 1.3KB

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