diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-11-06 16:38:18 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2013-11-07 15:44:32 +0800 |
commit | 39a926fc621ae4afb9bcbcd8329a9781ea41fd0e (patch) | |
tree | da020ec48540ffd3f541b445725cfd74dd5827e9 /drivers/usb/chipidea | |
parent | 2693b108938545e07756f9c2ca22ee1e1c6d8aa4 (diff) |
ENGR00286459 usb: chipidea: imx: add request{release}_bus_freq
When the usb in idle, it calls release_bus_req.
When the usb is going to use, it calls request_bus_req.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/ci_hdrc_imx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index ea429a571533..c429f350c870 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -19,6 +19,7 @@ #include <linux/dma-mapping.h> #include <linux/usb/chipidea.h> #include <linux/clk.h> +#include <linux/busfreq-imx6.h> #include "ci.h" #include "ci_hdrc_imx.h" @@ -137,6 +138,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev) if (IS_ERR(data->usbmisc_data)) return PTR_ERR(data->usbmisc_data); + request_bus_freq(BUS_FREQ_HIGH); data->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(data->clk)) { dev_err(&pdev->dev, @@ -242,6 +244,7 @@ static int ci_hdrc_imx_remove(struct platform_device *pdev) pm_runtime_put_noidle(&pdev->dev); } clk_disable_unprepare(data->clk); + release_bus_freq(BUS_FREQ_HIGH); return 0; } @@ -268,7 +271,7 @@ static int imx_controller_suspend(struct device *dev) } clk_disable_unprepare(data->clk); - + release_bus_freq(BUS_FREQ_HIGH); data->in_lpm = true; return 0; @@ -284,6 +287,7 @@ static int imx_controller_resume(struct device *dev) if (!data->in_lpm) return 0; + request_bus_freq(BUS_FREQ_HIGH); ret = clk_prepare_enable(data->clk); if (ret) return ret; |