Revision bc24a225 hw/ecc.c
b/hw/ecc.c | ||
---|---|---|
50 | 50 |
}; |
51 | 51 |
|
52 | 52 |
/* Update ECC parity count. */ |
53 |
uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample)
|
|
53 |
uint8_t ecc_digest(ECCState *s, uint8_t sample)
|
|
54 | 54 |
{ |
55 | 55 |
uint8_t idx = nand_ecc_precalc_table[sample]; |
56 | 56 |
|
... | ... | |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
/* Reinitialise the counters. */ |
68 |
void ecc_reset(struct ecc_state_s *s)
|
|
68 |
void ecc_reset(ECCState *s)
|
|
69 | 69 |
{ |
70 | 70 |
s->lp[0] = 0x0000; |
71 | 71 |
s->lp[1] = 0x0000; |
... | ... | |
74 | 74 |
} |
75 | 75 |
|
76 | 76 |
/* Save/restore */ |
77 |
void ecc_put(QEMUFile *f, struct ecc_state_s *s)
|
|
77 |
void ecc_put(QEMUFile *f, ECCState *s)
|
|
78 | 78 |
{ |
79 | 79 |
qemu_put_8s(f, &s->cp); |
80 | 80 |
qemu_put_be16s(f, &s->lp[0]); |
... | ... | |
82 | 82 |
qemu_put_be16s(f, &s->count); |
83 | 83 |
} |
84 | 84 |
|
85 |
void ecc_get(QEMUFile *f, struct ecc_state_s *s)
|
|
85 |
void ecc_get(QEMUFile *f, ECCState *s)
|
|
86 | 86 |
{ |
87 | 87 |
qemu_get_8s(f, &s->cp); |
88 | 88 |
qemu_get_be16s(f, &s->lp[0]); |
Also available in: Unified diff