Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221177
b: refs/heads/master
c: 06185c0
h: refs/heads/master
i:
  221175: 5d2637e
v: v3
  • Loading branch information
Seungwhan Youn authored and Kukjin Kim committed Oct 25, 2010
1 parent 6da95d3 commit af3946f
Show file tree
Hide file tree
Showing 3 changed files with 30 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: 8e0e9e295814d3d514bdfdef72ca271ebe862433
refs/heads/master: 06185c07621263ee1665d4a4e27a9782a677bcf9
28 changes: 28 additions & 0 deletions trunk/arch/arm/mach-s5p6442/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ static struct clk clk_pclkd1 = {
.parent = &clk_hclkd1,
};

int s5p6442_clk_ip0_ctrl(struct clk *clk, int enable)
{
return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable);
}

int s5p6442_clk_ip3_ctrl(struct clk *clk, int enable)
{
return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable);
Expand Down Expand Up @@ -335,6 +340,16 @@ void __init_or_cpufreq s5p6442_setup_clocks(void)
clk_pclkd1.rate = pclkd1;
}

static struct clk init_clocks_disable[] = {
{
.name = "pdma",
.id = -1,
.parent = &clk_pclkd1,
.enable = s5p6442_clk_ip0_ctrl,
.ctrlbit = (1 << 3),
},
};

static struct clk init_clocks[] = {
{
.name = "systimer",
Expand Down Expand Up @@ -393,10 +408,23 @@ static struct clk *clks[] __initdata = {

void __init s5p6442_register_clocks(void)
{
struct clk *clkptr;
int i, ret;

s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));

s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));

clkptr = init_clocks_disable;
for (i = 0; i < ARRAY_SIZE(init_clocks_disable); i++, clkptr++) {
ret = s3c24xx_register_clock(clkptr);
if (ret < 0) {
printk(KERN_ERR "Fail to register clock %s (%d)\n",
clkptr->name, ret);
} else
(clkptr->enable)(clkptr, 0);
}

s3c_pwmclk_init();
}
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-s5p6442/include/mach/regs-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#define S5P_CLK_DIV5 S5P_CLKREG(0x314)
#define S5P_CLK_DIV6 S5P_CLKREG(0x318)

#define S5P_CLKGATE_IP0 S5P_CLKREG(0x460)
#define S5P_CLKGATE_IP3 S5P_CLKREG(0x46C)

/* CLK_OUT */
Expand Down

0 comments on commit af3946f

Please sign in to comment.