u-boot/drivers
David Brownell 7e86661cd7 NAND: fix "raw" reads with ECC syndrome layouts
The syndrome based page read/write routines store ECC, and possibly other
"OOB" data, right after each chunk of ECC'd data.  With ECC chunk size of
512 bytes and a large page (2KiB) NAND, the layout is:

  data-0 OOB-0 data-1 OOB-1 data-2 OOB-2 data-3 OOB-3 OOB-leftover

Where OOBx is (prepad, ECC, postpad).  However, the current "raw" routines
use a traditional layout -- data OOB, disregarding the prepad and postpad
values -- so when they're used with that type of ECC hardware, those calls
mix up the data and OOB.  Which means, in particular, that bad block
tables won't be found on startup, with data corruption and related chaos
ensuing.

The current syndrome-based drivers in mainline all seem to use one chunk
per page; presumably they haven't noticed such bugs.

Fix this, by adding read/write page_raw_syndrome() routines as siblings of
the existing non-raw routines; "raw" just means to bypass the ECC
computations, not change data and OOB layout.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-11-13 16:56:17 -06:00
..
bios_emulator Leave x86emu op code tables in default section 2009-10-12 23:34:06 +02:00
block Misc SATA fixups 2009-09-04 21:53:37 +02:00
dma ColdFire: Fix compile warning messages 2009-08-26 03:44:31 -05:00
fpga fpga: Remove relocation fixups 2009-10-03 10:17:56 +02:00
gpio Kirkwood: add Marvell Kirkwood gpio driver 2009-07-23 00:19:28 +02:00
hwmon Misc ds1722 fixups 2009-09-04 21:54:52 +02:00
i2c new PCA9564 i2c bridge driver 2009-10-30 15:10:58 +01:00
input License cleanup: remove unintended "All Rights Reserved" notices. 2009-09-04 23:00:56 +02:00
misc ppc/85xx: get_law_entry isn't used in CONFIG_NAND_SPL 2009-09-30 08:42:12 -05:00
mmc OMAP3 MMC: Fix warning dereferencing type-punned pointer 2009-10-13 06:17:36 -05:00
mtd NAND: fix "raw" reads with ECC syndrome layouts 2009-11-13 16:56:17 -06:00
net Coding Style cleanup; update CHANGELOG, prepare -rc1 2009-10-28 00:49:47 +01:00
pci ppc/85xx/pci: fsl_pci_init: pcie agent mode support 2009-10-27 09:33:51 -05:00
pcmcia Misc ti_pci1410a fixups 2009-09-04 21:54:04 +02:00
power OMAP3 Move twl4030 mmc function 2009-07-29 09:57:43 +02:00
qe mpc85xx: Configure QE USB for MPC8569E-MDS boards 2009-10-27 10:04:17 -05:00
rtc Clean-up of s3c24x0 drivers excluding nand driver 2009-10-13 21:13:56 -05:00
serial s5pc1xx: SMDKC100: fix compile warnings 2009-10-24 09:55:25 -05:00
spi Coldfire: Consolidate DSPI driver 2009-07-14 09:46:09 -05:00
twserial drivers/twserial: Add protocol driver for "three wire serial" interface. 2009-03-30 09:38:36 +02:00
usb usb: bugfix driver/usb/host/ehci-hcd.c function ehci_submit_root 2009-07-23 23:27:06 +02:00
video video: mb862xx: add option VIDEO_FB_16BPP_WORD_SWAP for IPEK01 2009-10-31 12:17:40 +01:00
watchdog at91sam9: add watchdog support 2009-04-04 20:42:19 +02:00