Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249914
b: refs/heads/master
c: 6fa5d5f
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed May 23, 2011
1 parent 870c61f commit f67ff08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 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: bfe45e0be88d8a2e408226d473bff60da4a97d1f
refs/heads/master: 6fa5d5f764469daf3c4d21f94cbc1839b3857bbd
1 change: 1 addition & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ config ARCH_W90X900
select CPU_ARM926T
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select GENERIC_CLOCKEVENTS
help
Support for Nuvoton (Winbond logic dept.) ARM9 processor,
Expand Down
17 changes: 2 additions & 15 deletions trunk/arch/arm/mach-w90x900/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#define PRESCALE 0x63 /* Divider = prescale + 1 */

#define TDR_SHIFT 24
#define TDR_MASK ((1 << TDR_SHIFT) - 1)

static unsigned int timer0_load;

Expand Down Expand Up @@ -143,19 +142,6 @@ static void __init nuc900_clockevents_init(void)
clockevents_register_device(&nuc900_clockevent_device);
}

static cycle_t nuc900_get_cycles(struct clocksource *cs)
{
return (~__raw_readl(REG_TDR1)) & TDR_MASK;
}

static struct clocksource clocksource_nuc900 = {
.name = "nuc900-timer1",
.rating = 200,
.read = nuc900_get_cycles,
.mask = CLOCKSOURCE_MASK(TDR_SHIFT),
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

static void __init nuc900_clocksource_init(void)
{
unsigned int val;
Expand All @@ -175,7 +161,8 @@ static void __init nuc900_clocksource_init(void)
val |= (COUNTEN | PERIOD | PRESCALE);
__raw_writel(val, REG_TCSR1);

clocksource_register_hz(&clocksource_nuc900, rate);
clocksource_mmio_init(REG_TDR1, "nuc900-timer1", rate, 200,
TDR_SHIFT, clocksource_mmio_readl_down);
}

static void __init nuc900_timer_init(void)
Expand Down

0 comments on commit f67ff08

Please sign in to comment.