diff options
author | Belisko Marek <marek.belisko@gmail.com> | 2014-04-25 12:00:07 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-05-13 19:48:17 -0400 |
commit | 97eeae1a0735fc17351f10b9978e966392badedc (patch) | |
tree | 8d8e5a58e81c999d3e23623bd044491cda76085a /drivers | |
parent | 2d92ba844068a72b50fbedbb17937ed264ef754a (diff) | |
download | u-boot-imx-97eeae1a0735fc17351f10b9978e966392badedc.zip u-boot-imx-97eeae1a0735fc17351f10b9978e966392badedc.tar.gz u-boot-imx-97eeae1a0735fc17351f10b9978e966392badedc.tar.bz2 |
mtd: nand: omap_gpmc: Fix update of read_ecc in oob
We need to flip only one bit not assign.
Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Acked-by: Pekon Gupta <pekon@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/omap_gpmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c index 881a636..bf99b8e 100644 --- a/drivers/mtd/nand/omap_gpmc.c +++ b/drivers/mtd/nand/omap_gpmc.c @@ -403,7 +403,7 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat, dat[byte_pos] ^= 1 << bit_pos; printf("nand: bit-flip corrected @data=%d\n", byte_pos); } 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 - SECTOR_BYTES); } else { |