00001
00002
00003 struct pcmcia_socket_s {
00004 qemu_irq irq;
00005 int attached;
00006 const char *slot_string;
00007 const char *card_string;
00008 };
00009
00010 void pcmcia_socket_register(struct pcmcia_socket_s *socket);
00011 void pcmcia_socket_unregister(struct pcmcia_socket_s *socket);
00012 void pcmcia_info(void);
00013
00014 struct pcmcia_card_s {
00015 void *state;
00016 struct pcmcia_socket_s *slot;
00017 int (*attach)(void *state);
00018 int (*detach)(void *state);
00019 const uint8_t *cis;
00020 int cis_len;
00021
00022
00023 uint8_t (*attr_read)(void *state, uint32_t address);
00024 void (*attr_write)(void *state, uint32_t address, uint8_t value);
00025 uint16_t (*common_read)(void *state, uint32_t address);
00026 void (*common_write)(void *state, uint32_t address, uint16_t value);
00027 uint16_t (*io_read)(void *state, uint32_t address);
00028 void (*io_write)(void *state, uint32_t address, uint16_t value);
00029 };
00030
00031 #define CISTPL_DEVICE 0x01
00032 #define CISTPL_NO_LINK 0x14
00033 #define CISTPL_VERS_1 0x15
00034 #define CISTPL_JEDEC_C 0x18
00035 #define CISTPL_JEDEC_A 0x19
00036 #define CISTPL_CONFIG 0x1a
00037 #define CISTPL_CFTABLE_ENTRY 0x1b
00038 #define CISTPL_DEVICE_OC 0x1c
00039 #define CISTPL_DEVICE_OA 0x1d
00040 #define CISTPL_DEVICE_GEO 0x1e
00041 #define CISTPL_DEVICE_GEO_A 0x1f
00042 #define CISTPL_MANFID 0x20
00043 #define CISTPL_FUNCID 0x21
00044 #define CISTPL_FUNCE 0x22
00045 #define CISTPL_END 0xff
00046 #define CISTPL_ENDMARK 0xff
00047
00048
00049 struct pcmcia_card_s *dscm1xxxx_init(BlockDriverState *bdrv);