mtd: rawnand: meson: set oob layout ops
authorLiang Yang <liang.yang@amlogic.com>
Thu, 21 Mar 2019 12:14:01 +0000 (20:14 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 8 Apr 2019 08:21:08 +0000 (10:21 +0200)
Specify the oob layout operation to avoid no oob scheme defined for
some nand flash.

Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
Signed-off-by: Liang Yang <liang.yang@amlogic.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/meson_nand.c

index 38db4fd..cb0b03e 100644 (file)
@@ -1188,6 +1188,8 @@ static int meson_nand_attach_chip(struct nand_chip *nand)
                return -EINVAL;
        }
 
+       mtd_set_ooblayout(mtd, &meson_ooblayout_ops);
+
        ret = meson_nand_bch_mode(nand);
        if (ret)
                return -EINVAL;