]>
Commit | Line | Data |
---|---|---|
87ecb68b PB |
1 | /* PCMCIA/Cardbus */ |
2 | ||
376253ec | 3 | #include "qemu-common.h" |
f455e98c | 4 | #include "sysemu.h" |
376253ec | 5 | |
bc24a225 | 6 | typedef struct { |
87ecb68b PB |
7 | qemu_irq irq; |
8 | int attached; | |
9 | const char *slot_string; | |
10 | const char *card_string; | |
bc24a225 | 11 | } PCMCIASocket; |
87ecb68b | 12 | |
bc24a225 PB |
13 | void pcmcia_socket_register(PCMCIASocket *socket); |
14 | void pcmcia_socket_unregister(PCMCIASocket *socket); | |
376253ec | 15 | void pcmcia_info(Monitor *mon); |
87ecb68b | 16 | |
bc24a225 | 17 | struct PCMCIACardState { |
87ecb68b | 18 | void *state; |
bc24a225 | 19 | PCMCIASocket *slot; |
87ecb68b PB |
20 | int (*attach)(void *state); |
21 | int (*detach)(void *state); | |
22 | const uint8_t *cis; | |
23 | int cis_len; | |
24 | ||
25 | /* Only valid if attached */ | |
26 | uint8_t (*attr_read)(void *state, uint32_t address); | |
27 | void (*attr_write)(void *state, uint32_t address, uint8_t value); | |
28 | uint16_t (*common_read)(void *state, uint32_t address); | |
29 | void (*common_write)(void *state, uint32_t address, uint16_t value); | |
30 | uint16_t (*io_read)(void *state, uint32_t address); | |
31 | void (*io_write)(void *state, uint32_t address, uint16_t value); | |
32 | }; | |
33 | ||
34 | #define CISTPL_DEVICE 0x01 /* 5V Device Information Tuple */ | |
35 | #define CISTPL_NO_LINK 0x14 /* No Link Tuple */ | |
36 | #define CISTPL_VERS_1 0x15 /* Level 1 Version Tuple */ | |
37 | #define CISTPL_JEDEC_C 0x18 /* JEDEC ID Tuple */ | |
38 | #define CISTPL_JEDEC_A 0x19 /* JEDEC ID Tuple */ | |
39 | #define CISTPL_CONFIG 0x1a /* Configuration Tuple */ | |
40 | #define CISTPL_CFTABLE_ENTRY 0x1b /* 16-bit PCCard Configuration */ | |
41 | #define CISTPL_DEVICE_OC 0x1c /* Additional Device Information */ | |
42 | #define CISTPL_DEVICE_OA 0x1d /* Additional Device Information */ | |
43 | #define CISTPL_DEVICE_GEO 0x1e /* Additional Device Information */ | |
44 | #define CISTPL_DEVICE_GEO_A 0x1f /* Additional Device Information */ | |
45 | #define CISTPL_MANFID 0x20 /* Manufacture ID Tuple */ | |
46 | #define CISTPL_FUNCID 0x21 /* Function ID Tuple */ | |
47 | #define CISTPL_FUNCE 0x22 /* Function Extension Tuple */ | |
48 | #define CISTPL_END 0xff /* Tuple End */ | |
49 | #define CISTPL_ENDMARK 0xff | |
50 | ||
51 | /* dscm1xxxx.c */ | |
f455e98c | 52 | PCMCIACardState *dscm1xxxx_init(DriveInfo *bdrv); |