UPSTREAM: mtd: nand: pxa3xx_nand: fix early spurious interrupt

When the nand is first probe, and upon the first command start, the
status bits should be cleared before the interrupts are unmasked.

This commit is taken from Linux:
'commit 0b14392db2e'
("mtd: nand: pxa3xx_nand: fix early spurious interrupt")

Change-Id: Ie6b9b9dc2983df500b1496d814fa957c53ce4321
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Ofer Heifetz <oferh@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 658999244a0446a32301bc34c8fa53f1a3f05594)
This commit is contained in:
Ofer Heifetz 2018-08-29 11:56:03 +03:00 committed by Kever Yang
parent 5389812ac6
commit 80ad5a23c1
1 changed files with 1 additions and 1 deletions

View File

@ -482,8 +482,8 @@ static void pxa3xx_nand_start(struct pxa3xx_nand_info *info)
ndcr |= NDCR_ND_RUN;
/* clear status bits and run */
nand_writel(info, NDCR, 0);
nand_writel(info, NDSR, NDSR_MASK);
nand_writel(info, NDCR, 0);
nand_writel(info, NDCR, ndcr);
}