fix: nand: Replace hardcoded page chunk size with calculated one
authorKonstantin Porotchkin <kostap@marvell.com>
Wed, 29 Aug 2018 08:56:15 +0000 (11:56 +0300)
committerStefan Roese <sr@denx.de>
Wed, 19 Sep 2018 07:02:34 +0000 (09:02 +0200)
commit2057eb0b163ac31fee00ae6ef9e8e27dcca65fd5
tree2243bf2d827d3de4e8cce3c31aafc1de2cd8ede2
parentb0d7c106c9703498f12bb1254b02574c803874a0
fix: nand: Replace hardcoded page chunk size with calculated one

Replace the hardcoded value of page chink with value that
depends on flash page size and ECC strength.
This fixes nand access errors for 2K page flashes with 8-bit ECC.
Move the initial flash commannd function assignment past the ECC
structures initialization for eliminating usage of hardcoded page
chunk size value.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/mtd/nand/pxa3xx_nand.c