51 for (i = 0; i < 1023; i++) {
95 unsigned int r7, r6, r5, r4, r3, r2, r1, r0;
97 static int tables_initialized;
99 if (!tables_initialized) {
101 tables_initialized = 1;
121 for (i = 503; i >= -8; i--) {
152 ecc[1] = (r0 >> 8) | (r1 << 2);
153 ecc[2] = (r1 >> 6) | (r2 << 4);
154 ecc[3] = (r2 >> 4) | (r3 << 6);
157 ecc[6] = (r4 >> 8) | (r5 << 2);
158 ecc[7] = (r5 >> 6) | (r6 << 4);
159 ecc[8] = (r6 >> 4) | (r7 << 6);
static void gf_build_log_exp_table(void)
int nand_calculate_ecc_kw(struct nand_device *nand, const uint8_t *data, uint8_t *ecc)
static uint16_t gf_exp[1023+1023]
static uint16_t gf_log[1024]
Upper level NOR flash interfaces.