Commit 963719c8 authored by Boris Brezillon's avatar Boris Brezillon Committed by Greg Kroah-Hartman

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 85e8a0b9
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
struct ohci_at91_priv { struct ohci_at91_priv {
struct clk *iclk; struct clk *iclk;
struct clk *fclk; struct clk *fclk;
struct clk *uclk;
struct clk *hclk; struct clk *hclk;
bool clocked; bool clocked;
bool wakeup; /* Saved wake-up state for resume */ bool wakeup; /* Saved wake-up state for resume */
...@@ -64,10 +63,8 @@ static void at91_start_clock(struct ohci_at91_priv *ohci_at91) ...@@ -64,10 +63,8 @@ static void at91_start_clock(struct ohci_at91_priv *ohci_at91)
{ {
if (ohci_at91->clocked) if (ohci_at91->clocked)
return; return;
if (IS_ENABLED(CONFIG_COMMON_CLK)) {
clk_set_rate(ohci_at91->uclk, 48000000); clk_set_rate(ohci_at91->fclk, 48000000);
clk_prepare_enable(ohci_at91->uclk);
}
clk_prepare_enable(ohci_at91->hclk); clk_prepare_enable(ohci_at91->hclk);
clk_prepare_enable(ohci_at91->iclk); clk_prepare_enable(ohci_at91->iclk);
clk_prepare_enable(ohci_at91->fclk); clk_prepare_enable(ohci_at91->fclk);
...@@ -78,11 +75,10 @@ static void at91_stop_clock(struct ohci_at91_priv *ohci_at91) ...@@ -78,11 +75,10 @@ static void at91_stop_clock(struct ohci_at91_priv *ohci_at91)
{ {
if (!ohci_at91->clocked) if (!ohci_at91->clocked)
return; return;
clk_disable_unprepare(ohci_at91->fclk); clk_disable_unprepare(ohci_at91->fclk);
clk_disable_unprepare(ohci_at91->iclk); clk_disable_unprepare(ohci_at91->iclk);
clk_disable_unprepare(ohci_at91->hclk); clk_disable_unprepare(ohci_at91->hclk);
if (IS_ENABLED(CONFIG_COMMON_CLK))
clk_disable_unprepare(ohci_at91->uclk);
ohci_at91->clocked = false; ohci_at91->clocked = false;
} }
...@@ -191,14 +187,6 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver, ...@@ -191,14 +187,6 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
retval = PTR_ERR(ohci_at91->hclk); retval = PTR_ERR(ohci_at91->hclk);
goto err; goto err;
} }
if (IS_ENABLED(CONFIG_COMMON_CLK)) {
ohci_at91->uclk = devm_clk_get(dev, "usb_clk");
if (IS_ERR(ohci_at91->uclk)) {
dev_err(dev, "failed to get uclk\n");
retval = PTR_ERR(ohci_at91->uclk);
goto err;
}
}
board = hcd->self.controller->platform_data; board = hcd->self.controller->platform_data;
ohci = hcd_to_ohci(hcd); ohci = hcd_to_ohci(hcd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment