aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s5pv210/clock.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index d7cee0c..840729e 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -34,6 +34,8 @@
static unsigned long xtal;
+static int s5pv210_usbosc_enable(struct clk *clk, int enable);
+
static struct clksrc_clk clk_mout_apll = {
.clk = {
.name = "mout_apll",
@@ -582,6 +584,11 @@ static struct clk init_clocks_off[] = {
.parent = &clk_hclk_dsys.clk,
.enable = s5pv210_clk_ip1_ctrl,
.ctrlbit = (1 << 8),
+ }, {
+ .name = "usb_osc",
+ .id = -1,
+ .enable = s5pv210_usbosc_enable,
+ .ctrlbit = (1 << 1),
},
};
@@ -1319,6 +1326,19 @@ static struct clksrc_clk *sysclks[] = {
&clk_dout_audio_bus_clk_i2s,
};
+static int s5pv210_usbosc_enable(struct clk *clk, int enable)
+{
+ unsigned int ctrlbit = clk->ctrlbit;
+ unsigned int usbosc_con = __raw_readl(S5P_SLEEP_CFG) & ~ctrlbit;
+
+ if (enable)
+ usbosc_con |= ctrlbit;
+
+ writel(usbosc_con, S5P_SLEEP_CFG);
+
+ return 0;
+}
+
static u32 epll_div[][6] = {
{ 48000000, 0, 48, 3, 3, 0 },
{ 96000000, 0, 48, 3, 2, 0 },