Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191599
b: refs/heads/master
c: e21d2aa
h: refs/heads/master
i:
  191597: 147cac6
  191595: 7b05449
  191591: 489f2ec
  191583: be4e472
v: v3
  • Loading branch information
Paul Mundt committed Mar 29, 2010
1 parent 088622c commit c7e868a
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 13 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: c2a25e819717ea34e8f682d67a3fa76f4893395b
refs/heads/master: e21d2aa76e1fc91cbf18c4b593d32112d954fab5
68 changes: 68 additions & 0 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <linux/kernel.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <asm/clkdev.h>
#include <asm/clock.h>
#include <asm/freq.h>

Expand Down Expand Up @@ -120,12 +122,78 @@ static struct clk mstp_clks[] = {
SH_CLK_MSTP32("ether_fck", -1, NULL, MSTPCR1, 2, 0),
};

static struct clk_lookup lookups[] = {
{
/* TMU0 */
.dev_id = "sh_tmu.0",
.con_id = "tmu_fck",
.clk = &mstp_clks[17], /* tmu012_fck */
}, {
/* TMU1 */
.dev_id = "sh_tmu.1",
.con_id = "tmu_fck",
.clk = &mstp_clks[17],
}, {
/* TMU2 */
.dev_id = "sh_tmu.2",
.con_id = "tmu_fck",
.clk = &mstp_clks[17],
}, {
/* TMU3 */
.dev_id = "sh_tmu.3",
.con_id = "tmu_fck",
.clk = &mstp_clks[16], /* tmu345_fck */
}, {
/* TMU4 */
.dev_id = "sh_tmu.4",
.con_id = "tmu_fck",
.clk = &mstp_clks[16],
}, {
/* TMU5 */
.dev_id = "sh_tmu.5",
.con_id = "tmu_fck",
.clk = &mstp_clks[16],
}, {
/* TMU6 */
.dev_id = "sh_tmu.6",
.con_id = "tmu_fck",
.clk = &mstp_clks[15], /* tmu678_fck */
}, {
/* TMU7 */
.dev_id = "sh_tmu.7",
.con_id = "tmu_fck",
.clk = &mstp_clks[15],
}, {
/* TMU8 */
.dev_id = "sh_tmu.8",
.con_id = "tmu_fck",
.clk = &mstp_clks[15],
}, {
/* TMU9 */
.dev_id = "sh_tmu.9",
.con_id = "tmu_fck",
.clk = &mstp_clks[14], /* tmu9_11_fck */
}, {
/* TMU10 */
.dev_id = "sh_tmu.10",
.con_id = "tmu_fck",
.clk = &mstp_clks[14],
}, {
/* TMU11 */
.dev_id = "sh_tmu.11",
.con_id = "tmu_fck",
.clk = &mstp_clks[14],
}
};

int __init arch_clk_init(void)
{
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(clks); i++)
ret |= clk_register(clks[i]);
for (i = 0; i < ARRAY_SIZE(lookups); i++)
clkdev_add(&lookups[i]);

if (!ret)
ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks),
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ static struct platform_device scif5_device = {
static struct sh_timer_config tmu0_platform_data = {
.channel_offset = 0x04,
.timer_bit = 0,
.clk = "peripheral_clk",
.clockevent_rating = 200,
};

Expand Down Expand Up @@ -148,7 +147,6 @@ static struct platform_device tmu0_device = {
static struct sh_timer_config tmu1_platform_data = {
.channel_offset = 0x10,
.timer_bit = 1,
.clk = "peripheral_clk",
.clocksource_rating = 200,
};

Expand Down Expand Up @@ -177,7 +175,6 @@ static struct platform_device tmu1_device = {
static struct sh_timer_config tmu2_platform_data = {
.channel_offset = 0x1c,
.timer_bit = 2,
.clk = "peripheral_clk",
};

static struct resource tmu2_resources[] = {
Expand Down Expand Up @@ -205,7 +202,6 @@ static struct platform_device tmu2_device = {
static struct sh_timer_config tmu3_platform_data = {
.channel_offset = 0x04,
.timer_bit = 0,
.clk = "peripheral_clk",
};

static struct resource tmu3_resources[] = {
Expand Down Expand Up @@ -233,7 +229,6 @@ static struct platform_device tmu3_device = {
static struct sh_timer_config tmu4_platform_data = {
.channel_offset = 0x10,
.timer_bit = 1,
.clk = "peripheral_clk",
};

static struct resource tmu4_resources[] = {
Expand Down Expand Up @@ -261,7 +256,6 @@ static struct platform_device tmu4_device = {
static struct sh_timer_config tmu5_platform_data = {
.channel_offset = 0x1c,
.timer_bit = 2,
.clk = "peripheral_clk",
};

static struct resource tmu5_resources[] = {
Expand Down Expand Up @@ -289,7 +283,6 @@ static struct platform_device tmu5_device = {
static struct sh_timer_config tmu6_platform_data = {
.channel_offset = 0x04,
.timer_bit = 0,
.clk = "peripheral_clk",
};

static struct resource tmu6_resources[] = {
Expand Down Expand Up @@ -317,7 +310,6 @@ static struct platform_device tmu6_device = {
static struct sh_timer_config tmu7_platform_data = {
.channel_offset = 0x10,
.timer_bit = 1,
.clk = "peripheral_clk",
};

static struct resource tmu7_resources[] = {
Expand Down Expand Up @@ -345,7 +337,6 @@ static struct platform_device tmu7_device = {
static struct sh_timer_config tmu8_platform_data = {
.channel_offset = 0x1c,
.timer_bit = 2,
.clk = "peripheral_clk",
};

static struct resource tmu8_resources[] = {
Expand Down Expand Up @@ -373,7 +364,6 @@ static struct platform_device tmu8_device = {
static struct sh_timer_config tmu9_platform_data = {
.channel_offset = 0x04,
.timer_bit = 0,
.clk = "peripheral_clk",
};

static struct resource tmu9_resources[] = {
Expand Down Expand Up @@ -401,7 +391,6 @@ static struct platform_device tmu9_device = {
static struct sh_timer_config tmu10_platform_data = {
.channel_offset = 0x10,
.timer_bit = 1,
.clk = "peripheral_clk",
};

static struct resource tmu10_resources[] = {
Expand Down Expand Up @@ -429,7 +418,6 @@ static struct platform_device tmu10_device = {
static struct sh_timer_config tmu11_platform_data = {
.channel_offset = 0x1c,
.timer_bit = 2,
.clk = "peripheral_clk",
};

static struct resource tmu11_resources[] = {
Expand Down

0 comments on commit c7e868a

Please sign in to comment.