Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274100
b: refs/heads/master
c: 5f33bd7
h: refs/heads/master
v: v3
  • Loading branch information
Heiko Stuebner authored and Kukjin Kim committed Oct 14, 2011
1 parent ec10a92 commit 404966b
Show file tree
Hide file tree
Showing 2 changed files with 15 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: efb1fb486a8187f02ac4a0170ab45823ebbe58f2
refs/heads/master: 5f33bd76f5c4df45cd5b2e4132c6451dac8afee9
14 changes: 14 additions & 0 deletions trunk/arch/arm/plat-s3c24xx/s3c2443-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,19 @@ static unsigned long s3c2443_armclk_roundrate(struct clk *clk,
return parent / best;
}

static unsigned long s3c2443_armclk_getrate(struct clk *clk)
{
unsigned long rate = clk_get_rate(clk->parent);
unsigned long clkcon0;
int val;

clkcon0 = __raw_readl(S3C2443_CLKDIV0);
clkcon0 &= armdivmask;
val = clkcon0 >> S3C2443_CLKDIV0_ARMDIV_SHIFT;

return rate / armdiv[val];
}

static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
{
unsigned long parent = clk_get_rate(clk->parent);
Expand Down Expand Up @@ -224,6 +237,7 @@ static struct clk clk_armdiv = {
.parent = &clk_msysclk.clk,
.ops = &(struct clk_ops) {
.round_rate = s3c2443_armclk_roundrate,
.get_rate = s3c2443_armclk_getrate,
.set_rate = s3c2443_armclk_setrate,
},
};
Expand Down

0 comments on commit 404966b

Please sign in to comment.