aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-02-10 23:44:43 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-18 11:19:08 -0400
commit73dea4a912b2bfe955305de4891018f9e71e399d (patch)
tree773bea87dbec63fe44fe7a3512d283db13a2e7ce
parent560400875d56d6e5f589a25319febcb32238f004 (diff)
usb: chipidea: usbmisc_imx: delete clock information
All imx usb controller's non core registers uses the same clock gate with core registers, the usbmisc_imx is the library for imx glue driver, the glue keeps clock on when it calls usbmisc_imx API to change non-core register. Besides, we will support runtime pm in the future, it also needs to close this clock when the usb is not in use. Philipp Zabel also verifies it at imx6q platform, see http://www.spinics.net/lists/linux-usb/msg118491.html Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/chipidea/usbmisc_imx.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
index c3c6225b8acf..93856027d6f4 100644
--- a/drivers/usb/chipidea/usbmisc_imx.c
+++ b/drivers/usb/chipidea/usbmisc_imx.c
@@ -11,7 +11,6 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/of_platform.h> 13#include <linux/of_platform.h>
14#include <linux/clk.h>
15#include <linux/err.h> 14#include <linux/err.h>
16#include <linux/io.h> 15#include <linux/io.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
@@ -69,7 +68,6 @@ struct usbmisc_ops {
69struct imx_usbmisc { 68struct imx_usbmisc {
70 void __iomem *base; 69 void __iomem *base;
71 spinlock_t lock; 70 spinlock_t lock;
72 struct clk *clk;
73 const struct usbmisc_ops *ops; 71 const struct usbmisc_ops *ops;
74}; 72};
75 73
@@ -322,7 +320,6 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
322{ 320{
323 struct resource *res; 321 struct resource *res;
324 struct imx_usbmisc *data; 322 struct imx_usbmisc *data;
325 int ret;
326 struct of_device_id *tmp_dev; 323 struct of_device_id *tmp_dev;
327 324
328 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); 325 data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
@@ -336,20 +333,6 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
336 if (IS_ERR(data->base)) 333 if (IS_ERR(data->base))
337 return PTR_ERR(data->base); 334 return PTR_ERR(data->base);
338 335
339 data->clk = devm_clk_get(&pdev->dev, NULL);
340 if (IS_ERR(data->clk)) {
341 dev_err(&pdev->dev,
342 "failed to get clock, err=%ld\n", PTR_ERR(data->clk));
343 return PTR_ERR(data->clk);
344 }
345
346 ret = clk_prepare_enable(data->clk);
347 if (ret) {
348 dev_err(&pdev->dev,
349 "clk_prepare_enable failed, err=%d\n", ret);
350 return ret;
351 }
352
353 tmp_dev = (struct of_device_id *) 336 tmp_dev = (struct of_device_id *)
354 of_match_device(usbmisc_imx_dt_ids, &pdev->dev); 337 of_match_device(usbmisc_imx_dt_ids, &pdev->dev);
355 data->ops = (const struct usbmisc_ops *)tmp_dev->data; 338 data->ops = (const struct usbmisc_ops *)tmp_dev->data;
@@ -360,8 +343,6 @@ static int usbmisc_imx_probe(struct platform_device *pdev)
360 343
361static int usbmisc_imx_remove(struct platform_device *pdev) 344static int usbmisc_imx_remove(struct platform_device *pdev)
362{ 345{
363 struct imx_usbmisc *usbmisc = dev_get_drvdata(&pdev->dev);
364 clk_disable_unprepare(usbmisc->clk);
365 return 0; 346 return 0;
366} 347}
367 348