Skip to content

Commit

Permalink
Merge tag 'mtd/fixes-for-5.1-rc6' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/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
  • Loading branch information
torvalds committed May 2, 2019
2 parents 600d725 + 9a8f612 commit e2a4b10
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/mtd/nand/raw/marvell_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}
Expand Down

0 comments on commit e2a4b10

Please sign in to comment.