root / hw / flash.h @ b0eb8449
History | View | Annotate | Download (2.1 kB)
1 | 87ecb68b | pbrook | /* NOR flash devices */
|
---|---|---|---|
2 | cfe5f011 | Avi Kivity | |
3 | cfe5f011 | Avi Kivity | #include "memory.h" |
4 | cfe5f011 | Avi Kivity | |
5 | c227f099 | Anthony Liguori | typedef struct pflash_t pflash_t; |
6 | 87ecb68b | pbrook | |
7 | 88eeee0a | balrog | /* pflash_cfi01.c */
|
8 | cfe5f011 | Avi Kivity | pflash_t *pflash_cfi01_register(target_phys_addr_t base, |
9 | cfe5f011 | Avi Kivity | DeviceState *qdev, const char *name, |
10 | cfe5f011 | Avi Kivity | target_phys_addr_t size, |
11 | 88eeee0a | balrog | BlockDriverState *bs, |
12 | 88eeee0a | balrog | uint32_t sector_len, int nb_blocs, int width, |
13 | 88eeee0a | balrog | uint16_t id0, uint16_t id1, |
14 | 01e0451a | Anthony Liguori | uint16_t id2, uint16_t id3, int be);
|
15 | 88eeee0a | balrog | |
16 | 88eeee0a | balrog | /* pflash_cfi02.c */
|
17 | cfe5f011 | Avi Kivity | pflash_t *pflash_cfi02_register(target_phys_addr_t base, |
18 | cfe5f011 | Avi Kivity | DeviceState *qdev, const char *name, |
19 | cfe5f011 | Avi Kivity | target_phys_addr_t size, |
20 | cf6d9118 | balrog | BlockDriverState *bs, uint32_t sector_len, |
21 | 4fbd24ba | balrog | int nb_blocs, int nb_mappings, int width, |
22 | 88eeee0a | balrog | uint16_t id0, uint16_t id1, |
23 | 6725070d | balrog | uint16_t id2, uint16_t id3, |
24 | 01e0451a | Anthony Liguori | uint16_t unlock_addr0, uint16_t unlock_addr1, |
25 | 01e0451a | Anthony Liguori | int be);
|
26 | 87ecb68b | pbrook | |
27 | cfe5f011 | Avi Kivity | MemoryRegion *pflash_cfi01_get_memory(pflash_t *fl); |
28 | cfe5f011 | Avi Kivity | |
29 | 87ecb68b | pbrook | /* nand.c */
|
30 | d4220389 | Juha Riihimäki | DeviceState *nand_init(BlockDriverState *bdrv, int manf_id, int chip_id); |
31 | d4220389 | Juha Riihimäki | void nand_setpins(DeviceState *dev, uint8_t cle, uint8_t ale,
|
32 | 51db57f7 | Juan Quintela | uint8_t ce, uint8_t wp, uint8_t gnd); |
33 | d4220389 | Juha Riihimäki | void nand_getpins(DeviceState *dev, int *rb); |
34 | d4220389 | Juha Riihimäki | void nand_setio(DeviceState *dev, uint32_t value);
|
35 | d4220389 | Juha Riihimäki | uint32_t nand_getio(DeviceState *dev); |
36 | d4220389 | Juha Riihimäki | uint32_t nand_getbuswidth(DeviceState *dev); |
37 | 87ecb68b | pbrook | |
38 | 87ecb68b | pbrook | #define NAND_MFR_TOSHIBA 0x98 |
39 | 87ecb68b | pbrook | #define NAND_MFR_SAMSUNG 0xec |
40 | 87ecb68b | pbrook | #define NAND_MFR_FUJITSU 0x04 |
41 | 87ecb68b | pbrook | #define NAND_MFR_NATIONAL 0x8f |
42 | 87ecb68b | pbrook | #define NAND_MFR_RENESAS 0x07 |
43 | 87ecb68b | pbrook | #define NAND_MFR_STMICRO 0x20 |
44 | 87ecb68b | pbrook | #define NAND_MFR_HYNIX 0xad |
45 | 87ecb68b | pbrook | #define NAND_MFR_MICRON 0x2c |
46 | 87ecb68b | pbrook | |
47 | 7e7c5e4c | balrog | /* onenand.c */
|
48 | 500954e3 | Juha Riihimäki | void *onenand_raw_otp(DeviceState *onenand_device);
|
49 | 7e7c5e4c | balrog | |
50 | 87ecb68b | pbrook | /* ecc.c */
|
51 | bc24a225 | Paul Brook | typedef struct { |
52 | 87ecb68b | pbrook | uint8_t cp; /* Column parity */
|
53 | 87ecb68b | pbrook | uint16_t lp[2]; /* Line parity */ |
54 | 87ecb68b | pbrook | uint16_t count; |
55 | bc24a225 | Paul Brook | } ECCState; |
56 | 87ecb68b | pbrook | |
57 | bc24a225 | Paul Brook | uint8_t ecc_digest(ECCState *s, uint8_t sample); |
58 | bc24a225 | Paul Brook | void ecc_reset(ECCState *s);
|
59 | 34f9f0b5 | Dmitry Eremin-Solenikov | extern VMStateDescription vmstate_ecc_state; |