mtd: nand: mxs_nand: use structure for BCH geometry
authorStefan Agner <stefan.agner@toradex.com>
Fri, 22 Jun 2018 15:19:49 +0000 (17:19 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 27 Jun 2018 07:07:55 +0000 (09:07 +0200)
commit28897e8d21f8e197e259a91c693de09cd81f2d5a
tree4aa3288a245c124bf1a2c29e62914412aee01746
parentdc0b69fa9f97df90cbcabf16a51d7eb88f26cd2d
mtd: nand: mxs_nand: use structure for BCH geometry

Calculate BCH geometry at start and store the information in
a structure. This avoids recalculation on every page access
and allows to calculate ECC relevant information in one place.
This patch does not change ECC layout or driver behavior in
any way.

The patch aligns the driver somewhat with the Linux GPMI NAND
driver which drives the same IP.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
drivers/mtd/nand/mxs_nand.c