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.

isa.h 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef ISA_H
  2. #define ISA_H
  3. #include "stdint.h"
  4. #include "isa_ids.h"
  5. #include "nic.h"
  6. /*
  7. * A location on an ISA bus
  8. *
  9. */
  10. struct isa_driver;
  11. struct isa_loc {
  12. unsigned int driver;
  13. unsigned int probe_idx;
  14. };
  15. /*
  16. * A physical ISA device
  17. *
  18. */
  19. struct isa_device {
  20. const char *name;
  21. struct isa_driver *driver;
  22. uint16_t ioaddr;
  23. uint16_t mfg_id;
  24. uint16_t prod_id;
  25. };
  26. /*
  27. * An individual ISA device, identified by probe address
  28. *
  29. */
  30. typedef uint16_t isa_probe_addr_t;
  31. /*
  32. * An ISA driver, with a probe address list and a probe_addr method.
  33. * probe_addr() should return 1 if a card is physically present,
  34. * leaving the other operations (read MAC address etc.) down to the
  35. * main probe() routine.
  36. *
  37. */
  38. struct isa_driver {
  39. const char *name;
  40. isa_probe_addr_t *probe_addrs;
  41. unsigned int addr_count;
  42. int ( * probe_addr ) ( isa_probe_addr_t addr );
  43. uint16_t mfg_id;
  44. uint16_t prod_id;
  45. };
  46. /*
  47. * Define an ISA driver
  48. *
  49. */
  50. #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) \
  51. struct isa_driver _name __table(isa_driver,01 ) = { \
  52. .probe_addrs = _probe_addrs, \
  53. .addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
  54. .probe_addr = _probe_addr, \
  55. .mfg_id = _mfg_id, \
  56. .prod_id = _prod_id, \
  57. }
  58. /*
  59. * ISA_ROM is parsed by parserom.pl to generate Makefile rules and
  60. * files for rom-o-matic.
  61. *
  62. */
  63. #define ISA_ROM( IMAGE, DESCRIPTION )
  64. /*
  65. * Functions in isa.c
  66. *
  67. */
  68. extern void isa_fill_nic ( struct nic *nic, struct isa_device *isa );
  69. /*
  70. * ISA bus global definition
  71. *
  72. */
  73. extern struct bus_driver isa_driver;
  74. #endif /* ISA_H */