u-boot-brain/drivers
Boris Brezillon f3d235702d mtd: nand: pxa3xx: Fix READOOB implementation
In the current driver, OOB bytes are accessed in raw mode, and when a
page access is done with NDCR_SPARE_EN set and NDCR_ECC_EN cleared, the
driver must read the whole spare area (64 bytes in case of a 2k page,
16 bytes for a 512 page). The driver was only reading the free OOB
bytes, which was leaving some unread data in the FIFO and was somehow
leading to a timeout.

We could patch the driver to read ->spare_size + ->ecc_size instead of
just ->spare_size when READOOB is requested, but we'd better make
in-band and OOB accesses consistent.
Since the driver is always accessing in-band data in non-raw mode (with
the ECC engine enabled), we should also access OOB data in this mode.
That's particularly useful when using the BCH engine because in this
mode the free OOB bytes are also ECC protected.

Fixes: 43bcfd2bb24a ("mtd: nand: pxa3xx: Add driver-specific ECC BCH support")
Cc: stable@vger.kernel.org
Reported-by: Sean Nyekjær <sean.nyekjaer@prevas.dk>
Tested-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2018-09-19 09:02:34 +02:00
..
adc adc: Add driver for STM32 ADC 2018-08-03 19:53:10 -04:00
ata scsi: ceva: add ls1012a soc support 2018-07-26 10:59:35 -07:00
axi axi: Add AXI sandbox driver and simple emulator 2018-08-11 08:09:39 +02:00
bios_emulator bios_emulator: remove assignment without effect 2018-07-23 14:33:21 -04:00
block block: Add SPL_BLOCK_CACHE and default n 2018-06-18 14:43:13 -04:00
bootcount Add BOOTCOUNT_BOOTLIMIT to set reboot limit 2018-08-17 13:03:59 -04:00
clk clk: armada-37xx-periph: Support changing clock parent and rate 2018-09-19 08:59:26 +02:00
core device: expose the functions used to remove and unbind children of a device 2018-08-21 16:21:37 +02:00
cpu bcm6838: add initial support 2018-08-08 13:38:17 +02:00
crypto SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ddr socfpga: stratix10: fix sdram_calculate_size 2018-09-15 03:17:01 +02:00
demo SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu dfu: Provide more verbose error message 2018-08-08 22:22:08 +02:00
dma SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fastboot usb: fastboot: Convert USB f_fastboot to shared fastboot 2018-05-30 11:59:21 +02:00
firmware dm: firmware: Automatically bind child devices 2018-09-11 08:32:55 -04:00
fpga fpga: Kconfig: Replace spaces with tabs 2018-09-11 10:58:41 +02:00
gpio gpio: dwapb_gpio: Change to use dev_read_addr() 2018-09-15 03:17:01 +02:00
i2c Merge branch 'master' of git://git.denx.de/u-boot-i2c 2018-09-14 09:33:01 -04:00
input Convert CONFIG_TWL4030_LED et al to Kconfig 2018-08-17 13:04:00 -04:00
led dm: led: move default state support in led uclass 2018-08-10 10:27:32 -04:00
mailbox spl: Allow mailbox drivers to be used within SPL 2018-09-11 08:32:55 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc Convert CONFIG_TWL4030_LED et al to Kconfig 2018-08-17 13:04:00 -04:00
mmc MMC: davinici_mmc: Enable CD and WP with DM and OF_CONTROL 2018-09-11 21:49:02 -04:00
mtd mtd: nand: pxa3xx: Fix READOOB implementation 2018-09-19 09:02:34 +02:00
net Convert CONFIG_MII et al to Kconfig 2018-08-17 13:03:54 -04:00
nvme SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pch SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pci Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
pcmcia SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
phy phy: marvell: Support changing SERDES map in board file 2018-09-19 08:59:26 +02:00
pinctrl pinctrl: Fix build warning with ARM64 2018-09-10 20:48:20 -04:00
power regulator: pbias: Add additional compatible flags 2018-09-11 21:38:37 -04:00
pwm pwm: sunxi: add support for PWM found on Allwinner A64 2018-05-15 08:18:09 +02:00
qe SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ram bmips: ram: add an option to force the size of the ram 2018-08-08 13:34:27 +02:00
remoteproc spl: Allow remoteproc drivers to be used within SPL 2018-09-11 08:32:55 -04:00
reset reset: Introduce TI System Control Interface (TI SCI) reset driver 2018-09-11 08:32:55 -04:00
rtc Patch queue for efi - 2018-07-25 2018-07-30 16:02:29 -04:00
scsi Remove <inttypes.h> includes and PRI* usages in printf() entirely 2018-09-10 20:48:17 -04:00
serial arm: K3: Add initial support for TI's K3 generation of SoCs 2018-09-11 08:32:55 -04:00
smem drivers: smem: sandbox 2018-07-19 16:31:38 -04:00
soc SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sound SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spi arm: sunxi: Allwinner A10 SPI driver 2018-08-03 11:14:08 +05:30
spmi SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sysreset sysreset: Add TI System Control Interface (TI SCI) sysreset driver 2018-09-11 08:32:55 -04:00
thermal SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
timer dm: omap-timer: Update clock rate only if not populated 2018-09-10 20:48:19 -04:00
tpm tpm: sandbox: fix wrong assignment with a simplification 2018-08-13 14:04:04 -04:00
usb usb: ehci-generic: Add vbus-supply regulator support 2018-09-15 03:17:43 +02:00
video Convert CONFIG_VIDEO_OMAP3 to Kconfig 2018-08-17 13:04:00 -04:00
watchdog watchdog: mx25: use the imx_watchdog driver for mx25 2018-09-04 08:47:23 +02:00
Kconfig drivers: Add AXI uclass 2018-08-11 08:07:36 +02:00
Makefile spl: Allow remoteproc drivers to be used within SPL 2018-09-11 08:32:55 -04:00