diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-01-17 15:53:13 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-01-17 17:14:20 -0700 |
commit | 272ecd60a636a8508997ff997ddfa143474e7c81 (patch) | |
tree | b72cca8d35760645995b41bbf322a18f5b652f32 /drivers/ata | |
parent | 1a0600d112e32eac893d2120207da7887f345495 (diff) | |
download | linux-272ecd60a636a8508997ff997ddfa143474e7c81.tar.gz linux-272ecd60a636a8508997ff997ddfa143474e7c81.tar.bz2 linux-272ecd60a636a8508997ff997ddfa143474e7c81.zip |
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@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci_brcm.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index e32c8fe729ff..6853dbb4131d 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -352,7 +352,8 @@ static int brcm_ahci_suspend(struct device *dev) else ret = 0; - reset_control_assert(priv->rcdev); + if (priv->version != BRCM_SATA_BCM7216) + reset_control_assert(priv->rcdev); return ret; } @@ -364,7 +365,10 @@ static int __maybe_unused 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 +479,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 +527,8 @@ out_disable_phys: 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; } |