mtd: rawnand: fsl_elbc: Implement RNDOUT command
authorMarek Behún <marek.behun@nic.cz>
Fri, 22 Mar 2019 13:26:18 +0000 (14:26 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 18 Apr 2019 06:54:02 +0000 (08:54 +0200)
This is needed for SW ECC.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/fsl_elbc_nand.c

index ffcc4241ddc6b302bd50e0dac79617643040234f..513897ce173ebb4fcf0b04dda5e8da540a644fd1 100644 (file)
@@ -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,