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