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.

eisa.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef EISA_H
  2. #define EISA_H
  3. #include "isa_ids.h"
  4. #include "dev.h"
  5. /*
  6. * EISA constants
  7. *
  8. */
  9. #define EISA_MIN_SLOT (0x1)
  10. #define EISA_MAX_SLOT (0xf)
  11. #define EISA_SLOT_BASE( n ) ( 0x1000 * (n) )
  12. #define EISA_MFG_ID_HI ( 0xc80 )
  13. #define EISA_MFG_ID_LO ( 0xc81 )
  14. #define EISA_PROD_ID_HI ( 0xc82 )
  15. #define EISA_PROD_ID_LO ( 0xc83 )
  16. #define EISA_GLOBAL_CONFIG ( 0xc84 )
  17. #define EISA_CMD_RESET ( 1 << 2 )
  18. #define EISA_CMD_ENABLE ( 1 << 0 )
  19. /*
  20. * A physical EISA device
  21. *
  22. */
  23. struct eisa_device {
  24. char *magic; /* must be first */
  25. const char *name;
  26. unsigned int slot;
  27. uint16_t ioaddr;
  28. uint16_t mfg_id;
  29. uint16_t prod_id;
  30. int already_tried;
  31. };
  32. /*
  33. * An individual EISA device identified by ID
  34. *
  35. */
  36. struct eisa_id {
  37. const char *name;
  38. uint16_t mfg_id, prod_id;
  39. };
  40. /*
  41. * An EISA driver, with a device ID (struct eisa_id) table.
  42. *
  43. */
  44. struct eisa_driver {
  45. const char *name;
  46. struct eisa_id *ids;
  47. unsigned int id_count;
  48. };
  49. /*
  50. * Define an EISA driver
  51. *
  52. */
  53. #define EISA_DRIVER( driver_name, eisa_ids ) { \
  54. .name = driver_name, \
  55. .ids = eisa_ids, \
  56. .id_count = sizeof ( eisa_ids ) / sizeof ( eisa_ids[0] ), \
  57. }
  58. /*
  59. * Functions in eisa.c
  60. *
  61. */
  62. extern int find_eisa_device ( struct eisa_device *eisa,
  63. struct eisa_driver *driver );
  64. extern int find_eisa_boot_device ( struct dev *dev,
  65. struct eisa_driver *driver );
  66. extern void enable_eisa_device ( struct eisa_device *eisa );
  67. #endif /* EISA_H */