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.7KB

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