linux/drivers/mtd/nand
Roger Quadros c994b95281 mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc()
commit 40ddbf5069 upstream.

commit 65b97cf6b8 introduced in v3.7 caused a regression
by using a reversed CS_MASK thus causing omap_calculate_ecc to
always fail. As the NAND base driver never checks for .calculate()'s
return value, the zeroed ECC values are used as is without showing
any error to the user. However, this won't work and the NAND device
won't be guarded by any error code.

Fix the issue by using the correct mask.

Code was tested on omap3beagle using the following procedure
- flash the primary bootloader (MLO) from the kernel to the first
NAND partition using nandwrite.
- boot the board from NAND. This utilizes OMAP ROM loader that
relies on 1-bit Hamming code ECC.

Fixes: 65b97cf6b8 (mtd: nand: omap2: handle nand on gpmc)

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-17 09:19:28 -07:00
..
bcm47xxnflash mtd: bcm47xxnflash: Use devm_kzalloc 2013-11-06 23:32:56 -08:00
gpmi-nand mtd: gpmi: add sanity check when mapping DMA for read_buf/write_buf 2014-01-27 21:55:03 -08:00
Kconfig mtd: nand: davinci: reuse driver for Keystone arch 2014-01-03 11:22:26 -08:00
Makefile mtd: remove alauda driver 2013-08-30 21:51:57 +01:00
ams-delta.c mtd: nand: ams-delta: remove unnecessary platform_set_drvdata() 2013-08-05 20:58:30 +01:00
atmel_nand.c mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC 2014-05-13 13:32:54 +02:00
atmel_nand_ecc.h mtd: at91: atmel_nand: add Programmable Multibit ECC controller support 2012-07-06 18:23:25 +01:00
atmel_nand_nfc.h mtd: atmel_nand: add Nand Flash Controller (NFC) support 2013-08-05 21:07:41 +01:00
au1550nd.c mtd: au1550nd: Remove unnecessary OOM messages 2014-01-03 11:22:29 -08:00
bf5xx_nand.c mtd: bf5xx_nand: Remove unnecessary OOM messages 2014-01-03 11:22:29 -08:00
cafe_nand.c mtd: cafe_nand: Remove unnecessary OOM messages 2014-01-03 11:22:29 -08:00
cmx270_nand.c mtd: cmx270_nand: Remove unnecessary OOM messages 2014-01-03 11:22:29 -08:00
cs553x_nand.c mtd: cs553x_nand: Remove unnecessary OOM messages 2014-01-03 11:22:29 -08:00
davinci_nand.c mtd: davinci_nand: Remove unnecessary OOM messages 2014-01-03 11:22:30 -08:00
denali.c mtd: denali: kill the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE 2014-01-11 12:20:15 -08:00
denali.h mtd: denali: kill the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE 2014-01-11 12:20:15 -08:00
denali_dt.c mtd: denali_dt: Use devm_clk_get() 2014-01-03 11:22:27 -08:00
denali_pci.c mtd: denali: Drop print of build date/time 2014-01-09 08:52:48 -08:00
diskonchip.c mtd: diskonchip: mem resource name is not optional 2014-05-13 13:32:54 +02:00
docg4.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-11-15 16:47:22 -08:00
fsl_elbc_nand.c mtd: eLBC NAND: fix subpage write support 2014-07-09 11:18:24 -07:00
fsl_ifc_nand.c mtd: nand: Update mtd.name assignment type to u64 for IFC, eLBC 2014-01-11 12:07:35 -08:00
fsl_upm.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
fsmc_nand.c mtd: fsmc_nand: use dev_warn() instead of printk() 2014-01-07 10:07:03 -08:00
gpio.c mtd: nand-gpio: don't waste memory for OF failure 2014-01-07 10:07:34 -08:00
jz4740_nand.c mtd: jz4740_nand: Remove unnecessary OOM messages 2014-01-03 11:22:30 -08:00
lpc32xx_mlc.c mtd: lpc32xx_mlc: Remove unnecessary OOM messages 2014-01-07 10:06:58 -08:00
lpc32xx_slc.c mtd: lpc32xx_slc: Remove unnecessary OOM messages 2014-01-07 10:07:00 -08:00
mpc5121_nfc.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-01-30 17:07:18 -08:00
mxc_nand.c mtd: mxc-nand: kill the NAND_MAX_PAGESIZE/NAND_MAX_OOBSIZE 2014-01-11 12:20:06 -08:00
nand_base.c mtd: nand: fix off-by-one read retry mode counting 2014-02-14 12:08:20 -08:00
nand_bbt.c mtd: nand_bbt: kill NAND_BBT_SCANALLPAGES 2013-11-06 23:33:14 -08:00
nand_bch.c mtd: cleanup style on pr_debug messages 2011-09-11 15:02:16 +03:00
nand_ecc.c mtd: nane: print source of error message 2013-02-04 09:27:19 +02:00
nand_ids.c mtd: nand: add Intel manufacturer ID 2014-01-20 11:30:52 -08:00
nandsim.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
ndfc.c drivers: clean-up prom.h implicit includes 2013-10-09 20:04:04 -05:00
nuc900_nand.c mtd: nuc900_nand: NULL dereference in nuc900_nand_enable() 2014-05-13 13:32:54 +02:00
omap2.c mtd: nand: omap: Fix 1-bit Hamming code scheme, omap_calculate_ecc() 2014-09-17 09:19:28 -07:00
orion_nand.c mtd: orion_nand: use dev_err() instead of printk() 2014-01-07 10:07:31 -08:00
pasemi_nand.c mtd: pasemi_nand.c: remove superfluous name cast 2014-01-03 11:22:09 -08:00
plat_nand.c mtd: plat_nand: remove redundant return value check of platform_get_resource() 2014-01-20 11:37:29 -08:00
pxa3xx_nand.c mtd: pxa3xx_nand: make the driver work on big-endian systems 2014-07-09 11:18:24 -07:00
r852.c tree-wide: use reinit_completion instead of INIT_COMPLETION 2013-11-15 09:32:21 +09:00
r852.h mtd: r852: remove useless pci powerup/down from suspend/resume routines 2010-10-25 01:32:21 +01:00
s3c2410.c mtd: s3c2410: Merge plat/regs-nand.h into s3c2410.c 2014-01-22 17:31:57 -08:00
sh_flctl.c mtd: sh_flctl: Remove unnecessary OOM messages 2014-01-07 10:07:02 -08:00
sharpsl.c mtd: sharpsl: use dev_err() instead of printk() 2014-01-07 10:07:31 -08:00
sm_common.c mtd: nand: refactor chip->block_markbad interface 2013-08-30 16:47:52 +01:00
sm_common.h mtd: sm_common: split smartmedia and xD table 2010-05-14 01:03:46 +01:00
socrates_nand.c MTD merge for 3.13 2013-11-14 12:31:43 +09:00
tmio_nand.c mtd: tmio_nand: Use devm_*() functions 2014-01-03 11:22:28 -08:00
txx9ndfmc.c mtd: txx9ndfmc: Remove unnecessary OOM messages 2014-01-03 11:22:30 -08:00
xway_nand.c mtd: lantiq: Add NAND support on Lantiq XWAY SoC. 2012-09-29 15:05:18 +01:00