Lines Matching +full:p1 +full:- +full:cominit +full:- +full:params

1 // SPDX-License-Identifier: GPL-2.0-only
73 #define DRV_NAME "ahci-ceva"
78 MODULE_PARM_DESC(rx_watermark, "RxWaterMark value (0 - 0x80)");
124 void __iomem *mmio = hpriv->mmio; in ahci_ceva_setup()
125 struct ceva_ahci_priv *cevapriv = hpriv->plat_data; in ahci_ceva_setup()
142 * Set Mem Addr Read ID, Write ID for non-data transfers in ahci_ceva_setup()
150 if (cevapriv->is_cci_enabled) { in ahci_ceva_setup()
163 /* Phy Control OOB timing parameters COMINIT */ in ahci_ceva_setup()
164 writel(cevapriv->pp2c[i], mmio + AHCI_VEND_PP2C); in ahci_ceva_setup()
167 writel(cevapriv->pp3c[i], mmio + AHCI_VEND_PP3C); in ahci_ceva_setup()
170 writel(cevapriv->pp4c[i], mmio + AHCI_VEND_PP4C); in ahci_ceva_setup()
173 writel(cevapriv->pp5c[i], mmio + AHCI_VEND_PP5C); in ahci_ceva_setup()
181 if (cevapriv->flags & CEVA_FLAG_BROKEN_GEN2) in ahci_ceva_setup()
208 for (i = 0; i < hpriv->nports; i++) { in ceva_ahci_platform_enable_resources()
209 rc = phy_init(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
214 /* De-assert the controller reset */ in ceva_ahci_platform_enable_resources()
217 for (i = 0; i < hpriv->nports; i++) { in ceva_ahci_platform_enable_resources()
218 rc = phy_power_on(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
220 phy_exit(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
231 while (--i >= 0) { in ceva_ahci_platform_enable_resources()
232 phy_power_off(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
233 phy_exit(hpriv->phys[i]); in ceva_ahci_platform_enable_resources()
247 struct device_node *np = pdev->dev.of_node; in ceva_ahci_probe()
248 struct device *dev = &pdev->dev; in ceva_ahci_probe()
256 return -ENOMEM; in ceva_ahci_probe()
258 cevapriv->ahci_pdev = pdev; in ceva_ahci_probe()
263 hpriv->rsts = devm_reset_control_get_optional_exclusive(&pdev->dev, in ceva_ahci_probe()
265 if (IS_ERR(hpriv->rsts)) in ceva_ahci_probe()
266 return dev_err_probe(&pdev->dev, PTR_ERR(hpriv->rsts), in ceva_ahci_probe()
273 if (of_property_read_bool(np, "ceva,broken-gen2")) in ceva_ahci_probe()
274 cevapriv->flags = CEVA_FLAG_BROKEN_GEN2; in ceva_ahci_probe()
276 /* Read OOB timing value for COMINIT from device-tree */ in ceva_ahci_probe()
277 if (of_property_read_u8_array(np, "ceva,p0-cominit-params", in ceva_ahci_probe()
278 (u8 *)&cevapriv->pp2c[0], 4) < 0) { in ceva_ahci_probe()
279 dev_warn(dev, "ceva,p0-cominit-params property not defined\n"); in ceva_ahci_probe()
280 rc = -EINVAL; in ceva_ahci_probe()
284 if (of_property_read_u8_array(np, "ceva,p1-cominit-params", in ceva_ahci_probe()
285 (u8 *)&cevapriv->pp2c[1], 4) < 0) { in ceva_ahci_probe()
286 dev_warn(dev, "ceva,p1-cominit-params property not defined\n"); in ceva_ahci_probe()
287 rc = -EINVAL; in ceva_ahci_probe()
291 /* Read OOB timing value for COMWAKE from device-tree*/ in ceva_ahci_probe()
292 if (of_property_read_u8_array(np, "ceva,p0-comwake-params", in ceva_ahci_probe()
293 (u8 *)&cevapriv->pp3c[0], 4) < 0) { in ceva_ahci_probe()
294 dev_warn(dev, "ceva,p0-comwake-params property not defined\n"); in ceva_ahci_probe()
295 rc = -EINVAL; in ceva_ahci_probe()
299 if (of_property_read_u8_array(np, "ceva,p1-comwake-params", in ceva_ahci_probe()
300 (u8 *)&cevapriv->pp3c[1], 4) < 0) { in ceva_ahci_probe()
301 dev_warn(dev, "ceva,p1-comwake-params property not defined\n"); in ceva_ahci_probe()
302 rc = -EINVAL; in ceva_ahci_probe()
306 /* Read phy BURST timing value from device-tree */ in ceva_ahci_probe()
307 if (of_property_read_u8_array(np, "ceva,p0-burst-params", in ceva_ahci_probe()
308 (u8 *)&cevapriv->pp4c[0], 4) < 0) { in ceva_ahci_probe()
309 dev_warn(dev, "ceva,p0-burst-params property not defined\n"); in ceva_ahci_probe()
310 rc = -EINVAL; in ceva_ahci_probe()
314 if (of_property_read_u8_array(np, "ceva,p1-burst-params", in ceva_ahci_probe()
315 (u8 *)&cevapriv->pp4c[1], 4) < 0) { in ceva_ahci_probe()
316 dev_warn(dev, "ceva,p1-burst-params property not defined\n"); in ceva_ahci_probe()
317 rc = -EINVAL; in ceva_ahci_probe()
321 /* Read phy RETRY interval timing value from device-tree */ in ceva_ahci_probe()
322 if (of_property_read_u16_array(np, "ceva,p0-retry-params", in ceva_ahci_probe()
323 (u16 *)&cevapriv->pp5c[0], 2) < 0) { in ceva_ahci_probe()
324 dev_warn(dev, "ceva,p0-retry-params property not defined\n"); in ceva_ahci_probe()
325 rc = -EINVAL; in ceva_ahci_probe()
329 if (of_property_read_u16_array(np, "ceva,p1-retry-params", in ceva_ahci_probe()
330 (u16 *)&cevapriv->pp5c[1], 2) < 0) { in ceva_ahci_probe()
331 dev_warn(dev, "ceva,p1-retry-params property not defined\n"); in ceva_ahci_probe()
332 rc = -EINVAL; in ceva_ahci_probe()
341 cevapriv->is_cci_enabled = (attr == DEV_DMA_COHERENT); in ceva_ahci_probe()
343 hpriv->plat_data = cevapriv; in ceva_ahci_probe()
368 struct ahci_host_priv *hpriv = host->private_data; in ceva_ahci_resume()
398 { .compatible = "ceva,ahci-1v84" },