From: Marek BehĂșn Date: Fri, 22 Mar 2019 13:26:18 +0000 (+0100) Subject: mtd: rawnand: fsl_elbc: Implement RNDOUT command X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=070fb9744d5b7f893da263149a4f3245bb618bdf;p=openwrt%2Fstaging%2Fblogic.git mtd: rawnand: fsl_elbc: Implement RNDOUT command This is needed for SW ECC. Signed-off-by: Marek BehĂșn Signed-off-by: Miquel Raynal --- diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index ffcc4241ddc6..513897ce173e 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -355,6 +355,15 @@ static void fsl_elbc_cmdfunc(struct nand_chip *chip, unsigned int command, fsl_elbc_run_command(mtd); return; + /* RNDOUT moves the pointer inside the page */ + case NAND_CMD_RNDOUT: + dev_dbg(priv->dev, + "fsl_elbc_cmdfunc: NAND_CMD_RNDOUT, column: 0x%x.\n", + column); + + elbc_fcm_ctrl->index = column; + return; + /* READOOB reads only the OOB because no ECC is performed. */ case NAND_CMD_READOOB: dev_vdbg(priv->dev,