Skip to content
Snippets Groups Projects
Commit 97eeae1a authored by Belisko Marek's avatar Belisko Marek Committed by Tom Rini
Browse files

mtd: nand: omap_gpmc: Fix update of read_ecc in oob


We need to flip only one bit not assign.

Signed-off-by: default avatarMarek Belisko <marek.belisko@gmail.com>
Acked-by: default avatarPekon Gupta <pekon@ti.com>
parent 2d92ba84
Branches
Tags
Loading
...@@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat, ...@@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
dat[byte_pos] ^= 1 << bit_pos; dat[byte_pos] ^= 1 << bit_pos;
printf("nand: bit-flip corrected @data=%d\n", byte_pos); printf("nand: bit-flip corrected @data=%d\n", byte_pos);
} else if (byte_pos < error_max) { } else if (byte_pos < error_max) {
read_ecc[byte_pos - SECTOR_BYTES] = 1 << bit_pos; read_ecc[byte_pos - SECTOR_BYTES] ^= 1 << bit_pos;
printf("nand: bit-flip corrected @oob=%d\n", byte_pos - printf("nand: bit-flip corrected @oob=%d\n", byte_pos -
SECTOR_BYTES); SECTOR_BYTES);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment