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