1 From 750bb44dbbe9dfb4ba3e1f8a746b831b39ba3cd9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
3 Date: Thu, 23 Sep 2021 19:35:57 +0200
4 Subject: [PATCH] Revert "ata: ahci: mvebu: Make SATA PHY optional for Armada
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 This reverts commit 45aefe3d2251e4e229d7662052739f96ad1d08d9.
12 Armada 3720 PHY driver (phy-mvebu-a3700-comphy.c) does not return
13 -EOPNOTSUPP from phy_power_on() callback anymore.
15 So remove AHCI_HFLAG_IGN_NOTSUPP_POWER_ON flag from Armada 3720 plat data.
17 AHCI_HFLAG_IGN_NOTSUPP_POWER_ON is not used by any other ahci driver, so
18 remove this flag completely.
20 Signed-off-by: Pali Rohár <pali@kernel.org>
21 Signed-off-by: Marek Behún <kabel@kernel.org>
22 Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
24 drivers/ata/ahci.h | 2 --
25 drivers/ata/ahci_mvebu.c | 2 +-
26 drivers/ata/libahci_platform.c | 2 +-
27 3 files changed, 2 insertions(+), 4 deletions(-)
29 diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
30 index d1f284f0c83d..3a3e67350e50 100644
31 --- a/drivers/ata/ahci.h
32 +++ b/drivers/ata/ahci.h
33 @@ -240,8 +240,6 @@ enum {
34 as default lpm_policy */
35 AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
37 - AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
38 - from phy_power_on() */
39 AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */
42 diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
43 index 3ad46d26d9d5..d4bba3ace45d 100644
44 --- a/drivers/ata/ahci_mvebu.c
45 +++ b/drivers/ata/ahci_mvebu.c
46 @@ -227,7 +227,7 @@ static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data = {
48 static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data = {
49 .plat_config = ahci_mvebu_armada_3700_config,
50 - .flags = AHCI_HFLAG_SUSPEND_PHYS | AHCI_HFLAG_IGN_NOTSUPP_POWER_ON,
51 + .flags = AHCI_HFLAG_SUSPEND_PHYS,
54 static const struct of_device_id ahci_mvebu_of_match[] = {
55 diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
56 index 0910441321f7..250b82e30aa3 100644
57 --- a/drivers/ata/libahci_platform.c
58 +++ b/drivers/ata/libahci_platform.c
59 @@ -59,7 +59,7 @@ int ahci_platform_enable_phys(struct ahci_host_priv *hpriv)
62 rc = phy_power_on(hpriv->phys[i]);
63 - if (rc && !(rc == -EOPNOTSUPP && (hpriv->flags & AHCI_HFLAG_IGN_NOTSUPP_POWER_ON))) {
65 phy_exit(hpriv->phys[i]);