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/bigsur/setup.c |
Linux-2.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/bigsur/setup.c')
-rw-r--r-- | arch/sh/boards/bigsur/setup.c | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/arch/sh/boards/bigsur/setup.c b/arch/sh/boards/bigsur/setup.c new file mode 100644 index 00000000000..e69be05195f --- /dev/null +++ b/arch/sh/boards/bigsur/setup.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * | ||
3 | * By Dustin McIntire (dustin@sensoria.com) (c)2001 | ||
4 | * | ||
5 | * Setup and IRQ handling code for the HD64465 companion chip. | ||
6 | * by Greg Banks <gbanks@pocketpenguins.com> | ||
7 | * Copyright (c) 2000 PocketPenguins Inc | ||
8 | * | ||
9 | * Derived from setup_hd64465.c which bore the message: | ||
10 | * Greg Banks <gbanks@pocketpenguins.com> | ||
11 | * Copyright (c) 2000 PocketPenguins Inc and | ||
12 | * Copyright (C) 2000 YAEGASHI Takeshi | ||
13 | * and setup_cqreek.c which bore message: | ||
14 | * Copyright (C) 2000 Niibe Yutaka | ||
15 | * | ||
16 | * May be copied or modified under the terms of the GNU General Public | ||
17 | * License. See linux/COPYING for more information. | ||
18 | * | ||
19 | * Setup functions for a Hitachi Big Sur Evaluation Board. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <linux/config.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/param.h> | ||
28 | #include <linux/ioport.h> | ||
29 | #include <linux/interrupt.h> | ||
30 | #include <linux/init.h> | ||
31 | #include <linux/irq.h> | ||
32 | #include <linux/bitops.h> | ||
33 | |||
34 | #include <asm/io.h> | ||
35 | #include <asm/irq.h> | ||
36 | #include <asm/machvec.h> | ||
37 | #include <asm/bigsur/io.h> | ||
38 | #include <asm/hd64465/hd64465.h> | ||
39 | #include <asm/bigsur/bigsur.h> | ||
40 | |||
41 | /*===========================================================*/ | ||
42 | // Big Sur Init Routines | ||
43 | /*===========================================================*/ | ||
44 | |||
45 | const char *get_system_type(void) | ||
46 | { | ||
47 | return "Big Sur"; | ||
48 | } | ||
49 | |||
50 | /* | ||
51 | * The Machine Vector | ||
52 | */ | ||
53 | extern void heartbeat_bigsur(void); | ||
54 | extern void init_bigsur_IRQ(void); | ||
55 | |||
56 | struct sh_machine_vector mv_bigsur __initmv = { | ||
57 | .mv_nr_irqs = NR_IRQS, // Defined in <asm/irq.h> | ||
58 | |||
59 | .mv_isa_port2addr = bigsur_isa_port2addr, | ||
60 | .mv_irq_demux = bigsur_irq_demux, | ||
61 | |||
62 | .mv_init_irq = init_bigsur_IRQ, | ||
63 | #ifdef CONFIG_HEARTBEAT | ||
64 | .mv_heartbeat = heartbeat_bigsur, | ||
65 | #endif | ||
66 | }; | ||
67 | ALIAS_MV(bigsur) | ||
68 | |||
69 | int __init platform_setup(void) | ||
70 | { | ||
71 | /* Mask all 2nd level IRQ's */ | ||
72 | outb(-1,BIGSUR_IMR0); | ||
73 | outb(-1,BIGSUR_IMR1); | ||
74 | outb(-1,BIGSUR_IMR2); | ||
75 | outb(-1,BIGSUR_IMR3); | ||
76 | |||
77 | /* Mask 1st level interrupts */ | ||
78 | outb(-1,BIGSUR_IRLMR0); | ||
79 | outb(-1,BIGSUR_IRLMR1); | ||
80 | |||
81 | #if defined (CONFIG_HD64465) && defined (CONFIG_SERIAL) | ||
82 | /* remap IO ports for first ISA serial port to HD64465 UART */ | ||
83 | bigsur_port_map(0x3f8, 8, CONFIG_HD64465_IOBASE + 0x8000, 1); | ||
84 | #endif /* CONFIG_HD64465 && CONFIG_SERIAL */ | ||
85 | /* TODO: setup IDE registers */ | ||
86 | bigsur_port_map(BIGSUR_IDECTL_IOPORT, 2, BIGSUR_ICTL, 8); | ||
87 | /* Setup the Ethernet port to BIGSUR_ETHER_IOPORT */ | ||
88 | bigsur_port_map(BIGSUR_ETHER_IOPORT, 16, BIGSUR_ETHR+BIGSUR_ETHER_IOPORT, 0); | ||
89 | /* set page to 1 */ | ||
90 | outw(1, BIGSUR_ETHR+0xe); | ||
91 | /* set the IO port to BIGSUR_ETHER_IOPORT */ | ||
92 | outw(BIGSUR_ETHER_IOPORT<<3, BIGSUR_ETHR+0x2); | ||
93 | |||
94 | return 0; | ||
95 | } | ||
96 | |||