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/sh2000 |
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/sh2000')
-rw-r--r-- | arch/sh/boards/sh2000/Makefile | 6 | ||||
-rw-r--r-- | arch/sh/boards/sh2000/setup.c | 71 |
2 files changed, 77 insertions, 0 deletions
diff --git a/arch/sh/boards/sh2000/Makefile b/arch/sh/boards/sh2000/Makefile new file mode 100644 index 000000000000..05d390c3599c --- /dev/null +++ b/arch/sh/boards/sh2000/Makefile | |||
@@ -0,0 +1,6 @@ | |||
1 | # | ||
2 | # Makefile for the SH2000 specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o | ||
6 | |||
diff --git a/arch/sh/boards/sh2000/setup.c b/arch/sh/boards/sh2000/setup.c new file mode 100644 index 000000000000..a290b1d09fb2 --- /dev/null +++ b/arch/sh/boards/sh2000/setup.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/setup_sh2000.c | ||
3 | * | ||
4 | * Copyright (C) 2001 SUGIOKA Tochinobu | ||
5 | * | ||
6 | * SH-2000 Support. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #include <linux/config.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/irq.h> | ||
13 | |||
14 | #include <asm/io.h> | ||
15 | #include <asm/machvec.h> | ||
16 | #include <asm/mach/sh2000.h> | ||
17 | |||
18 | #define CF_CIS_BASE 0xb4200000 | ||
19 | |||
20 | #define PORT_PECR 0xa4000108 | ||
21 | #define PORT_PHCR 0xa400010E | ||
22 | #define PORT_ICR1 0xa4000010 | ||
23 | #define PORT_IRR0 0xa4000004 | ||
24 | |||
25 | #define IDE_OFFSET 0xb6200000 | ||
26 | #define NIC_OFFSET 0xb6000000 | ||
27 | #define EXTBUS_OFFSET 0xba000000 | ||
28 | |||
29 | |||
30 | const char *get_system_type(void) | ||
31 | { | ||
32 | return "sh2000"; | ||
33 | } | ||
34 | |||
35 | static unsigned long sh2000_isa_port2addr(unsigned long offset) | ||
36 | { | ||
37 | if((offset & ~7) == 0x1f0 || offset == 0x3f6) | ||
38 | return IDE_OFFSET + offset; | ||
39 | else if((offset & ~0x1f) == 0x300) | ||
40 | return NIC_OFFSET + offset; | ||
41 | return EXTBUS_OFFSET + offset; | ||
42 | } | ||
43 | |||
44 | /* | ||
45 | * The Machine Vector | ||
46 | */ | ||
47 | struct sh_machine_vector mv_sh2000 __initmv = { | ||
48 | .mv_nr_irqs = 80, | ||
49 | .mv_isa_port2addr = sh2000_isa_port2addr, | ||
50 | }; | ||
51 | ALIAS_MV(sh2000) | ||
52 | |||
53 | /* | ||
54 | * Initialize the board | ||
55 | */ | ||
56 | int __init platform_setup(void) | ||
57 | { | ||
58 | /* XXX: RTC setting comes here */ | ||
59 | |||
60 | /* These should be done by BIOS/IPL ... */ | ||
61 | /* Enable nCE2A, nCE2B output */ | ||
62 | ctrl_outw(ctrl_inw(PORT_PECR) & ~0xf00, PORT_PECR); | ||
63 | /* Enable the Compact Flash card, and set the level interrupt */ | ||
64 | ctrl_outw(0x0042, CF_CIS_BASE+0x0200); | ||
65 | /* Enable interrupt */ | ||
66 | ctrl_outw(ctrl_inw(PORT_PHCR) & ~0x03f3, PORT_PHCR); | ||
67 | ctrl_outw(1, PORT_ICR1); | ||
68 | ctrl_outw(ctrl_inw(PORT_IRR0) & ~0xff3f, PORT_IRR0); | ||
69 | printk(KERN_INFO "SH-2000 Setup...done\n"); | ||
70 | return 0; | ||
71 | } | ||