Lines Matching +full:generic +full:- +full:ehci

1 // SPDX-License-Identifier: GPL-2.0
3 * SuperH EHCI host controller driver
7 * Based on ohci-sh.c and ehci-atmel.c.
19 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_sh_reset() local
21 ehci->caps = hcd->regs; in ehci_sh_reset()
28 .product_desc = "SuperH EHCI",
32 * generic hardware linkage
82 return -ENODEV; in ehci_hcd_sh_probe()
91 hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, in ehci_hcd_sh_probe()
92 dev_name(&pdev->dev)); in ehci_hcd_sh_probe()
94 ret = -ENOMEM; in ehci_hcd_sh_probe()
98 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in ehci_hcd_sh_probe()
99 if (IS_ERR(hcd->regs)) { in ehci_hcd_sh_probe()
100 ret = PTR_ERR(hcd->regs); in ehci_hcd_sh_probe()
103 hcd->rsrc_start = res->start; in ehci_hcd_sh_probe()
104 hcd->rsrc_len = resource_size(res); in ehci_hcd_sh_probe()
106 priv = devm_kzalloc(&pdev->dev, sizeof(struct ehci_sh_priv), in ehci_hcd_sh_probe()
109 ret = -ENOMEM; in ehci_hcd_sh_probe()
114 priv->fclk = devm_clk_get(&pdev->dev, "usb_fck"); in ehci_hcd_sh_probe()
115 if (IS_ERR(priv->fclk)) in ehci_hcd_sh_probe()
116 priv->fclk = NULL; in ehci_hcd_sh_probe()
118 priv->iclk = devm_clk_get(&pdev->dev, "usb_ick"); in ehci_hcd_sh_probe()
119 if (IS_ERR(priv->iclk)) in ehci_hcd_sh_probe()
120 priv->iclk = NULL; in ehci_hcd_sh_probe()
122 clk_enable(priv->fclk); in ehci_hcd_sh_probe()
123 clk_enable(priv->iclk); in ehci_hcd_sh_probe()
127 dev_err(&pdev->dev, "Failed to add hcd"); in ehci_hcd_sh_probe()
130 device_wakeup_enable(hcd->self.controller); in ehci_hcd_sh_probe()
132 priv->hcd = hcd; in ehci_hcd_sh_probe()
138 clk_disable(priv->iclk); in ehci_hcd_sh_probe()
139 clk_disable(priv->fclk); in ehci_hcd_sh_probe()
144 dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), ret); in ehci_hcd_sh_probe()
152 struct usb_hcd *hcd = priv->hcd; in ehci_hcd_sh_remove()
157 clk_disable(priv->fclk); in ehci_hcd_sh_remove()
158 clk_disable(priv->iclk); in ehci_hcd_sh_remove()
164 struct usb_hcd *hcd = priv->hcd; in ehci_hcd_sh_shutdown()
166 if (hcd->driver->shutdown) in ehci_hcd_sh_shutdown()
167 hcd->driver->shutdown(hcd); in ehci_hcd_sh_shutdown()