]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mtd: nand: mediatek: add support for MT2712 NAND FLASH Controller
authorXiaolei Li <xiaolei.li@mediatek.com>
Wed, 31 May 2017 08:26:41 +0000 (16:26 +0800)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 1 Jun 2017 08:09:38 +0000 (10:09 +0200)
commit30ee809e980b07f467fca3e7ee16e8d034cf41af
tree7019b5559540e8905250b744802d7d40691a5296
parent7ec4a37c5d71f0a0bfeb1346d4e832a090ca292d
mtd: nand: mediatek: add support for MT2712 NAND FLASH Controller

MT2712 NAND FLASH Controller is similar to MT2701 except those following:
(1) MT2712 supports up to 148B spare size per 1KB size sector (the same
    with 74B spare size per 512B size sector). There are three new spare
    format: 61, 67, 74.
(2) MT2712 supports up to 80 bit ecc strength. There are three new ecc
    strength level: 68, 72, 80.
(3) MT2712 ECC encode parity data register's start offset is 0x300, and
    different with 0x10 of MT2701.
(4) MT2712 improves ecc irq function. When ECC works in ECC_NFI_MODE,
    MT2701 will generate ecc irq number the same with ecc steps during
    page read. However, MT2712 can only generate one ecc irq.

Changes of this patch are:
(1) add two new variables named pg_irq_sel, encode_parity_reg0 in struct
    mtk_ecc_caps.
(2) add new bitfield ECC_PG_IRQ_SEL for register ECC_IRQ_REG.
(3) add ecc strength array of mt2712.
(4) add spare size array of mt2712.
(5) add mt2712 nfc and ecc device compatiable and data.

Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_ecc.c
drivers/mtd/nand/mtk_nand.c