root / hw / flash.h @ dd4239d6
History | View | Annotate | Download (1.9 kB)
1 | 87ecb68b | pbrook | /* NOR flash devices */
|
---|---|---|---|
2 | c227f099 | Anthony Liguori | typedef struct pflash_t pflash_t; |
3 | 87ecb68b | pbrook | |
4 | 88eeee0a | balrog | /* pflash_cfi01.c */
|
5 | c227f099 | Anthony Liguori | pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off, |
6 | 88eeee0a | balrog | BlockDriverState *bs, |
7 | 88eeee0a | balrog | uint32_t sector_len, int nb_blocs, int width, |
8 | 88eeee0a | balrog | uint16_t id0, uint16_t id1, |
9 | 88eeee0a | balrog | uint16_t id2, uint16_t id3); |
10 | 88eeee0a | balrog | |
11 | 88eeee0a | balrog | /* pflash_cfi02.c */
|
12 | c227f099 | Anthony Liguori | pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off, |
13 | cf6d9118 | balrog | BlockDriverState *bs, uint32_t sector_len, |
14 | 4fbd24ba | balrog | int nb_blocs, int nb_mappings, int width, |
15 | 88eeee0a | balrog | uint16_t id0, uint16_t id1, |
16 | 6725070d | balrog | uint16_t id2, uint16_t id3, |
17 | 6725070d | balrog | uint16_t unlock_addr0, uint16_t unlock_addr1); |
18 | 87ecb68b | pbrook | |
19 | 87ecb68b | pbrook | /* nand.c */
|
20 | bc24a225 | Paul Brook | typedef struct NANDFlashState NANDFlashState; |
21 | bc24a225 | Paul Brook | NANDFlashState *nand_init(int manf_id, int chip_id); |
22 | bc24a225 | Paul Brook | void nand_done(NANDFlashState *s);
|
23 | bc24a225 | Paul Brook | void nand_setpins(NANDFlashState *s,
|
24 | 87ecb68b | pbrook | int cle, int ale, int ce, int wp, int gnd); |
25 | bc24a225 | Paul Brook | void nand_getpins(NANDFlashState *s, int *rb); |
26 | bc24a225 | Paul Brook | void nand_setio(NANDFlashState *s, uint8_t value);
|
27 | bc24a225 | Paul Brook | uint8_t nand_getio(NANDFlashState *s); |
28 | 87ecb68b | pbrook | |
29 | 87ecb68b | pbrook | #define NAND_MFR_TOSHIBA 0x98 |
30 | 87ecb68b | pbrook | #define NAND_MFR_SAMSUNG 0xec |
31 | 87ecb68b | pbrook | #define NAND_MFR_FUJITSU 0x04 |
32 | 87ecb68b | pbrook | #define NAND_MFR_NATIONAL 0x8f |
33 | 87ecb68b | pbrook | #define NAND_MFR_RENESAS 0x07 |
34 | 87ecb68b | pbrook | #define NAND_MFR_STMICRO 0x20 |
35 | 87ecb68b | pbrook | #define NAND_MFR_HYNIX 0xad |
36 | 87ecb68b | pbrook | #define NAND_MFR_MICRON 0x2c |
37 | 87ecb68b | pbrook | |
38 | 7e7c5e4c | balrog | /* onenand.c */
|
39 | c227f099 | Anthony Liguori | void onenand_base_update(void *opaque, target_phys_addr_t new); |
40 | 7e7c5e4c | balrog | void onenand_base_unmap(void *opaque); |
41 | 7e7c5e4c | balrog | void *onenand_init(uint32_t id, int regshift, qemu_irq irq); |
42 | c580d92b | balrog | void *onenand_raw_otp(void *opaque); |
43 | 7e7c5e4c | balrog | |
44 | 87ecb68b | pbrook | /* ecc.c */
|
45 | bc24a225 | Paul Brook | typedef struct { |
46 | 87ecb68b | pbrook | uint8_t cp; /* Column parity */
|
47 | 87ecb68b | pbrook | uint16_t lp[2]; /* Line parity */ |
48 | 87ecb68b | pbrook | uint16_t count; |
49 | bc24a225 | Paul Brook | } ECCState; |
50 | 87ecb68b | pbrook | |
51 | bc24a225 | Paul Brook | uint8_t ecc_digest(ECCState *s, uint8_t sample); |
52 | bc24a225 | Paul Brook | void ecc_reset(ECCState *s);
|
53 | bc24a225 | Paul Brook | void ecc_put(QEMUFile *f, ECCState *s);
|
54 | bc24a225 | Paul Brook | void ecc_get(QEMUFile *f, ECCState *s); |