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/v850/kernel/teg.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/v850/kernel/teg.c')
-rw-r--r-- | arch/v850/kernel/teg.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c new file mode 100644 index 000000000000..495cf8f37bcb --- /dev/null +++ b/arch/v850/kernel/teg.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * arch/v850/kernel/teg.c -- NB85E-TEG cpu chip | ||
3 | * | ||
4 | * Copyright (C) 2001,02,03 NEC Electronics Corporation | ||
5 | * Copyright (C) 2001,02,03 Miles Bader <miles@gnu.org> | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General | ||
8 | * Public License. See the file COPYING in the main directory of this | ||
9 | * archive for more details. | ||
10 | * | ||
11 | * Written by Miles Bader <miles@gnu.org> | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/swap.h> | ||
19 | #include <linux/bootmem.h> | ||
20 | #include <linux/irq.h> | ||
21 | |||
22 | #include <asm/atomic.h> | ||
23 | #include <asm/page.h> | ||
24 | #include <asm/machdep.h> | ||
25 | #include <asm/v850e_timer_d.h> | ||
26 | |||
27 | #include "mach.h" | ||
28 | |||
29 | void __init mach_sched_init (struct irqaction *timer_action) | ||
30 | { | ||
31 | /* Select timer interrupt instead of external pin. */ | ||
32 | TEG_ISS |= 0x1; | ||
33 | /* Start hardware timer. */ | ||
34 | v850e_timer_d_configure (0, HZ); | ||
35 | /* Install timer interrupt handler. */ | ||
36 | setup_irq (IRQ_INTCMD(0), timer_action); | ||
37 | } | ||
38 | |||
39 | static struct v850e_intc_irq_init irq_inits[] = { | ||
40 | { "IRQ", 0, NUM_CPU_IRQS, 1, 7 }, | ||
41 | { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 5 }, | ||
42 | { "SER", IRQ_INTSER(0), IRQ_INTSER_NUM, 1, 3 }, | ||
43 | { "SR", IRQ_INTSR(0), IRQ_INTSR_NUM, 1, 4 }, | ||
44 | { "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 }, | ||
45 | { 0 } | ||
46 | }; | ||
47 | #define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1) | ||
48 | |||
49 | static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS]; | ||
50 | |||
51 | /* Initialize MA chip interrupts. */ | ||
52 | void __init teg_init_irqs (void) | ||
53 | { | ||
54 | v850e_intc_init_irq_types (irq_inits, hw_itypes); | ||
55 | } | ||
56 | |||
57 | /* Called before configuring an on-chip UART. */ | ||
58 | void teg_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | ||
59 | { | ||
60 | /* Enable UART I/O pins instead of external interrupt pins, and | ||
61 | UART interrupts instead of external pin interrupts. */ | ||
62 | TEG_ISS |= 0x4E; | ||
63 | } | ||