Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326679
b: refs/heads/master
c: 98a7069
h: refs/heads/master
i:
  326677: 49cdf97
  326675: 520b894
  326671: d7ec195
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Kukjin Kim committed Sep 20, 2012
1 parent 44039fc commit cc3eaa5
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: 859a09e671772db5781d27c9c0b5828a3bca094c
refs/heads/master: 98a7069ba04faf3313dcc5fa69476fc3b5ab3794
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-s3c24xx/clock-s3c2440.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
return 0;
}

static unsigned long s3c2440_camif_upll_getrate(struct clk *clk)
{
unsigned long parent_rate = clk_get_rate(clk->parent);
unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);

if (!(camdivn & S3C2440_CAMDIVN_CAMCLK_SEL))
return parent_rate;

camdivn &= S3C2440_CAMDIVN_CAMCLK_MASK;

return parent_rate / (camdivn + 1) / 2;
}

/* Extra S3C2440 clocks */

static struct clk s3c2440_clk_cam = {
Expand All @@ -99,6 +112,7 @@ static struct clk s3c2440_clk_cam_upll = {
.name = "camif-upll",
.ops = &(struct clk_ops) {
.set_rate = s3c2440_camif_upll_setrate,
.get_rate = s3c2440_camif_upll_getrate,
.round_rate = s3c2440_camif_upll_round,
},
};
Expand Down

0 comments on commit cc3eaa5

Please sign in to comment.