Lines Matching +full:pwr +full:- +full:dwn
1 // SPDX-License-Identifier: GPL-2.0-only
19 #include <linux/dma-mapping.h>
33 struct reset_control *pwr; member
56 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_deassert_resets()
59 if (drv_data->pwr) { in st_ahci_deassert_resets()
60 err = reset_control_deassert(drv_data->pwr); in st_ahci_deassert_resets()
67 if (drv_data->sw_rst) { in st_ahci_deassert_resets()
68 err = reset_control_deassert(drv_data->sw_rst); in st_ahci_deassert_resets()
70 dev_err(dev, "unable to bring out of sw-rst\n"); in st_ahci_deassert_resets()
75 if (drv_data->pwr_rst) { in st_ahci_deassert_resets()
76 err = reset_control_deassert(drv_data->pwr_rst); in st_ahci_deassert_resets()
78 dev_err(dev, "unable to bring out of pwr-rst\n"); in st_ahci_deassert_resets()
88 struct ahci_host_priv *hpriv = host->private_data; in st_ahci_host_stop()
89 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_host_stop()
90 struct device *dev = host->dev; in st_ahci_host_stop()
93 if (drv_data->pwr) { in st_ahci_host_stop()
94 err = reset_control_assert(drv_data->pwr); in st_ahci_host_stop()
105 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_probe_resets()
107 drv_data->pwr = devm_reset_control_get(dev, "pwr-dwn"); in st_ahci_probe_resets()
108 if (IS_ERR(drv_data->pwr)) { in st_ahci_probe_resets()
110 drv_data->pwr = NULL; in st_ahci_probe_resets()
113 drv_data->sw_rst = devm_reset_control_get(dev, "sw-rst"); in st_ahci_probe_resets()
114 if (IS_ERR(drv_data->sw_rst)) { in st_ahci_probe_resets()
116 drv_data->sw_rst = NULL; in st_ahci_probe_resets()
119 drv_data->pwr_rst = devm_reset_control_get(dev, "pwr-rst"); in st_ahci_probe_resets()
120 if (IS_ERR(drv_data->pwr_rst)) { in st_ahci_probe_resets()
122 drv_data->pwr_rst = NULL; in st_ahci_probe_resets()
150 drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL); in st_ahci_probe()
152 return -ENOMEM; in st_ahci_probe()
157 hpriv->plat_data = drv_data; in st_ahci_probe()
159 err = st_ahci_probe_resets(hpriv, &pdev->dev); in st_ahci_probe()
167 st_ahci_configure_oob(hpriv->mmio); in st_ahci_probe()
182 struct ahci_host_priv *hpriv = host->private_data; in st_ahci_suspend()
183 struct st_ahci_drv_data *drv_data = hpriv->plat_data; in st_ahci_suspend()
190 if (drv_data->pwr) { in st_ahci_suspend()
191 err = reset_control_assert(drv_data->pwr); in st_ahci_suspend()
206 struct ahci_host_priv *hpriv = host->private_data; in st_ahci_resume()
219 st_ahci_configure_oob(hpriv->mmio); in st_ahci_resume()