Lines Matching refs:usb
151 struct tegra_usb *usb = dev_get_drvdata(ci->dev->parent); in tegra_usb_notify_event() local
159 ehci_writel(ehci, usb->soc->txfifothresh << 16, in tegra_usb_notify_event()
235 struct tegra_usb *usb = dev_get_drvdata(ci->dev->parent); in tegra_ehci_hub_control() local
244 if (wValue != USB_PORT_FEAT_RESET || !usb->needs_double_reset) in tegra_ehci_hub_control()
274 struct tegra_usb *usb; in tegra_usb_probe() local
277 usb = devm_kzalloc(&pdev->dev, sizeof(*usb), GFP_KERNEL); in tegra_usb_probe()
278 if (!usb) in tegra_usb_probe()
287 usb->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); in tegra_usb_probe()
288 if (IS_ERR(usb->phy)) in tegra_usb_probe()
289 return dev_err_probe(&pdev->dev, PTR_ERR(usb->phy), in tegra_usb_probe()
292 usb->clk = devm_clk_get(&pdev->dev, NULL); in tegra_usb_probe()
293 if (IS_ERR(usb->clk)) { in tegra_usb_probe()
294 err = PTR_ERR(usb->clk); in tegra_usb_probe()
299 err = clk_prepare_enable(usb->clk); in tegra_usb_probe()
306 usb->needs_double_reset = true; in tegra_usb_probe()
319 err = usb_phy_init(usb->phy); in tegra_usb_probe()
323 platform_set_drvdata(pdev, usb); in tegra_usb_probe()
326 usb->soc = soc; in tegra_usb_probe()
327 usb->data.name = "tegra-usb"; in tegra_usb_probe()
328 usb->data.flags = soc->flags; in tegra_usb_probe()
329 usb->data.usb_phy = usb->phy; in tegra_usb_probe()
330 usb->data.dr_mode = soc->dr_mode; in tegra_usb_probe()
331 usb->data.capoffset = DEF_CAPOFFSET; in tegra_usb_probe()
332 usb->data.enter_lpm = tegra_usb_enter_lpm; in tegra_usb_probe()
333 usb->data.hub_control = tegra_ehci_hub_control; in tegra_usb_probe()
334 usb->data.notify_event = tegra_usb_notify_event; in tegra_usb_probe()
338 usb->data.flags &= ~CI_HDRC_SUPPORTS_RUNTIME_PM; in tegra_usb_probe()
340 usb->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource, in tegra_usb_probe()
341 pdev->num_resources, &usb->data); in tegra_usb_probe()
342 if (IS_ERR(usb->dev)) { in tegra_usb_probe()
343 err = PTR_ERR(usb->dev); in tegra_usb_probe()
351 usb_phy_shutdown(usb->phy); in tegra_usb_probe()
353 clk_disable_unprepare(usb->clk); in tegra_usb_probe()
359 struct tegra_usb *usb = platform_get_drvdata(pdev); in tegra_usb_remove() local
361 ci_hdrc_remove_device(usb->dev); in tegra_usb_remove()
362 usb_phy_shutdown(usb->phy); in tegra_usb_remove()
363 clk_disable_unprepare(usb->clk); in tegra_usb_remove()