From: pekon gupta Date: Mon, 24 Mar 2014 11:20:05 +0000 (+0530) Subject: mtd: nand: omap: add support for BCH16_ECC - NAND driver updates X-Git-Tag: omap-for-v3.16/fixes-against-rc1~57^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9748fff96484cfc8bb382ef1436823aefe065c9c;p=pandora-kernel.git mtd: nand: omap: add support for BCH16_ECC - NAND driver updates This patch add support for BCH16 ecc-scheme in OMAP NAND driver, by extending following functions: - omap_enable_hwecc (nand_chip->ecc.hwctl): configure GPMC controller - omap_calculate_ecc_bch (nand_chip->ecc.calculate): fetch ECC signature from GPMC controller - omap_elm_correct_data (nand_chip->ecc.correct): detect and correct ECC errors using ELM (a) BCH16 ecc-scheme can detect and correct 16 bit-flips per 512Bytes of data. (b) BCH16 ecc-scheme generates 26-bytes of ECC syndrome / 512B. Due to (b) this scheme can only be used with NAND devices which have enough OOB to satisfy the relation: "OOBsize per page >= 26 * (page-size / 512)" Signed-off-by: Pekon Gupta Signed-off-by: Brian Norris --- Reading git-diff-tree failed