Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208059
b: refs/heads/master
c: e50bf38
h: refs/heads/master
i:
  208057: ec4a224
  208055: 2fbbd8b
v: v3
  • Loading branch information
Maurus Cuelenaere authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 43b879d commit 8f42a0f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a33e7136e9652374f7d54ded3cff8062d8e1e84f
refs/heads/master: e50bf385bfadeaacfb8af07b9b78dcfdef339981
19 changes: 19 additions & 0 deletions trunk/drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/clk.h>

#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
Expand Down Expand Up @@ -2798,13 +2799,31 @@ static void __devinit s3c_hsotg_initep(struct s3c_hsotg *hsotg,
*/
static void s3c_hsotg_otgreset(struct s3c_hsotg *hsotg)
{
struct clk *xusbxti;
u32 osc;

writel(0, S3C_PHYPWR);
mdelay(1);

osc = hsotg->plat->is_osc ? S3C_PHYCLK_EXT_OSC : 0;

xusbxti = clk_get(hsotg->dev, "xusbxti");
if (xusbxti && !IS_ERR(xusbxti)) {
switch (clk_get_rate(xusbxti)) {
case 12*MHZ:
osc |= S3C_PHYCLK_CLKSEL_12M;
break;
case 24*MHZ:
osc |= S3C_PHYCLK_CLKSEL_24M;
break;
default:
case 48*MHZ:
/* default reference clock */
break;
}
clk_put(xusbxti);
}

writel(osc | 0x10, S3C_PHYCLK);

/* issue a full set of resets to the otg and core */
Expand Down

0 comments on commit 8f42a0f

Please sign in to comment.