Lines Matching refs:usb2
32 struct bcm_ns_usb2 *usb2 = phy_get_drvdata(phy); in bcm_ns_usb2_phy_init() local
33 struct device *dev = usb2->dev; in bcm_ns_usb2_phy_init()
34 void __iomem *dmu = usb2->dmu; in bcm_ns_usb2_phy_init()
38 err = clk_prepare_enable(usb2->ref_clk); in bcm_ns_usb2_phy_init()
44 ref_clk_rate = clk_get_rate(usb2->ref_clk); in bcm_ns_usb2_phy_init()
76 clk_disable_unprepare(usb2->ref_clk); in bcm_ns_usb2_phy_init()
89 struct bcm_ns_usb2 *usb2; in bcm_ns_usb2_probe() local
93 usb2 = devm_kzalloc(&pdev->dev, sizeof(*usb2), GFP_KERNEL); in bcm_ns_usb2_probe()
94 if (!usb2) in bcm_ns_usb2_probe()
96 usb2->dev = dev; in bcm_ns_usb2_probe()
99 usb2->dmu = devm_ioremap_resource(dev, res); in bcm_ns_usb2_probe()
100 if (IS_ERR(usb2->dmu)) { in bcm_ns_usb2_probe()
102 return PTR_ERR(usb2->dmu); in bcm_ns_usb2_probe()
105 usb2->ref_clk = devm_clk_get(dev, "phy-ref-clk"); in bcm_ns_usb2_probe()
106 if (IS_ERR(usb2->ref_clk)) { in bcm_ns_usb2_probe()
108 return PTR_ERR(usb2->ref_clk); in bcm_ns_usb2_probe()
111 usb2->phy = devm_phy_create(dev, NULL, &ops); in bcm_ns_usb2_probe()
112 if (IS_ERR(usb2->phy)) in bcm_ns_usb2_probe()
113 return PTR_ERR(usb2->phy); in bcm_ns_usb2_probe()
115 phy_set_drvdata(usb2->phy, usb2); in bcm_ns_usb2_probe()
116 platform_set_drvdata(pdev, usb2); in bcm_ns_usb2_probe()