Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192030
b: refs/heads/master
c: 6ed91a2
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Abraham authored and Ben Dooks committed May 17, 2010
1 parent cf6daa7 commit e0367d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 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: acfa245fc7777bc1935c70a8951ff699952921c5
refs/heads/master: 6ed91a202b3843d2fec51f00c31e65313ca00906
23 changes: 13 additions & 10 deletions trunk/arch/arm/mach-s5pv210/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ static struct clksrc_clk clk_hclk_msys = {
.reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 },
};

static struct clksrc_clk clk_pclk_msys = {
.clk = {
.name = "pclk_msys",
.id = -1,
.parent = &clk_hclk_msys.clk,
},
.reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 },
};

static struct clksrc_clk clk_sclk_a2m = {
.clk = {
.name = "sclk_a2m",
Expand Down Expand Up @@ -151,11 +160,6 @@ static struct clk clk_h100 = {
.id = -1,
};

static struct clk clk_p100 = {
.name = "pclk100",
.id = -1,
};

static struct clk clk_p83 = {
.name = "pclk83",
.id = -1,
Expand All @@ -168,7 +172,6 @@ static struct clk clk_p66 = {

static struct clk *sys_clks[] = {
&clk_h100,
&clk_p100,
&clk_p83,
&clk_p66
};
Expand Down Expand Up @@ -383,6 +386,7 @@ static struct clksrc_clk *sysclks[] = {
&clk_sclk_a2m,
&clk_hclk_dsys,
&clk_hclk_psys,
&clk_pclk_msys,
};

#define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1)
Expand All @@ -395,7 +399,7 @@ void __init_or_cpufreq s5pv210_setup_clocks(void)
unsigned long hclk_msys;
unsigned long hclk_dsys;
unsigned long hclk_psys;
unsigned long pclk100;
unsigned long pclk_msys;
unsigned long pclk83;
unsigned long pclk66;
unsigned long apll;
Expand Down Expand Up @@ -435,15 +439,14 @@ void __init_or_cpufreq s5pv210_setup_clocks(void)
hclk_msys = clk_get_rate(&clk_hclk_msys.clk);
hclk_dsys = clk_get_rate(&clk_hclk_dsys.clk);
hclk_psys = clk_get_rate(&clk_hclk_psys.clk);

pclk100 = hclk_msys / GET_DIV(clkdiv0, S5P_CLKDIV0_PCLK100);
pclk_msys = clk_get_rate(&clk_pclk_msys.clk);
pclk83 = hclk_dsys / GET_DIV(clkdiv0, S5P_CLKDIV0_PCLK83);
pclk66 = hclk_psys / GET_DIV(clkdiv0, S5P_CLKDIV0_PCLK66);

printk(KERN_INFO "S5PV210: ARMCLK=%ld, HCLKM=%ld, HCLKD=%ld\n"
"HCLKP=%ld, PCLKM=%ld, PCLKD=%ld, PCLKP=%ld\n",
armclk, hclk_msys, hclk_dsys, hclk_psys,
pclk100, pclk83, pclk66);
pclk_msys, pclk83, pclk66);

clk_f.rate = armclk;
clk_h.rate = hclk_psys;
Expand Down

0 comments on commit e0367d5

Please sign in to comment.