Revert "ata: ahci-platform: add reset control support"
This reverts commitf0f56716fc
. According to Thierry's view, https://www.spinics.net/lists/linux-ide/msg55357.html some hardware-specific drivers already use their own resets, and the common reset might make a path to occur double controls of resets. For now, revert the commit that adds reset control support to ahci-platform, and hold until the solution is confirmed not be affect all hardware-specific drivers. Fixes:f0f56716fc
("ata: ahci-platform: add reset control support") Reported-by: Thierry Reding <thierry.reding@gmail.com> Suggested-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
fd3b36d275
commit
fd17ed684b
|
@ -30,7 +30,6 @@ compatible:
|
||||||
Optional properties:
|
Optional properties:
|
||||||
- dma-coherent : Present if dma operations are coherent
|
- dma-coherent : Present if dma operations are coherent
|
||||||
- clocks : a list of phandle + clock specifier pairs
|
- clocks : a list of phandle + clock specifier pairs
|
||||||
- resets : a list of phandle + reset specifier pairs
|
|
||||||
- target-supply : regulator for SATA target power
|
- target-supply : regulator for SATA target power
|
||||||
- phys : reference to the SATA PHY node
|
- phys : reference to the SATA PHY node
|
||||||
- phy-names : must be "sata-phy"
|
- phy-names : must be "sata-phy"
|
||||||
|
|
|
@ -350,7 +350,6 @@ struct ahci_host_priv {
|
||||||
u32 em_msg_type; /* EM message type */
|
u32 em_msg_type; /* EM message type */
|
||||||
bool got_runtime_pm; /* Did we do pm_runtime_get? */
|
bool got_runtime_pm; /* Did we do pm_runtime_get? */
|
||||||
struct clk *clks[AHCI_MAX_CLKS]; /* Optional */
|
struct clk *clks[AHCI_MAX_CLKS]; /* Optional */
|
||||||
struct reset_control *rsts; /* Optional */
|
|
||||||
struct regulator **target_pwrs; /* Optional */
|
struct regulator **target_pwrs; /* Optional */
|
||||||
/*
|
/*
|
||||||
* If platform uses PHYs. There is a 1:1 relation between the port number and
|
* If platform uses PHYs. There is a 1:1 relation between the port number and
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <linux/phy/phy.h>
|
#include <linux/phy/phy.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/of_platform.h>
|
#include <linux/of_platform.h>
|
||||||
#include <linux/reset.h>
|
|
||||||
#include "ahci.h"
|
#include "ahci.h"
|
||||||
|
|
||||||
static void ahci_host_stop(struct ata_host *host);
|
static void ahci_host_stop(struct ata_host *host);
|
||||||
|
@ -196,8 +195,7 @@ EXPORT_SYMBOL_GPL(ahci_platform_disable_regulators);
|
||||||
* following order:
|
* following order:
|
||||||
* 1) Regulator
|
* 1) Regulator
|
||||||
* 2) Clocks (through ahci_platform_enable_clks)
|
* 2) Clocks (through ahci_platform_enable_clks)
|
||||||
* 3) Resets
|
* 3) Phys
|
||||||
* 4) Phys
|
|
||||||
*
|
*
|
||||||
* If resource enabling fails at any point the previous enabled resources
|
* If resource enabling fails at any point the previous enabled resources
|
||||||
* are disabled in reverse order.
|
* are disabled in reverse order.
|
||||||
|
@ -217,19 +215,12 @@ int ahci_platform_enable_resources(struct ahci_host_priv *hpriv)
|
||||||
if (rc)
|
if (rc)
|
||||||
goto disable_regulator;
|
goto disable_regulator;
|
||||||
|
|
||||||
rc = reset_control_deassert(hpriv->rsts);
|
rc = ahci_platform_enable_phys(hpriv);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto disable_clks;
|
goto disable_clks;
|
||||||
|
|
||||||
rc = ahci_platform_enable_phys(hpriv);
|
|
||||||
if (rc)
|
|
||||||
goto disable_resets;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
disable_resets:
|
|
||||||
reset_control_assert(hpriv->rsts);
|
|
||||||
|
|
||||||
disable_clks:
|
disable_clks:
|
||||||
ahci_platform_disable_clks(hpriv);
|
ahci_platform_disable_clks(hpriv);
|
||||||
|
|
||||||
|
@ -248,15 +239,12 @@ EXPORT_SYMBOL_GPL(ahci_platform_enable_resources);
|
||||||
* following order:
|
* following order:
|
||||||
* 1) Phys
|
* 1) Phys
|
||||||
* 2) Clocks (through ahci_platform_disable_clks)
|
* 2) Clocks (through ahci_platform_disable_clks)
|
||||||
* 3) Resets
|
* 3) Regulator
|
||||||
* 4) Regulator
|
|
||||||
*/
|
*/
|
||||||
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv)
|
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv)
|
||||||
{
|
{
|
||||||
ahci_platform_disable_phys(hpriv);
|
ahci_platform_disable_phys(hpriv);
|
||||||
|
|
||||||
reset_control_assert(hpriv->rsts);
|
|
||||||
|
|
||||||
ahci_platform_disable_clks(hpriv);
|
ahci_platform_disable_clks(hpriv);
|
||||||
|
|
||||||
ahci_platform_disable_regulators(hpriv);
|
ahci_platform_disable_regulators(hpriv);
|
||||||
|
@ -405,12 +393,6 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev)
|
||||||
hpriv->clks[i] = clk;
|
hpriv->clks[i] = clk;
|
||||||
}
|
}
|
||||||
|
|
||||||
hpriv->rsts = devm_reset_control_array_get_optional_shared(dev);
|
|
||||||
if (IS_ERR(hpriv->rsts)) {
|
|
||||||
rc = PTR_ERR(hpriv->rsts);
|
|
||||||
goto err_out;
|
|
||||||
}
|
|
||||||
|
|
||||||
hpriv->nports = child_nodes = of_get_child_count(dev->of_node);
|
hpriv->nports = child_nodes = of_get_child_count(dev->of_node);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue