Skip to content

mtd: rawnand: sunxi: Some cleanup

Samuel Holland linux-arm-kernel linux-mtd linux-sunxi lkml 1 version Applied

Status from this message: Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 3 repliesApplied

Changes in v2 from the cover letter

- 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

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3mtd: rawnand: sunxi: Update OOB layout to match hardwaredrivers/mtd/nand/raw/sunxi_nand.c+7 -01 reply
2/3mtd: rawnand: sunxi: Embed sunxi_nand_hw_ecc by valuedrivers/mtd/nand/raw/sunxi_nand.c+6 -391 reply
3/3mtd: rawnand: sunxi: Precompute the ECC_CTL register valuedrivers/mtd/nand/raw/sunxi_nand.c+10 -171 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

(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(-)
Signature · 1 line
2.37.4