mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-03 22:03:54 +00:00
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>
This commit is contained in:
parent
1a0600d112
commit
272ecd60a6
1 changed files with 12 additions and 4 deletions
|
@ -352,7 +352,8 @@ static int brcm_ahci_suspend(struct device *dev)
|
||||||
else
|
else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
reset_control_assert(priv->rcdev);
|
if (priv->version != BRCM_SATA_BCM7216)
|
||||||
|
reset_control_assert(priv->rcdev);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +365,10 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)
|
||||||
struct brcm_ahci_priv *priv = hpriv->plat_data;
|
struct brcm_ahci_priv *priv = hpriv->plat_data;
|
||||||
int ret = 0;
|
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)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -475,7 +479,10 @@ static int brcm_ahci_probe(struct platform_device *pdev)
|
||||||
break;
|
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)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -520,7 +527,8 @@ out_disable_phys:
|
||||||
out_disable_clks:
|
out_disable_clks:
|
||||||
ahci_platform_disable_clks(hpriv);
|
ahci_platform_disable_clks(hpriv);
|
||||||
out_reset:
|
out_reset:
|
||||||
reset_control_assert(priv->rcdev);
|
if (priv->version != BRCM_SATA_BCM7216)
|
||||||
|
reset_control_assert(priv->rcdev);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue