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