21 #include <mach/hardware.h>
23 static struct clk *mxc_ahb_clk;
24 static struct clk *mxc_per_clk;
25 static struct clk *mxc_ipg_clk;
28 #define USBPHYCTRL_OTGBASE_OFFSET 0x608
29 #define USBPHYCTRL_EVDO (1 << 23)
37 pdata = pdev->
dev.platform_data;
40 if (IS_ERR(mxc_ipg_clk)) {
41 dev_err(&pdev->
dev,
"clk_get(\"ipg\") failed\n");
42 return PTR_ERR(mxc_ipg_clk);
46 if (IS_ERR(mxc_ahb_clk)) {
47 dev_err(&pdev->
dev,
"clk_get(\"ahb\") failed\n");
48 return PTR_ERR(mxc_ahb_clk);
52 if (IS_ERR(mxc_per_clk)) {
53 dev_err(&pdev->
dev,
"clk_get(\"per\") failed\n");
54 return PTR_ERR(mxc_per_clk);
57 clk_prepare_enable(mxc_ipg_clk);
58 clk_prepare_enable(mxc_ahb_clk);
59 clk_prepare_enable(mxc_per_clk);
65 (freq < 59999000 || freq > 60001000)) {
66 dev_err(&pdev->
dev,
"USB_CLK=%lu, should be 60MHz\n", freq);
75 clk_disable_unprepare(mxc_ipg_clk);
76 clk_disable_unprepare(mxc_ahb_clk);
77 clk_disable_unprepare(mxc_per_clk);
100 clk_disable_unprepare(mxc_per_clk);
108 clk_disable_unprepare(mxc_per_clk);
109 clk_disable_unprepare(mxc_ahb_clk);
110 clk_disable_unprepare(mxc_ipg_clk);