pcmcia.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* PCMCIA/Cardbus */
  2. struct pcmcia_socket_s {
  3. qemu_irq irq;
  4. int attached;
  5. const char *slot_string;
  6. const char *card_string;
  7. };
  8. void pcmcia_socket_register(struct pcmcia_socket_s *socket);
  9. void pcmcia_socket_unregister(struct pcmcia_socket_s *socket);
  10. void pcmcia_info(void);
  11. struct pcmcia_card_s {
  12. void *state;
  13. struct pcmcia_socket_s *slot;
  14. int (*attach)(void *state);
  15. int (*detach)(void *state);
  16. const uint8_t *cis;
  17. int cis_len;
  18. /* Only valid if attached */
  19. uint8_t (*attr_read)(void *state, uint32_t address);
  20. void (*attr_write)(void *state, uint32_t address, uint8_t value);
  21. uint16_t (*common_read)(void *state, uint32_t address);
  22. void (*common_write)(void *state, uint32_t address, uint16_t value);
  23. uint16_t (*io_read)(void *state, uint32_t address);
  24. void (*io_write)(void *state, uint32_t address, uint16_t value);
  25. };
  26. #define CISTPL_DEVICE 0x01 /* 5V Device Information Tuple */
  27. #define CISTPL_NO_LINK 0x14 /* No Link Tuple */
  28. #define CISTPL_VERS_1 0x15 /* Level 1 Version Tuple */
  29. #define CISTPL_JEDEC_C 0x18 /* JEDEC ID Tuple */
  30. #define CISTPL_JEDEC_A 0x19 /* JEDEC ID Tuple */
  31. #define CISTPL_CONFIG 0x1a /* Configuration Tuple */
  32. #define CISTPL_CFTABLE_ENTRY 0x1b /* 16-bit PCCard Configuration */
  33. #define CISTPL_DEVICE_OC 0x1c /* Additional Device Information */
  34. #define CISTPL_DEVICE_OA 0x1d /* Additional Device Information */
  35. #define CISTPL_DEVICE_GEO 0x1e /* Additional Device Information */
  36. #define CISTPL_DEVICE_GEO_A 0x1f /* Additional Device Information */
  37. #define CISTPL_MANFID 0x20 /* Manufacture ID Tuple */
  38. #define CISTPL_FUNCID 0x21 /* Function ID Tuple */
  39. #define CISTPL_FUNCE 0x22 /* Function Extension Tuple */
  40. #define CISTPL_END 0xff /* Tuple End */
  41. #define CISTPL_ENDMARK 0xff
  42. /* dscm1xxxx.c */
  43. struct pcmcia_card_s *dscm1xxxx_init(BlockDriverState *bdrv);