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/sh/boards/ec3104/setup.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/sh/boards/ec3104/setup.c')
-rw-r--r-- | arch/sh/boards/ec3104/setup.c | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/sh/boards/ec3104/setup.c b/arch/sh/boards/ec3104/setup.c new file mode 100644 index 000000000000..5130ba2b6ff1 --- /dev/null +++ b/arch/sh/boards/ec3104/setup.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/ec3104/setup.c | ||
3 | * EC3104 companion chip support | ||
4 | * | ||
5 | * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | ||
6 | * | ||
7 | */ | ||
8 | /* EC3104 note: | ||
9 | * This code was written without any documentation about the EC3104 chip. While | ||
10 | * I hope I got most of the basic functionality right, the register names I use | ||
11 | * are most likely completely different from those in the chip documentation. | ||
12 | * | ||
13 | * If you have any further information about the EC3104, please tell me | ||
14 | * (prumpf@tux.org). | ||
15 | */ | ||
16 | |||
17 | #include <linux/sched.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/param.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/types.h> | ||
24 | |||
25 | #include <asm/io.h> | ||
26 | #include <asm/irq.h> | ||
27 | #include <asm/machvec.h> | ||
28 | #include <asm/mach/ec3104.h> | ||
29 | |||
30 | const char *get_system_type(void) | ||
31 | { | ||
32 | return "EC3104"; | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * The Machine Vector | ||
37 | */ | ||
38 | |||
39 | struct sh_machine_vector mv_ec3104 __initmv = { | ||
40 | .mv_nr_irqs = 96, | ||
41 | |||
42 | .mv_inb = ec3104_inb, | ||
43 | .mv_inw = ec3104_inw, | ||
44 | .mv_inl = ec3104_inl, | ||
45 | .mv_outb = ec3104_outb, | ||
46 | .mv_outw = ec3104_outw, | ||
47 | .mv_outl = ec3104_outl, | ||
48 | |||
49 | .mv_irq_demux = ec3104_irq_demux, | ||
50 | }; | ||
51 | |||
52 | ALIAS_MV(ec3104) | ||
53 | |||
54 | int __init platform_setup(void) | ||
55 | { | ||
56 | char str[8]; | ||
57 | int i; | ||
58 | |||
59 | if (0) | ||
60 | return 0; | ||
61 | |||
62 | for (i=0; i<8; i++) | ||
63 | str[i] = ctrl_readb(EC3104_BASE + i); | ||
64 | |||
65 | for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) | ||
66 | irq_desc[i].handler = &ec3104_int; | ||
67 | |||
68 | printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", | ||
69 | str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); | ||
70 | |||
71 | |||
72 | /* mask all interrupts. this should have been done by the boot | ||
73 | * loader for us but we want to be sure ... */ | ||
74 | ctrl_writel(0xffffffff, EC3104_IMR); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | |||