diff options
Diffstat (limited to 'arch/sh/boards/se/770x')
-rw-r--r-- | arch/sh/boards/se/770x/Makefile | 3 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/mach.c | 62 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/setup.c | 61 |
3 files changed, 48 insertions, 78 deletions
diff --git a/arch/sh/boards/se/770x/Makefile b/arch/sh/boards/se/770x/Makefile index c96ed6933fe1..9a5035f80ec0 100644 --- a/arch/sh/boards/se/770x/Makefile +++ b/arch/sh/boards/se/770x/Makefile | |||
@@ -2,6 +2,5 @@ | |||
2 | # Makefile for the 770x SolutionEngine specific parts of the kernel | 2 | # Makefile for the 770x SolutionEngine specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := mach.o setup.o io.o irq.o | 5 | obj-y := setup.o io.o irq.o |
6 | |||
7 | obj-$(CONFIG_HEARTBEAT) += led.o | 6 | obj-$(CONFIG_HEARTBEAT) += led.o |
diff --git a/arch/sh/boards/se/770x/mach.c b/arch/sh/boards/se/770x/mach.c deleted file mode 100644 index e8968b71c353..000000000000 --- a/arch/sh/boards/se/770x/mach.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/mach_se.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Stuart Menefy (stuart.menefy@st.com) | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * Machine vector for the Hitachi SolutionEngine | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | |||
14 | #include <asm/machvec.h> | ||
15 | #include <asm/rtc.h> | ||
16 | #include <asm/se.h> | ||
17 | |||
18 | void heartbeat_se(void); | ||
19 | void init_se_IRQ(void); | ||
20 | |||
21 | /* | ||
22 | * The Machine Vector | ||
23 | */ | ||
24 | |||
25 | struct sh_machine_vector mv_se __initmv = { | ||
26 | #if defined(CONFIG_CPU_SH4) | ||
27 | .mv_nr_irqs = 48, | ||
28 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) | ||
29 | .mv_nr_irqs = 32, | ||
30 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
31 | .mv_nr_irqs = 61, | ||
32 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
33 | .mv_nr_irqs = 86, | ||
34 | #endif | ||
35 | |||
36 | .mv_inb = se_inb, | ||
37 | .mv_inw = se_inw, | ||
38 | .mv_inl = se_inl, | ||
39 | .mv_outb = se_outb, | ||
40 | .mv_outw = se_outw, | ||
41 | .mv_outl = se_outl, | ||
42 | |||
43 | .mv_inb_p = se_inb_p, | ||
44 | .mv_inw_p = se_inw, | ||
45 | .mv_inl_p = se_inl, | ||
46 | .mv_outb_p = se_outb_p, | ||
47 | .mv_outw_p = se_outw, | ||
48 | .mv_outl_p = se_outl, | ||
49 | |||
50 | .mv_insb = se_insb, | ||
51 | .mv_insw = se_insw, | ||
52 | .mv_insl = se_insl, | ||
53 | .mv_outsb = se_outsb, | ||
54 | .mv_outsw = se_outsw, | ||
55 | .mv_outsl = se_outsl, | ||
56 | |||
57 | .mv_init_irq = init_se_IRQ, | ||
58 | #ifdef CONFIG_HEARTBEAT | ||
59 | .mv_heartbeat = heartbeat_se, | ||
60 | #endif | ||
61 | }; | ||
62 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index c9f75272e751..f3f82b7c8217 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c | |||
@@ -7,15 +7,17 @@ | |||
7 | * Hitachi SolutionEngine Support. | 7 | * Hitachi SolutionEngine Support. |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | |||
11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
12 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
13 | |||
14 | #include <linux/hdreg.h> | 12 | #include <linux/hdreg.h> |
15 | #include <linux/ide.h> | 13 | #include <linux/ide.h> |
16 | #include <asm/io.h> | 14 | #include <asm/io.h> |
17 | #include <asm/se.h> | 15 | #include <asm/se.h> |
18 | #include <asm/smc37c93x.h> | 16 | #include <asm/smc37c93x.h> |
17 | #include <asm/machvec.h> | ||
18 | |||
19 | void heartbeat_se(void); | ||
20 | void init_se_IRQ(void); | ||
19 | 21 | ||
20 | /* | 22 | /* |
21 | * Configure the Super I/O chip | 23 | * Configure the Super I/O chip |
@@ -26,7 +28,8 @@ static void __init smsc_config(int index, int data) | |||
26 | outb_p(data, DATA_PORT); | 28 | outb_p(data, DATA_PORT); |
27 | } | 29 | } |
28 | 30 | ||
29 | static void __init init_smsc(void) | 31 | /* XXX: Another candidate for a more generic cchip machine vector */ |
32 | static void __init smsc_setup(char **cmdline_p) | ||
30 | { | 33 | { |
31 | outb_p(CONFIG_ENTER, CONFIG_PORT); | 34 | outb_p(CONFIG_ENTER, CONFIG_PORT); |
32 | outb_p(CONFIG_ENTER, CONFIG_PORT); | 35 | outb_p(CONFIG_ENTER, CONFIG_PORT); |
@@ -69,16 +72,46 @@ static void __init init_smsc(void) | |||
69 | outb_p(CONFIG_EXIT, CONFIG_PORT); | 72 | outb_p(CONFIG_EXIT, CONFIG_PORT); |
70 | } | 73 | } |
71 | 74 | ||
72 | const char *get_system_type(void) | ||
73 | { | ||
74 | return "SolutionEngine"; | ||
75 | } | ||
76 | |||
77 | /* | 75 | /* |
78 | * Initialize the board | 76 | * The Machine Vector |
79 | */ | 77 | */ |
80 | void __init platform_setup(void) | 78 | struct sh_machine_vector mv_se __initmv = { |
81 | { | 79 | .mv_name = "SolutionEngine", |
82 | init_smsc(); | 80 | .mv_setup = smsc_setup, |
83 | /* XXX: RTC setting comes here */ | 81 | #if defined(CONFIG_CPU_SH4) |
84 | } | 82 | .mv_nr_irqs = 48, |
83 | #elif defined(CONFIG_CPU_SUBTYPE_SH7708) | ||
84 | .mv_nr_irqs = 32, | ||
85 | #elif defined(CONFIG_CPU_SUBTYPE_SH7709) | ||
86 | .mv_nr_irqs = 61, | ||
87 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
88 | .mv_nr_irqs = 86, | ||
89 | #endif | ||
90 | |||
91 | .mv_inb = se_inb, | ||
92 | .mv_inw = se_inw, | ||
93 | .mv_inl = se_inl, | ||
94 | .mv_outb = se_outb, | ||
95 | .mv_outw = se_outw, | ||
96 | .mv_outl = se_outl, | ||
97 | |||
98 | .mv_inb_p = se_inb_p, | ||
99 | .mv_inw_p = se_inw, | ||
100 | .mv_inl_p = se_inl, | ||
101 | .mv_outb_p = se_outb_p, | ||
102 | .mv_outw_p = se_outw, | ||
103 | .mv_outl_p = se_outl, | ||
104 | |||
105 | .mv_insb = se_insb, | ||
106 | .mv_insw = se_insw, | ||
107 | .mv_insl = se_insl, | ||
108 | .mv_outsb = se_outsb, | ||
109 | .mv_outsw = se_outsw, | ||
110 | .mv_outsl = se_outsl, | ||
111 | |||
112 | .mv_init_irq = init_se_IRQ, | ||
113 | #ifdef CONFIG_HEARTBEAT | ||
114 | .mv_heartbeat = heartbeat_se, | ||
115 | #endif | ||
116 | }; | ||
117 | ALIAS_MV(se) | ||