Commit 272ecd60 authored by Florian Fainelli's avatar Florian Fainelli Committed by Jens Axboe
Browse files

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1a0600d1
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ static int brcm_ahci_suspend(struct device *dev)
	else
		ret = 0;

	if (priv->version != BRCM_SATA_BCM7216)
		reset_control_assert(priv->rcdev);

	return ret;
@@ -364,6 +365,9 @@ static int __maybe_unused brcm_ahci_resume(struct device *dev)
	struct brcm_ahci_priv *priv = hpriv->plat_data;
	int ret = 0;

	if (priv->version == BRCM_SATA_BCM7216)
		ret = reset_control_reset(priv->rcdev);
	else
		ret = reset_control_deassert(priv->rcdev);
	if (ret)
		return ret;
@@ -475,6 +479,9 @@ static int brcm_ahci_probe(struct platform_device *pdev)
		break;
	}

	if (priv->version == BRCM_SATA_BCM7216)
		ret = reset_control_reset(priv->rcdev);
	else
		ret = reset_control_deassert(priv->rcdev);
	if (ret)
		return ret;
@@ -520,6 +527,7 @@ out_disable_phys:
out_disable_clks:
	ahci_platform_disable_clks(hpriv);
out_reset:
	if (priv->version != BRCM_SATA_BCM7216)
		reset_control_assert(priv->rcdev);
	return ret;
}