ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 4 Dec 2018 19:28:27 +0000 (20:28 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Jan 2019 21:47:48 +0000 (14:47 -0700)
commit96dbcb40e4b1a387cdb9b21f43638c759aebb5a4
tree7bdb11d7b3a5a6e9dcfd929a6bc2b58aac879afd
parentc9bc136791ba0eefe07ed57d3850b8c5cee6471b
ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs

At the beginning, only Armada 38x SoCs where supported by the
ahci_mvebu.c driver. Commit 15d3ce7b63bd ("ata: ahci_mvebu: add
support for Armada 3700 variant") introduced Armada 3700 support. As
opposed to Armada 38x SoCs, the 3700 variants do not have to configure
mbus and the regret option. This patch took care of avoiding such
configuration when not needed in the probe function, but failed to do
the same in the resume path. While doing so looks harmless by
experience, let's clean the driver logic and avoid doing this useless
configuration with Armada 3700 SoCs.

Because the logic is very similar between these two places, it has
been decided to factorize this code and put it in a "Armada 38x
configuration function". This function is part of a new
(per-compatible) platform data structure, so that the addition of such
configuration function for Armada 3700 will be eased.

Fixes: 15d3ce7b63bd ("ata: ahci_mvebu: add support for Armada 3700 variant")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/ahci_mvebu.c