Skip to content

Commit

Permalink
mtd: rawnand: marvell: ensure timing values are written
Browse files Browse the repository at this point in the history
[ Upstream commit 8a6f4d3 ]

When new timing values are calculated in marvell_nfc_setup_interface()
ensure that they will be applied in marvell_nfc_select_target() by
clearing the selected_chip pointer.

Fixes: b252514 ("mtd: rawnand: marvell: Stop implementing ->select_chip()")
Suggested-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230525003154.2303012-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
cpackham-atlnz authored and gregkh committed Jun 9, 2023
1 parent a084334 commit 2187cb7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mtd/nand/raw/marvell_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,12 @@ static int marvell_nfc_setup_interface(struct nand_chip *chip, int chipnr,
NDTR1_WAIT_MODE;
}

/*
* Reset nfc->selected_chip so the next command will cause the timing
* registers to be updated in marvell_nfc_select_target().
*/
nfc->selected_chip = NULL;

return 0;
}

Expand Down

0 comments on commit 2187cb7

Please sign in to comment.