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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. typedef uint16_t isa_probe_addr_t;
  20. /*
  21. * An ISA driver, with a probe address list and a probe_addr method.
  22. * probe_addr() should return 1 if a card is physically present,
  23. * leaving the other operations (read MAC address etc.) down to the
  24. * main probe() routine.
  25. *
  26. */
  27. struct isa_driver {
  28. const char *name;
  29. isa_probe_addr_t *probe_addrs;
  30. unsigned int addr_count;
  31. int ( * probe_addr ) ( isa_probe_addr_t addr );
  32. uint16_t mfg_id;
  33. uint16_t prod_id;
  34. };
  35. /*
  36. * Define an ISA driver
  37. *
  38. */
  39. #define ISA_DRIVER( _name, _probe_addrs, _probe_addr, _mfg_id, _prod_id ) { \
  40. .name = _name, \
  41. .probe_addrs = _probe_addrs, \
  42. .addr_count = sizeof ( _probe_addrs ) / sizeof ( _probe_addrs[0] ), \
  43. .probe_addr = _probe_addr, \
  44. .mfg_id = _mfg_id, \
  45. .prod_id = _prod_id, \
  46. }
  47. /*
  48. * ISA_ROM is parsed by parserom.pl to generate Makefile rules and
  49. * files for rom-o-matic.
  50. *
  51. */
  52. #define ISA_ROM( IMAGE, DESCRIPTION )
  53. /*
  54. * Functions in isa.c
  55. *
  56. */
  57. extern int find_isa_device ( struct isa_device *eisa,
  58. struct isa_driver *driver );
  59. extern int find_isa_boot_device ( struct dev *dev,
  60. struct isa_driver *driver );
  61. /*
  62. * config.c defines isa_extra_probe_addrs and isa_extra_probe_addr_count.
  63. *
  64. */
  65. extern isa_probe_addr_t isa_extra_probe_addrs[];
  66. extern unsigned int isa_extra_probe_addr_count;
  67. #endif /* ISA_H */