Lines Matching refs:ohci_at91
73 static void at91_start_clock(struct ohci_at91_priv *ohci_at91) in at91_start_clock() argument
75 if (ohci_at91->clocked) in at91_start_clock()
78 clk_set_rate(ohci_at91->fclk, 48000000); in at91_start_clock()
79 clk_prepare_enable(ohci_at91->hclk); in at91_start_clock()
80 clk_prepare_enable(ohci_at91->iclk); in at91_start_clock()
81 clk_prepare_enable(ohci_at91->fclk); in at91_start_clock()
82 ohci_at91->clocked = true; in at91_start_clock()
85 static void at91_stop_clock(struct ohci_at91_priv *ohci_at91) in at91_stop_clock() argument
87 if (!ohci_at91->clocked) in at91_stop_clock()
90 clk_disable_unprepare(ohci_at91->fclk); in at91_stop_clock()
91 clk_disable_unprepare(ohci_at91->iclk); in at91_stop_clock()
92 clk_disable_unprepare(ohci_at91->hclk); in at91_stop_clock()
93 ohci_at91->clocked = false; in at91_stop_clock()
100 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_start_hc() local
107 at91_start_clock(ohci_at91); in at91_start_hc()
119 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_stop_hc() local
131 at91_stop_clock(ohci_at91); in at91_stop_hc()
158 struct ohci_at91_priv *ohci_at91; in usb_hcd_at91_probe() local
172 ohci_at91 = hcd_to_ohci_at91_priv(hcd); in usb_hcd_at91_probe()
183 ohci_at91->iclk = devm_clk_get(dev, "ohci_clk"); in usb_hcd_at91_probe()
184 if (IS_ERR(ohci_at91->iclk)) { in usb_hcd_at91_probe()
186 retval = PTR_ERR(ohci_at91->iclk); in usb_hcd_at91_probe()
189 ohci_at91->fclk = devm_clk_get(dev, "uhpck"); in usb_hcd_at91_probe()
190 if (IS_ERR(ohci_at91->fclk)) { in usb_hcd_at91_probe()
192 retval = PTR_ERR(ohci_at91->fclk); in usb_hcd_at91_probe()
195 ohci_at91->hclk = devm_clk_get(dev, "hclk"); in usb_hcd_at91_probe()
196 if (IS_ERR(ohci_at91->hclk)) { in usb_hcd_at91_probe()
198 retval = PTR_ERR(ohci_at91->hclk); in usb_hcd_at91_probe()
593 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_suspend() local
600 ohci_at91->wakeup = device_may_wakeup(dev) in ohci_hcd_at91_drv_suspend()
603 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
606 ret = ohci_suspend(hcd, ohci_at91->wakeup); in ohci_hcd_at91_drv_suspend()
608 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
619 if (!ohci_at91->wakeup) { in ohci_hcd_at91_drv_suspend()
627 at91_stop_clock(ohci_at91); in ohci_hcd_at91_drv_suspend()
636 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_resume() local
638 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_resume()
641 at91_start_clock(ohci_at91); in ohci_hcd_at91_drv_resume()