Home
last modified time | relevance | path

Searched hist:fd9fa5805c62135b51e7a621ea7730d66ae400e1 (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/mtd/
H A Dmtdcore.cfd9fa5805c62135b51e7a621ea7730d66ae400e1 Thu Aug 16 15:30:02 UTC 2018 Miquel Raynal <miquel.raynal@bootlin.com> UPSTREAM: mtd: Fallback to ->_read/write() when ->_read/write_oob() is missing

Some MTD sublayers/drivers are implementing ->_read/write() and
not ->_read/write_oob().

While for NAND devices both are usually valid, for NOR devices, using
the _oob variant has no real meaning. But, as the MTD layer is supposed
to hide as much as possible the flash complexity to the user, there is
no reason to error out while it is just a matter of rewritting things
internally.

Add a fallback on mtd->_read() (resp. mtd->_write()) when the user calls
mtd_read_oob() (resp. mtd_write_oob()) while mtd->_read_oob() (resp.
mtd->_write_oob) is not implemented. There is already a fallback on the
_oob variant if the former is used.

Change-Id: Ic8f4749900a2034cfaa103effcdace78242bcbe7
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ca040d8512f4d93a7eb83f7b8fec8f4b8b1d3192)