Lines Matching refs:ohci_at91

62 static void at91_start_clock(struct ohci_at91_priv *ohci_at91)  in at91_start_clock()  argument
64 if (ohci_at91->clocked) in at91_start_clock()
67 clk_set_rate(ohci_at91->fclk, 48000000); in at91_start_clock()
68 clk_prepare_enable(ohci_at91->hclk); in at91_start_clock()
69 clk_prepare_enable(ohci_at91->iclk); in at91_start_clock()
70 clk_prepare_enable(ohci_at91->fclk); in at91_start_clock()
71 ohci_at91->clocked = true; in at91_start_clock()
74 static void at91_stop_clock(struct ohci_at91_priv *ohci_at91) in at91_stop_clock() argument
76 if (!ohci_at91->clocked) in at91_stop_clock()
79 clk_disable_unprepare(ohci_at91->fclk); in at91_stop_clock()
80 clk_disable_unprepare(ohci_at91->iclk); in at91_stop_clock()
81 clk_disable_unprepare(ohci_at91->hclk); in at91_stop_clock()
82 ohci_at91->clocked = false; in at91_stop_clock()
89 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_start_hc() local
96 at91_start_clock(ohci_at91); in at91_start_hc()
108 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_stop_hc() local
120 at91_stop_clock(ohci_at91); in at91_stop_hc()
147 struct ohci_at91_priv *ohci_at91; in usb_hcd_at91_probe() local
161 ohci_at91 = hcd_to_ohci_at91_priv(hcd); in usb_hcd_at91_probe()
172 ohci_at91->iclk = devm_clk_get(dev, "ohci_clk"); in usb_hcd_at91_probe()
173 if (IS_ERR(ohci_at91->iclk)) { in usb_hcd_at91_probe()
175 retval = PTR_ERR(ohci_at91->iclk); in usb_hcd_at91_probe()
178 ohci_at91->fclk = devm_clk_get(dev, "uhpck"); in usb_hcd_at91_probe()
179 if (IS_ERR(ohci_at91->fclk)) { in usb_hcd_at91_probe()
181 retval = PTR_ERR(ohci_at91->fclk); in usb_hcd_at91_probe()
184 ohci_at91->hclk = devm_clk_get(dev, "hclk"); in usb_hcd_at91_probe()
185 if (IS_ERR(ohci_at91->hclk)) { in usb_hcd_at91_probe()
187 retval = PTR_ERR(ohci_at91->hclk); in usb_hcd_at91_probe()
611 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_suspend() local
618 ohci_at91->wakeup = device_may_wakeup(dev) in ohci_hcd_at91_drv_suspend()
621 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
624 ret = ohci_suspend(hcd, ohci_at91->wakeup); in ohci_hcd_at91_drv_suspend()
626 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
637 if (!ohci_at91->wakeup) { in ohci_hcd_at91_drv_suspend()
645 at91_stop_clock(ohci_at91); in ohci_hcd_at91_drv_suspend()
654 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_resume() local
656 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_resume()
659 at91_start_clock(ohci_at91); in ohci_hcd_at91_drv_resume()