Lines Matching refs:miphy_dev
178 struct miphy365x_dev *miphy_dev) in miphy365x_set_path() argument
182 return regmap_update_bits(miphy_dev->regmap, in miphy365x_set_path()
189 struct miphy365x_dev *miphy_dev) in miphy365x_init_pcie_port() argument
204 struct miphy365x_dev *miphy_dev) in miphy365x_hfc_not_rdy() argument
218 dev_err(miphy_dev->dev, "HFC ready timeout!\n"); in miphy365x_hfc_not_rdy()
223 struct miphy365x_dev *miphy_dev) in miphy365x_rdy() argument
237 dev_err(miphy_dev->dev, "PHY not ready timeout!\n"); in miphy365x_rdy()
242 struct miphy365x_dev *miphy_dev) in miphy365x_set_comp() argument
278 struct miphy365x_dev *miphy_dev) in miphy365x_set_ssc() argument
307 struct miphy365x_dev *miphy_dev) in miphy365x_init_sata_port() argument
333 ret = miphy365x_hfc_not_rdy(miphy_phy, miphy_dev); in miphy365x_init_sata_port()
338 miphy365x_set_comp(miphy_phy, miphy_dev); in miphy365x_init_sata_port()
390 miphy365x_set_ssc(miphy_phy, miphy_dev); in miphy365x_init_sata_port()
393 ret = miphy365x_rdy(miphy_phy, miphy_dev); in miphy365x_init_sata_port()
422 struct miphy365x_dev *miphy_dev = dev_get_drvdata(phy->dev.parent); in miphy365x_init() local
425 mutex_lock(&miphy_dev->miphy_mutex); in miphy365x_init()
427 ret = miphy365x_set_path(miphy_phy, miphy_dev); in miphy365x_init()
429 mutex_unlock(&miphy_dev->miphy_mutex); in miphy365x_init()
435 ret = miphy365x_init_pcie_port(miphy_phy, miphy_dev); in miphy365x_init()
437 ret = miphy365x_init_sata_port(miphy_phy, miphy_dev); in miphy365x_init()
439 mutex_unlock(&miphy_dev->miphy_mutex); in miphy365x_init()
474 struct miphy365x_dev *miphy_dev = dev_get_drvdata(dev); in miphy365x_xlate() local
484 for (index = 0; index < miphy_dev->nphys; index++) in miphy365x_xlate()
485 if (phynode == miphy_dev->phys[index]->phy->dev.of_node) { in miphy365x_xlate()
486 miphy_phy = miphy_dev->phys[index]; in miphy365x_xlate()
537 struct miphy365x_dev *miphy_dev; in miphy365x_probe() local
542 miphy_dev = devm_kzalloc(&pdev->dev, sizeof(*miphy_dev), GFP_KERNEL); in miphy365x_probe()
543 if (!miphy_dev) in miphy365x_probe()
546 miphy_dev->nphys = of_get_child_count(np); in miphy365x_probe()
547 miphy_dev->phys = devm_kcalloc(&pdev->dev, miphy_dev->nphys, in miphy365x_probe()
548 sizeof(*miphy_dev->phys), GFP_KERNEL); in miphy365x_probe()
549 if (!miphy_dev->phys) in miphy365x_probe()
552 miphy_dev->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); in miphy365x_probe()
553 if (IS_ERR(miphy_dev->regmap)) { in miphy365x_probe()
554 dev_err(miphy_dev->dev, "No syscfg phandle specified\n"); in miphy365x_probe()
555 return PTR_ERR(miphy_dev->regmap); in miphy365x_probe()
558 miphy_dev->dev = &pdev->dev; in miphy365x_probe()
560 dev_set_drvdata(&pdev->dev, miphy_dev); in miphy365x_probe()
562 mutex_init(&miphy_dev->miphy_mutex); in miphy365x_probe()
574 miphy_dev->phys[port] = miphy_phy; in miphy365x_probe()
583 miphy_dev->phys[port]->phy = phy; in miphy365x_probe()
589 phy_set_drvdata(phy, miphy_dev->phys[port]); in miphy365x_probe()