]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8d797a941ecbe28b6aac8244947cddfc0196ae5a
tree7bdb11d7b3a5a6e9dcfd929a6bc2b58aac879afd
parent4cc1fe29e5b8b1d191584b8c726642f0378ca94c
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 72e993218da2 ("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: 72e993218da2 ("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