Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36641
b: refs/heads/master
c: ab0a2b9
h: refs/heads/master
i:
  36639: f0ad9c2
v: v3
  • Loading branch information
Juha Yrjola authored and Tony Lindgren committed Sep 25, 2006
1 parent 330a2f7 commit 178dbf6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12583a70ac6b6641905e37fdd61a7f711fb4ce2b
refs/heads/master: ab0a2b9b9f536d860681dacbfb5784bd76e88a1e
18 changes: 18 additions & 0 deletions trunk/arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ static void omap2_propagate_rate(struct clk * clk)
propagate_rate(clk);
}

static void omap2_set_osc_ck(int enable)
{
if (enable)
PRCM_CLKSRC_CTRL &= ~(0x3 << 3);
else
PRCM_CLKSRC_CTRL |= 0x3 << 3;
}

/* Enable an APLL if off */
static void omap2_clk_fixed_enable(struct clk *clk)
{
Expand Down Expand Up @@ -121,6 +129,11 @@ static int _omap2_clk_enable(struct clk * clk)
if (clk->flags & ALWAYS_ENABLED)
return 0;

if (unlikely(clk == &osc_ck)) {
omap2_set_osc_ck(1);
return 0;
}

if (unlikely(clk->enable_reg == 0)) {
printk(KERN_ERR "clock.c: Enable for %s without enable code\n",
clk->name);
Expand Down Expand Up @@ -158,6 +171,11 @@ static void _omap2_clk_disable(struct clk *clk)
{
u32 regval32;

if (unlikely(clk == &osc_ck)) {
omap2_set_osc_ck(0);
return;
}

if (clk->enable_reg == 0)
return;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-omap2/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static struct clk osc_ck = { /* (*12, *13, 19.2, *26, 38.4)MHz */
.name = "osc_ck",
.rate = 26000000, /* fixed up in clock init */
.flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
RATE_FIXED | ALWAYS_ENABLED | RATE_PROPAGATES,
RATE_FIXED | RATE_PROPAGATES,
};

/* With out modem likely 12MHz, with modem likely 13MHz */
Expand Down

0 comments on commit 178dbf6

Please sign in to comment.