]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: Add nand_extract_bits()
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 19 May 2020 07:45:45 +0000 (09:45 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 24 May 2020 20:34:55 +0000 (22:34 +0200)
commitcfb6108ba481de2add2525c84beb0ed302155b5f
tree4f60bc86a5fee1ebabd8c2d0eb3c2ddcb60d5d05
parent34bb4c0d3479fb3b4ad8dcb8cf26746507de8f9b
mtd: rawnand: Add nand_extract_bits()

There are cases where ECC bytes are not byte-aligned. Indeed, BCH
implies using a number of ECC bits, which are not always a multiple of
8. We then need a helper like nand_extract_bits() to extract these
syndromes from a buffer.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200519074549.23673-5-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/nand_base.c
include/linux/mtd/rawnand.h