8 typedef struct PCMCIASocket
{
11 const char *slot_string
;
12 const char *card_string
;
15 void pcmcia_socket_register(PCMCIASocket
*socket
);
16 void pcmcia_socket_unregister(PCMCIASocket
*socket
);
17 void pcmcia_info(Monitor
*mon
, const QDict
*qdict
);
19 #define TYPE_PCMCIA_CARD "pcmcia-card"
20 #define PCMCIA_CARD(obj) \
21 OBJECT_CHECK(PCMCIACardState, (obj), TYPE_PCMCIA_CARD)
22 #define PCMCIA_CARD_GET_CLASS(obj) \
23 OBJECT_GET_CLASS(PCMCIACardClass, obj, TYPE_PCMCIA_CARD)
24 #define PCMCIA_CARD_CLASS(cls) \
25 OBJECT_CLASS_CHECK(PCMCIACardClass, cls, TYPE_PCMCIA_CARD)
27 struct PCMCIACardState
{
29 DeviceState parent_obj
;
35 typedef struct PCMCIACardClass
{
37 DeviceClass parent_class
;
40 int (*attach
)(PCMCIACardState
*state
);
41 int (*detach
)(PCMCIACardState
*state
);
46 /* Only valid if attached */
47 uint8_t (*attr_read
)(PCMCIACardState
*card
, uint32_t address
);
48 void (*attr_write
)(PCMCIACardState
*card
, uint32_t address
, uint8_t value
);
49 uint16_t (*common_read
)(PCMCIACardState
*card
, uint32_t address
);
50 void (*common_write
)(PCMCIACardState
*card
,
51 uint32_t address
, uint16_t value
);
52 uint16_t (*io_read
)(PCMCIACardState
*card
, uint32_t address
);
53 void (*io_write
)(PCMCIACardState
*card
, uint32_t address
, uint16_t value
);
56 #define CISTPL_DEVICE 0x01 /* 5V Device Information Tuple */
57 #define CISTPL_NO_LINK 0x14 /* No Link Tuple */
58 #define CISTPL_VERS_1 0x15 /* Level 1 Version Tuple */
59 #define CISTPL_JEDEC_C 0x18 /* JEDEC ID Tuple */
60 #define CISTPL_JEDEC_A 0x19 /* JEDEC ID Tuple */
61 #define CISTPL_CONFIG 0x1a /* Configuration Tuple */
62 #define CISTPL_CFTABLE_ENTRY 0x1b /* 16-bit PCCard Configuration */
63 #define CISTPL_DEVICE_OC 0x1c /* Additional Device Information */
64 #define CISTPL_DEVICE_OA 0x1d /* Additional Device Information */
65 #define CISTPL_DEVICE_GEO 0x1e /* Additional Device Information */
66 #define CISTPL_DEVICE_GEO_A 0x1f /* Additional Device Information */
67 #define CISTPL_MANFID 0x20 /* Manufacture ID Tuple */
68 #define CISTPL_FUNCID 0x21 /* Function ID Tuple */
69 #define CISTPL_FUNCE 0x22 /* Function Extension Tuple */
70 #define CISTPL_END 0xff /* Tuple End */
71 #define CISTPL_ENDMARK 0xff
74 PCMCIACardState
*dscm1xxxx_init(DriveInfo
*bdrv
);