~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/flash.h

  • Committer: Blue Swirl
  • Date: 2009-08-31 15:14:40 UTC
  • Revision ID: git-v1:528e93a9787ccfc59582a44035f5f342caf5b84f
Fix breakage due to __thread

Thread-local storage is not supported on all hosts.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
                                uint16_t unlock_addr0, uint16_t unlock_addr1);
18
18
 
19
19
/* nand.c */
20
 
struct nand_flash_s;
21
 
struct nand_flash_s *nand_init(int manf_id, int chip_id);
22
 
void nand_done(struct nand_flash_s *s);
23
 
void nand_setpins(struct nand_flash_s *s,
 
20
typedef struct NANDFlashState NANDFlashState;
 
21
NANDFlashState *nand_init(int manf_id, int chip_id);
 
22
void nand_done(NANDFlashState *s);
 
23
void nand_setpins(NANDFlashState *s,
24
24
                int cle, int ale, int ce, int wp, int gnd);
25
 
void nand_getpins(struct nand_flash_s *s, int *rb);
26
 
void nand_setio(struct nand_flash_s *s, uint8_t value);
27
 
uint8_t nand_getio(struct nand_flash_s *s);
 
25
void nand_getpins(NANDFlashState *s, int *rb);
 
26
void nand_setio(NANDFlashState *s, uint8_t value);
 
27
uint8_t nand_getio(NANDFlashState *s);
28
28
 
29
29
#define NAND_MFR_TOSHIBA        0x98
30
30
#define NAND_MFR_SAMSUNG        0xec
39
39
void onenand_base_update(void *opaque, target_phys_addr_t new);
40
40
void onenand_base_unmap(void *opaque);
41
41
void *onenand_init(uint32_t id, int regshift, qemu_irq irq);
 
42
void *onenand_raw_otp(void *opaque);
42
43
 
43
44
/* ecc.c */
44
 
struct ecc_state_s {
 
45
typedef struct {
45
46
    uint8_t cp;         /* Column parity */
46
47
    uint16_t lp[2];     /* Line parity */
47
48
    uint16_t count;
48
 
};
 
49
} ECCState;
49
50
 
50
 
uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample);
51
 
void ecc_reset(struct ecc_state_s *s);
52
 
void ecc_put(QEMUFile *f, struct ecc_state_s *s);
53
 
void ecc_get(QEMUFile *f, struct ecc_state_s *s);
 
51
uint8_t ecc_digest(ECCState *s, uint8_t sample);
 
52
void ecc_reset(ECCState *s);
 
53
void ecc_put(QEMUFile *f, ECCState *s);
 
54
void ecc_get(QEMUFile *f, ECCState *s);