]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: pl353: make sure optimal timings are applied
authorOlivier Sobrie <olivier@sobrie.be>
Tue, 17 Mar 2026 17:18:07 +0000 (18:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2026 10:08:49 +0000 (11:08 +0100)
commitc96bae994552c7189e4081f40996f45d161bcf63
tree524497025d5b3babe1b689cccda028127f43031c
parentdf30056c78e8bead02d4be020199cabdbec0fef1
mtd: rawnand: pl353: make sure optimal timings are applied

commit b9465b04de4b90228de03db9a1e0d56b00814366 upstream.

Timings of the nand are adjusted by pl35x_nfc_setup_interface() but
actually applied by the pl35x_nand_select_target() function.
If there is only one nand chip, the pl35x_nand_select_target() will only
apply the timings once since the test at its beginning will always be true
after the first call to this function. As a result, the hardware will
keep using the default timings set at boot to detect the nand chip, not
the optimal ones.

With this patch, we program directly the new timings when
pl35x_nfc_setup_interface() is called.

Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller")
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/pl35x-nand-controller.c