Lines Matching +full:dma +full:- +full:spear1340

1 // SPDX-License-Identifier: GPL-2.0-only
3 * ST spear1340-miphy driver
12 #include <linux/dma-mapping.h>
21 /* SPEAr1340 Registers */
33 /* PCIE - SATA configuration registers */
91 regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG, in spear1340_miphy_sata_init()
94 regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG, in spear1340_miphy_sata_init()
98 regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG, in spear1340_miphy_sata_init()
105 regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST, in spear1340_miphy_sata_init()
107 /* Wait for SATA reset de-assert completion */ in spear1340_miphy_sata_init()
115 regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG, in spear1340_miphy_sata_exit()
117 regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG, in spear1340_miphy_sata_exit()
121 regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST, in spear1340_miphy_sata_exit()
127 regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG, in spear1340_miphy_sata_exit()
137 regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG, in spear1340_miphy_pcie_init()
140 regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG, in spear1340_miphy_pcie_init()
149 regmap_update_bits(priv->misc, SPEAR1340_PCIE_MIPHY_CFG, in spear1340_miphy_pcie_exit()
151 regmap_update_bits(priv->misc, SPEAR1340_PCIE_SATA_CFG, in spear1340_miphy_pcie_exit()
162 if (priv->mode == SATA) in spear1340_miphy_init()
164 else if (priv->mode == PCIE) in spear1340_miphy_init()
175 if (priv->mode == SATA) in spear1340_miphy_exit()
177 else if (priv->mode == PCIE) in spear1340_miphy_exit()
184 { .compatible = "st,spear1340-miphy" },
201 if (priv->mode == SATA) in spear1340_miphy_suspend()
212 if (priv->mode == SATA) in spear1340_miphy_resume()
227 if (args->args_count < 1) { in spear1340_miphy_xlate()
229 return ERR_PTR(-ENODEV); in spear1340_miphy_xlate()
232 priv->mode = args->args[0]; in spear1340_miphy_xlate()
234 if (priv->mode != SATA && priv->mode != PCIE) { in spear1340_miphy_xlate()
236 return ERR_PTR(-ENODEV); in spear1340_miphy_xlate()
239 return priv->phy; in spear1340_miphy_xlate()
244 struct device *dev = &pdev->dev; in spear1340_miphy_probe()
250 return -ENOMEM; in spear1340_miphy_probe()
252 priv->misc = in spear1340_miphy_probe()
253 syscon_regmap_lookup_by_phandle(dev->of_node, "misc"); in spear1340_miphy_probe()
254 if (IS_ERR(priv->misc)) { in spear1340_miphy_probe()
256 return PTR_ERR(priv->misc); in spear1340_miphy_probe()
259 priv->phy = devm_phy_create(dev, NULL, &spear1340_miphy_ops); in spear1340_miphy_probe()
260 if (IS_ERR(priv->phy)) { in spear1340_miphy_probe()
262 return PTR_ERR(priv->phy); in spear1340_miphy_probe()
266 phy_set_drvdata(priv->phy, priv); in spear1340_miphy_probe()
281 .name = "spear1340-miphy",
289 MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver");