mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 19:01:45 -04:00
Merge tag 'mtd/fixes-for-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD fix from Richard Weinberger: "A single regression fix for the marvell nand driver" * tag 'mtd/fixes-for-5.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: marvell: Clean the controller state before each operation
This commit is contained in:
@@ -722,12 +722,6 @@ static void marvell_nfc_select_target(struct nand_chip *chip,
|
||||
struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
|
||||
u32 ndcr_generic;
|
||||
|
||||
if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
|
||||
return;
|
||||
|
||||
writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
|
||||
writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
|
||||
|
||||
/*
|
||||
* Reset the NDCR register to a clean state for this particular chip,
|
||||
* also clear ND_RUN bit.
|
||||
@@ -739,6 +733,12 @@ static void marvell_nfc_select_target(struct nand_chip *chip,
|
||||
/* Also reset the interrupt status register */
|
||||
marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
|
||||
|
||||
if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
|
||||
return;
|
||||
|
||||
writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
|
||||
writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
|
||||
|
||||
nfc->selected_chip = chip;
|
||||
marvell_nand->selected_die = die_nr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user