[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200107183022.26224-4-f.fainelli@gmail.com>
Date: Tue, 7 Jan 2020 10:30:22 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: linux-kernel@...r.kernel.org
Cc: bcm-kernel-feedback-list@...adcom.com,
Florian Fainelli <f.fainelli@...il.com>,
Jens Axboe <axboe@...nel.dk>, Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Hans de Goede <hdegoede@...hat.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Tejun Heo <tj@...nel.org>, Jaedon Shin <jaedon.shin@...il.com>,
linux-ide@...r.kernel.org (open list:LIBATA SUBSYSTEM (Serial and
Parallel ATA drivers)),
devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
DEVICE TREE BINDINGS)
Subject: [PATCH v3 3/3] ata: ahci_brcm: BCM7216 reset is self de-asserting
The BCM7216 reset controller line is self-deasserting, unlike other
platforms, so make use of reset_control_reset() instead of
reset_control_deassert().
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
drivers/ata/ahci_brcm.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index c229fea39a47..62c948e56beb 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -352,7 +352,10 @@ static int brcm_ahci_suspend(struct device *dev)
if (ret)
return ret;
- return reset_control_assert(priv->rcdev);
+ if (priv->version != BRCM_SATA_BCM7216)
+ ret = reset_control_assert(priv->rcdev);
+
+ return ret;
}
static int brcm_ahci_resume(struct device *dev)
@@ -362,7 +365,10 @@ static int brcm_ahci_resume(struct device *dev)
struct brcm_ahci_priv *priv = hpriv->plat_data;
int ret = 0;
- ret = reset_control_deassert(priv->rcdev);
+ if (priv->version == BRCM_SATA_BCM7216)
+ ret = reset_control_reset(priv->rcdev);
+ else
+ ret = reset_control_deassert(priv->rcdev);
if (ret)
return ret;
@@ -475,7 +481,10 @@ static int brcm_ahci_probe(struct platform_device *pdev)
break;
}
- ret = reset_control_deassert(priv->rcdev);
+ if (priv->version == BRCM_SATA_BCM7216)
+ ret = reset_control_reset(priv->rcdev);
+ else
+ ret = reset_control_deassert(priv->rcdev);
if (ret)
return ret;
@@ -520,7 +529,8 @@ static int brcm_ahci_probe(struct platform_device *pdev)
out_disable_clks:
ahci_platform_disable_clks(hpriv);
out_reset:
- reset_control_assert(priv->rcdev);
+ if (priv->version != BRCM_SATA_BCM7216)
+ reset_control_assert(priv->rcdev);
return ret;
}
--
2.17.1
Powered by blists - more mailing lists