rv1126-uboot/drivers/mtd
Boris Brezillon 300aab2ac1 UPSTREAM: mtd: Add sanity checks in mtd_write/read_oob()
Unlike what's done in mtd_read/write(), there are no checks to make sure
the parameters passed to mtd_read/write_oob() are consistent, which
forces implementers of ->_read/write_oob() to do it, which in turn leads
to code duplication and possibly errors in the logic.

Do general sanity checks, like ops fields consistency and range checking.

Change-Id: Ibe2de07dfd3d7504d615b1c22cdcb34c79eca63e
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Peter Pan <peterpandong@micron.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
[Miquel: squashed the fix about the chip's size check]
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 8fad769f1eab88a2bcf0b714694158968f58715a)
2019-07-05 19:33:44 +08:00
..
nand UPSTREAM: mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing 2019-07-05 19:33:44 +08:00
onenand UPSTREAM: mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing 2019-07-05 19:33:44 +08:00
spi UPSTREAM: spi: Kconfig: Create ISSI Kconfig entry 2019-07-05 19:33:41 +08:00
ubi UPSTREAM: lib: Add hexdump 2019-07-05 19:33:39 +08:00
ubispl
Kconfig UPSTREAM: Convert CONFIG_MTD_PARTITIONS et al to Kconfig 2019-07-05 19:33:40 +08:00
Makefile UPSTREAM: mtd: ftsmc020: Drop unsed code 2019-07-05 19:33:39 +08:00
altera_qspi.c
cfi_flash.c UPSTREAM: mtd: cfi_flash: Make live-tree compatible 2019-07-05 19:33:37 +08:00
cfi_mtd.c
ftsmc020.c
jedec_flash.c
mtd-uclass.c
mtd_blk.c mtd: mtd_blk: reserve one block space for gpt table 2019-06-27 19:52:19 +08:00
mtd_uboot.c
mtdconcat.c
mtdcore.c UPSTREAM: mtd: Add sanity checks in mtd_write/read_oob() 2019-07-05 19:33:44 +08:00
mtdcore.h
mtdpart.c UPSTREAM: mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing 2019-07-05 19:33:44 +08:00
mw_eeprom.c
pic32_flash.c UPSTREAM: flash: Fix spelling of "ERR_TIMOUT" 2019-07-05 19:33:35 +08:00
renesas_rpc_hf.c UPSTREAM: mtd: rpc: Add Renesas RPC Hyperflash driver 2019-07-05 19:33:36 +08:00
st_smi.c
stm32_flash.c UPSTREAM: arch-stm32: Factorize stm32.h for STM32F4 and F7 2019-07-05 19:33:35 +08:00
stm32_flash.h