Skip to content

Commit

Permalink
mtd: rawnand: cadence: reinit completion before executing a new command
Browse files Browse the repository at this point in the history
Reing the completion object before executing CDMA command to make sure
the 'done' flag is OK.

Fixes: ec4ba01 ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
Cc: stable@vger.kernel.org
Signed-off-by: Piotr Sroka <piotrs@cadence.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1581328530-29966-4-git-send-email-piotrs@cadence.com
  • Loading branch information
Piotr Sroka authored and Miquel Raynal committed Mar 11, 2020
1 parent 9bf1903 commit 0d7d6c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/nand/raw/cadence-nand-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ static int cadence_nand_cdma_send(struct cdns_nand_ctrl *cdns_ctrl,
return status;

cadence_nand_reset_irq(cdns_ctrl);
reinit_completion(&cdns_ctrl->complete);

writel_relaxed((u32)cdns_ctrl->dma_cdma_desc,
cdns_ctrl->reg + CMD_REG2);
Expand Down

0 comments on commit 0d7d6c8

Please sign in to comment.