Lines Matching refs:rc

49 	int rc, i;
52 rc = phy_init(hpriv->phys[i]);
53 if (rc)
56 rc = phy_set_mode(hpriv->phys[i], PHY_MODE_SATA);
57 if (rc) {
62 rc = phy_power_on(hpriv->phys[i]);
63 if (rc) {
76 return rc;
202 int rc, i;
204 rc = regulator_enable(hpriv->ahci_regulator);
205 if (rc)
206 return rc;
208 rc = regulator_enable(hpriv->phy_regulator);
209 if (rc)
216 rc = regulator_enable(hpriv->target_pwrs[i]);
217 if (rc)
231 return rc;
275 int rc;
277 rc = ahci_platform_enable_regulators(hpriv);
278 if (rc)
279 return rc;
281 rc = ahci_platform_enable_clks(hpriv);
282 if (rc)
285 rc = ahci_platform_deassert_rsts(hpriv);
286 if (rc)
289 rc = ahci_platform_enable_phys(hpriv);
290 if (rc)
304 return rc;
356 int rc;
363 rc = PTR_ERR(hpriv->phys[port]);
364 switch (rc) {
377 rc = 0;
386 node, rc);
391 return rc;
398 int rc = 0;
405 rc = PTR_ERR(target_pwr);
407 return rc;
460 int child_nodes, rc = -ENOMEM, enabled_ports = 0;
485 rc = PTR_ERR(hpriv->mmio);
496 rc = devm_clk_bulk_get_all(dev, &hpriv->clks);
497 if (rc < 0)
500 if (rc > 0) {
502 hpriv->n_clks = rc;
510 rc = -ENOMEM;
515 rc = PTR_ERR(hpriv->clks->clk);
525 rc = PTR_ERR(hpriv->ahci_regulator);
526 if (rc != 0)
532 rc = PTR_ERR(hpriv->phy_regulator);
539 rc = PTR_ERR(hpriv->rsts);
552 rc = -EINVAL;
568 rc = -ENOMEM;
577 rc = -ENOMEM;
590 rc = -EINVAL;
607 rc = ahci_platform_get_regulator(hpriv, port,
609 if (rc == -EPROBE_DEFER) {
616 rc = ahci_platform_get_phy(hpriv, port, dev, child);
617 if (rc) {
626 rc = -ENODEV;
637 rc = ahci_platform_get_phy(hpriv, 0, dev, dev->of_node);
638 if (rc)
641 rc = ahci_platform_get_regulator(hpriv, 0, dev);
642 if (rc == -EPROBE_DEFER)
650 rc = ahci_platform_get_firmware(hpriv, dev);
651 if (rc)
663 return ERR_PTR(rc);
690 int i, irq, n_ports, rc;
751 rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
752 if (rc) {
754 return rc;
758 rc = ahci_reset_controller(host);
759 if (rc)
760 return rc;
867 int rc;
870 rc = ahci_reset_controller(host);
871 if (rc)
872 return rc;
900 int rc;
902 rc = ahci_platform_suspend_host(dev);
903 if (rc)
904 return rc;
926 int rc;
928 rc = ahci_platform_enable_resources(hpriv);
929 if (rc)
930 return rc;
932 rc = ahci_platform_resume_host(dev);
933 if (rc)
946 return rc;