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()
118 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_stop_hc() local
130 at91_stop_clock(ohci_at91); in at91_stop_hc()
171 struct ohci_at91_priv *ohci_at91; in usb_hcd_at91_probe() local
185 ohci_at91 = hcd_to_ohci_at91_priv(hcd); in usb_hcd_at91_probe()
196 ohci_at91->iclk = devm_clk_get(dev, "ohci_clk"); in usb_hcd_at91_probe()
197 if (IS_ERR(ohci_at91->iclk)) { in usb_hcd_at91_probe()
199 retval = PTR_ERR(ohci_at91->iclk); in usb_hcd_at91_probe()
202 ohci_at91->fclk = devm_clk_get(dev, "uhpck"); in usb_hcd_at91_probe()
203 if (IS_ERR(ohci_at91->fclk)) { in usb_hcd_at91_probe()
205 retval = PTR_ERR(ohci_at91->fclk); in usb_hcd_at91_probe()
208 ohci_at91->hclk = devm_clk_get(dev, "hclk"); in usb_hcd_at91_probe()
209 if (IS_ERR(ohci_at91->hclk)) { in usb_hcd_at91_probe()
211 retval = PTR_ERR(ohci_at91->hclk); in usb_hcd_at91_probe()
215 ohci_at91->sfr_regmap = at91_dt_syscon_sfr(); in usb_hcd_at91_probe()
216 if (!ohci_at91->sfr_regmap) in usb_hcd_at91_probe()
330 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_at91_hub_control() local
355 if (valid_port(wIndex) && ohci_at91->sfr_regmap) { in ohci_at91_hub_control()
356 ohci_at91_port_suspend(ohci_at91->sfr_regmap, in ohci_at91_hub_control()
398 if (valid_port(wIndex) && ohci_at91->sfr_regmap) { in ohci_at91_hub_control()
399 ohci_at91_port_suspend(ohci_at91->sfr_regmap, in ohci_at91_hub_control()
596 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_suspend() local
603 ohci_at91->wakeup = device_may_wakeup(dev) in ohci_hcd_at91_drv_suspend()
606 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
609 ret = ohci_suspend(hcd, ohci_at91->wakeup); in ohci_hcd_at91_drv_suspend()
611 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_suspend()
622 if (!ohci_at91->wakeup) { in ohci_hcd_at91_drv_suspend()
628 ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); in ohci_hcd_at91_drv_suspend()
629 at91_stop_clock(ohci_at91); in ohci_hcd_at91_drv_suspend()
631 ohci_at91_port_suspend(ohci_at91->sfr_regmap, 1); in ohci_hcd_at91_drv_suspend()
641 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_resume() local
643 ohci_at91_port_suspend(ohci_at91->sfr_regmap, 0); in ohci_hcd_at91_drv_resume()
645 if (ohci_at91->wakeup) in ohci_hcd_at91_drv_resume()
648 at91_start_clock(ohci_at91); in ohci_hcd_at91_drv_resume()