aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-at91.c
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@free-electrons.com>2015-03-17 12:15:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 05:54:01 -0400
commit963719c872a3a71bc2abf4d4899392acab93b09d (patch)
tree5986a1a33f60f78340a27de1f82819035ad31125 /drivers/usb/host/ohci-at91.c
parent85e8a0b9a3565c8185068b6b340cc8c6dd4411f4 (diff)
USB: host: ohci-at91: remove useless uclk clock
Now that the system clock driver is forwarding set_rate request to the parent clock, we can safely call clk_set_rate on the system clk and get rid of the uclk field. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r--drivers/usb/host/ohci-at91.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 7cce85a1f7dc..15df00cceed9 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -39,7 +39,6 @@
39struct ohci_at91_priv { 39struct ohci_at91_priv {
40 struct clk *iclk; 40 struct clk *iclk;
41 struct clk *fclk; 41 struct clk *fclk;
42 struct clk *uclk;
43 struct clk *hclk; 42 struct clk *hclk;
44 bool clocked; 43 bool clocked;
45 bool wakeup; /* Saved wake-up state for resume */ 44 bool wakeup; /* Saved wake-up state for resume */
@@ -64,10 +63,8 @@ static void at91_start_clock(struct ohci_at91_priv *ohci_at91)
64{ 63{
65 if (ohci_at91->clocked) 64 if (ohci_at91->clocked)
66 return; 65 return;
67 if (IS_ENABLED(CONFIG_COMMON_CLK)) { 66
68 clk_set_rate(ohci_at91->uclk, 48000000); 67 clk_set_rate(ohci_at91->fclk, 48000000);
69 clk_prepare_enable(ohci_at91->uclk);
70 }
71 clk_prepare_enable(ohci_at91->hclk); 68 clk_prepare_enable(ohci_at91->hclk);
72 clk_prepare_enable(ohci_at91->iclk); 69 clk_prepare_enable(ohci_at91->iclk);
73 clk_prepare_enable(ohci_at91->fclk); 70 clk_prepare_enable(ohci_at91->fclk);
@@ -78,11 +75,10 @@ static void at91_stop_clock(struct ohci_at91_priv *ohci_at91)
78{ 75{
79 if (!ohci_at91->clocked) 76 if (!ohci_at91->clocked)
80 return; 77 return;
78
81 clk_disable_unprepare(ohci_at91->fclk); 79 clk_disable_unprepare(ohci_at91->fclk);
82 clk_disable_unprepare(ohci_at91->iclk); 80 clk_disable_unprepare(ohci_at91->iclk);
83 clk_disable_unprepare(ohci_at91->hclk); 81 clk_disable_unprepare(ohci_at91->hclk);
84 if (IS_ENABLED(CONFIG_COMMON_CLK))
85 clk_disable_unprepare(ohci_at91->uclk);
86 ohci_at91->clocked = false; 82 ohci_at91->clocked = false;
87} 83}
88 84
@@ -191,14 +187,6 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
191 retval = PTR_ERR(ohci_at91->hclk); 187 retval = PTR_ERR(ohci_at91->hclk);
192 goto err; 188 goto err;
193 } 189 }
194 if (IS_ENABLED(CONFIG_COMMON_CLK)) {
195 ohci_at91->uclk = devm_clk_get(dev, "usb_clk");
196 if (IS_ERR(ohci_at91->uclk)) {
197 dev_err(dev, "failed to get uclk\n");
198 retval = PTR_ERR(ohci_at91->uclk);
199 goto err;
200 }
201 }
202 190
203 board = hcd->self.controller->platform_data; 191 board = hcd->self.controller->platform_data;
204 ohci = hcd_to_ohci(hcd); 192 ohci = hcd_to_ohci(hcd);