]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mtd: rawnand: arasan: Ensure proper configuration for the asserted target
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 09:32:41 +0000 (11:32 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 26 May 2021 14:26:33 +0000 (16:26 +0200)
commitb5437c7b682c9a505065b4ab4716cdc951dc3c7c
tree434b1c54164a24931645b60a9df36c3ddc5c8ea2
parentb85c943d181ac58e3a34a5f79c73d421f4da7b00
mtd: rawnand: arasan: Ensure proper configuration for the asserted target

The controller being always asserting one CS or the other, there is no
need to actually select the right target before doing a page read/write.
However, the anfc_select_target() helper actually also changes the
timing configuration and clock in the case were two different NAND chips
with different timing requirements would be used. In this situation, we
must ensure proper configuration of the controller by calling it.

As a consequence of this change, the anfc_select_target() helper is
being moved earlier in the driver.

Fixes: 88ffef1b65cf ("mtd: rawnand: arasan: Support the hardware BCH ECC engine")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210526093242.183847-4-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/arasan-nand-controller.c