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