mtd: nand: sunxi: fix support for 512bytes ECC chunks
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 20 Oct 2016 08:12:42 +0000 (10:12 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 21 Oct 2016 15:52:23 +0000 (17:52 +0200)
commitf59dab8d9e8f37f7042ba05bfbab748b1312e73e
tree11714a5f37c9011983746f3c418790a78980c02a
parentb156b7f2169bb4d963a2432ff03319fe7d64b823
mtd: nand: sunxi: fix support for 512bytes ECC chunks

The driver is incorrectly assuming that the ECC block size is always 1k
which is not always true.

Also take the other cases into account.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/mtd/nand/sunxi_nand.c