diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/arm/mach-h720x/cpu-h7201.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/arm/mach-h720x/cpu-h7201.c')
-rw-r--r-- | arch/arm/mach-h720x/cpu-h7201.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c new file mode 100644 index 000000000000..743656881ed6 --- /dev/null +++ b/arch/arm/mach-h720x/cpu-h7201.c | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-h720x/cpu-h7201.c | ||
3 | * | ||
4 | * Copyright (C) 2003 Thomas Gleixner <tglx@linutronix.de> | ||
5 | * 2003 Robert Schwebel <r.schwebel@pengutronix.de> | ||
6 | * 2004 Sascha Hauer <s.hauer@pengutronix.de> | ||
7 | * | ||
8 | * processor specific stuff for the Hynix h7201 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <asm/types.h> | ||
20 | #include <asm/hardware.h> | ||
21 | #include <asm/irq.h> | ||
22 | #include <asm/arch/irqs.h> | ||
23 | #include <asm/mach/irq.h> | ||
24 | #include <asm/mach/time.h> | ||
25 | #include "common.h" | ||
26 | /* | ||
27 | * Timer interrupt handler | ||
28 | */ | ||
29 | static irqreturn_t | ||
30 | h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
31 | { | ||
32 | write_seqlock(&xtime_lock); | ||
33 | |||
34 | CPU_REG (TIMER_VIRT, TIMER_TOPSTAT); | ||
35 | timer_tick(regs); | ||
36 | |||
37 | write_sequnlock(&xtime_lock); | ||
38 | |||
39 | return IRQ_HANDLED; | ||
40 | } | ||
41 | |||
42 | static struct irqaction h7201_timer_irq = { | ||
43 | .name = "h7201 Timer Tick", | ||
44 | .flags = SA_INTERRUPT, | ||
45 | .handler = h7201_timer_interrupt | ||
46 | }; | ||
47 | |||
48 | /* | ||
49 | * Setup TIMER0 as system timer | ||
50 | */ | ||
51 | void __init h7201_init_time(void) | ||
52 | { | ||
53 | CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; | ||
54 | CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; | ||
55 | CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; | ||
56 | CPU_REG (TIMER_VIRT, TIMER_TOPCTRL) = ENABLE_TM0_INTR | TIMER_ENABLE_BIT; | ||
57 | |||
58 | setup_irq(IRQ_TIMER0, &h7201_timer_irq); | ||
59 | } | ||
60 | |||
61 | struct sys_timer h7201_timer = { | ||
62 | .init = h7201_init_time, | ||
63 | .offset = h720x_gettimeoffset, | ||
64 | }; | ||