diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-06-16 03:18:34 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-06-17 09:30:19 +0300 |
commit | 862bdedd7f4b8aebf00fdb422062e64896e97809 (patch) | |
tree | f6e436eb2d3d4707bddb7616d9a91c69d9266f6e /drivers/mtd/parsers | |
parent | b360514edb4743cbf86fc377699c75e98b1264c7 (diff) | |
download | linux-862bdedd7f4b8aebf00fdb422062e64896e97809.tar.xz |
mtd: nand: raw: qcom_nandc: add support for unprotected spare data pages
IPQ8064 nand have special pages where a different layout scheme is used.
These special page are used by boot partition and on reading them
lots of warning are reported about wrong ECC data and if written to
results in broken data and not bootable device.
The layout scheme used by these special page consist in using 512 bytes
as the codeword size (even for the last codeword) while writing to CFG0
register. This forces the NAND controller to unprotect the 4 bytes of
spare data.
Since the kernel is unaware of this different layout for these special
page, it does try to protect the spare data too during read/write and
warn about CRC errors.
Add support for this by permitting the user to declare these special
pages in dts by declaring offset and size of the partition. The driver
internally will convert these value to nand pages.
On user read/write the page is checked and if it's a boot page the
correct layout is used.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220616001835.24393-3-ansuelsmth@gmail.com
Diffstat (limited to 'drivers/mtd/parsers')
0 files changed, 0 insertions, 0 deletions