[PATCH v2 0/3] mtd: rawnand: sunxi: Some cleanup

Samuel Holland samuel at sholland.org
Sat Feb 4 06:35:17 PST 2023


(Apologies for the delay in sending v2. As discussed previously[1],
the first patch needs to be merged in the same merge window as commit
34569d869532 from v1 of the series, even if the others don't make it.)

I have an A33 tablet with MLC NAND, and I wanted to use mainline Linux
to dump the NAND. To do that, I updated this driver's ECC ops to fully
utilize the hardware for ECC and scrambling. This made the driver
compatible with the existing (scrambled) on-flash bad block map, and I
was able to read the full NAND contents.

This series contains some cleanup from that effort. The first patch
ensures we can make good use of the hardware ECC/descrambler. The other
two patches simplify some code for managing the ECC engine.

[1]: https://lore.kernel.org/linux-mtd/20230102175351.64690aaf@xps-13/

Changes in v2:
 - Update commit message to address backward-compatibility concerns
 - Keep `struct sunxi_nand_hw_ecc` but change the pointer to a value
 - Split ECC_CTL precomputation and structure updates to two patches

Samuel Holland (3):
  mtd: rawnand: sunxi: Update OOB layout to match hardware
  mtd: rawnand: sunxi: Embed sunxi_nand_hw_ecc by value
  mtd: rawnand: sunxi: Precompute the ECC_CTL register value

 drivers/mtd/nand/raw/sunxi_nand.c | 73 +++++++++----------------------
 1 file changed, 20 insertions(+), 53 deletions(-)

-- 
2.37.4




More information about the linux-mtd mailing list