lkml.org 
[lkml]   [2020]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/2] ata: ahci_brcm: BCM7216 reset is self de-asserting
Date
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@gmail.com>
---
drivers/ata/ahci_brcm.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index 70e3e386d52e..75931cfb70bc 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -363,8 +363,12 @@ static int brcm_ahci_resume(struct device *dev)
struct brcm_ahci_priv *priv = hpriv->plat_data;
int ret = 0;

- if (!IS_ERR_OR_NULL(priv->rcdev))
- ret = reset_control_deassert(priv->rcdev);
+ if (!IS_ERR_OR_NULL(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;

@@ -473,8 +477,12 @@ static int brcm_ahci_probe(struct platform_device *pdev)
}

priv->rcdev = devm_reset_control_get(&pdev->dev, reset_name);
- if (!IS_ERR_OR_NULL(priv->rcdev))
- reset_control_deassert(priv->rcdev);
+ if (!IS_ERR_OR_NULL(priv->rcdev)) {
+ if (priv->version == BRCM_SATA_BCM7216)
+ reset_control_reset(priv->rcdev);
+ else
+ reset_control_deassert(priv->rcdev);
+ }

ret = ahci_platform_enable_clks(hpriv);
if (ret)
--
2.17.1
\
 
 \ /
  Last update: 2020-01-06 20:20    [W:0.051 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site