aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/se')
-rw-r--r--arch/sh/boards/se/7300/setup.c17
-rw-r--r--arch/sh/boards/se/73180/setup.c17
-rw-r--r--arch/sh/boards/se/770x/Makefile3
-rw-r--r--arch/sh/boards/se/770x/mach.c62
-rw-r--r--arch/sh/boards/se/770x/setup.c61
-rw-r--r--arch/sh/boards/se/7751/Makefile3
-rw-r--r--arch/sh/boards/se/7751/mach.c48
-rw-r--r--arch/sh/boards/se/7751/setup.c103
8 files changed, 89 insertions, 225 deletions
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index bb7e1a189be8..6f082a722d42 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -14,17 +14,11 @@
14void heartbeat_7300se(void); 14void heartbeat_7300se(void);
15void init_7300se_IRQ(void); 15void init_7300se_IRQ(void);
16 16
17const char *
18get_system_type(void)
19{
20 return "SolutionEngine 7300";
21}
22
23/* 17/*
24 * The Machine Vector 18 * The Machine Vector
25 */ 19 */
26
27struct sh_machine_vector mv_7300se __initmv = { 20struct sh_machine_vector mv_7300se __initmv = {
21 .mv_name = "SolutionEngine 7300",
28 .mv_nr_irqs = 109, 22 .mv_nr_irqs = 109,
29 .mv_inb = sh7300se_inb, 23 .mv_inb = sh7300se_inb,
30 .mv_inw = sh7300se_inw, 24 .mv_inw = sh7300se_inw,
@@ -52,13 +46,4 @@ struct sh_machine_vector mv_7300se __initmv = {
52 .mv_heartbeat = heartbeat_7300se, 46 .mv_heartbeat = heartbeat_7300se,
53#endif 47#endif
54}; 48};
55
56ALIAS_MV(7300se) 49ALIAS_MV(7300se)
57/*
58 * Initialize the board
59 */
60void __init
61platform_setup(void)
62{
63
64}
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index 4daf53b1457f..b38ef50a160a 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -17,17 +17,11 @@
17void heartbeat_73180se(void); 17void heartbeat_73180se(void);
18void init_73180se_IRQ(void); 18void init_73180se_IRQ(void);
19 19
20const char *
21get_system_type(void)
22{
23 return "SolutionEngine 73180";
24}
25
26/* 20/*
27 * The Machine Vector 21 * The Machine Vector
28 */ 22 */
29
30struct sh_machine_vector mv_73180se __initmv = { 23struct sh_machine_vector mv_73180se __initmv = {
24 .mv_name = "SolutionEngine 73180",
31 .mv_nr_irqs = 108, 25 .mv_nr_irqs = 108,
32 .mv_inb = sh73180se_inb, 26 .mv_inb = sh73180se_inb,
33 .mv_inw = sh73180se_inw, 27 .mv_inw = sh73180se_inw,
@@ -56,13 +50,4 @@ struct sh_machine_vector mv_73180se __initmv = {
56 .mv_heartbeat = heartbeat_73180se, 50 .mv_heartbeat = heartbeat_73180se,
57#endif 51#endif
58}; 52};
59
60ALIAS_MV(73180se) 53ALIAS_MV(73180se)
61/*
62 * Initialize the board
63 */
64void __init
65platform_setup(void)
66{
67
68}
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
5obj-y := mach.o setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6
7obj-$(CONFIG_HEARTBEAT) += led.o 6obj-$(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
18void heartbeat_se(void);
19void init_se_IRQ(void);
20
21/*
22 * The Machine Vector
23 */
24
25struct 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};
62ALIAS_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
19void heartbeat_se(void);
20void 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
29static void __init init_smsc(void) 31/* XXX: Another candidate for a more generic cchip machine vector */
32static 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
72const char *get_system_type(void)
73{
74 return "SolutionEngine";
75}
76
77/* 75/*
78 * Initialize the board 76 * The Machine Vector
79 */ 77 */
80void __init platform_setup(void) 78struct 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};
117ALIAS_MV(se)
diff --git a/arch/sh/boards/se/7751/Makefile b/arch/sh/boards/se/7751/Makefile
index 07bf17a4a19b..188900c48321 100644
--- a/arch/sh/boards/se/7751/Makefile
+++ b/arch/sh/boards/se/7751/Makefile
@@ -2,8 +2,7 @@
2# Makefile for the 7751 SolutionEngine specific parts of the kernel 2# Makefile for the 7751 SolutionEngine specific parts of the kernel
3# 3#
4 4
5obj-y := mach.o setup.o io.o irq.o 5obj-y := setup.o io.o irq.o
6 6
7obj-$(CONFIG_PCI) += pci.o 7obj-$(CONFIG_PCI) += pci.o
8obj-$(CONFIG_HEARTBEAT) += led.o 8obj-$(CONFIG_HEARTBEAT) += led.o
9
diff --git a/arch/sh/boards/se/7751/mach.c b/arch/sh/boards/se/7751/mach.c
deleted file mode 100644
index 1bb9047d863b..000000000000
--- a/arch/sh/boards/se/7751/mach.c
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * linux/arch/sh/kernel/mach_7751se.c
3 *
4 * Minor tweak of mach_se.c file to reference 7751se-specific items.
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 7751 SolutionEngine
10 */
11
12#include <linux/init.h>
13#include <asm/machvec.h>
14#include <asm/se7751.h>
15
16void heartbeat_7751se(void);
17void init_7751se_IRQ(void);
18
19/*
20 * The Machine Vector
21 */
22
23struct sh_machine_vector mv_7751se __initmv = {
24 .mv_nr_irqs = 72,
25
26 .mv_inb = sh7751se_inb,
27 .mv_inw = sh7751se_inw,
28 .mv_inl = sh7751se_inl,
29 .mv_outb = sh7751se_outb,
30 .mv_outw = sh7751se_outw,
31 .mv_outl = sh7751se_outl,
32
33 .mv_inb_p = sh7751se_inb_p,
34 .mv_inw_p = sh7751se_inw,
35 .mv_inl_p = sh7751se_inl,
36 .mv_outb_p = sh7751se_outb_p,
37 .mv_outw_p = sh7751se_outw,
38 .mv_outl_p = sh7751se_outl,
39
40 .mv_insl = sh7751se_insl,
41 .mv_outsl = sh7751se_outsl,
42
43 .mv_init_irq = init_7751se_IRQ,
44#ifdef CONFIG_HEARTBEAT
45 .mv_heartbeat = heartbeat_7751se,
46#endif
47};
48ALIAS_MV(7751se)
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index 8b693105893c..73e826310ba8 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -15,72 +15,11 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/se7751.h> 16#include <asm/se7751.h>
17 17
18#ifdef CONFIG_SH_KGDB 18void heartbeat_7751se(void);
19#include <asm/kgdb.h> 19void init_7751se_IRQ(void);
20#endif
21
22/*
23 * Configure the Super I/O chip
24 */
25#if 0
26/* Leftover code from regular Solution Engine, for reference. */
27/* The SH7751 Solution Engine has a different SuperIO. */
28static void __init smsc_config(int index, int data)
29{
30 outb_p(index, INDEX_PORT);
31 outb_p(data, DATA_PORT);
32}
33
34static void __init init_smsc(void)
35{
36 outb_p(CONFIG_ENTER, CONFIG_PORT);
37 outb_p(CONFIG_ENTER, CONFIG_PORT);
38
39 /* FDC */
40 smsc_config(CURRENT_LDN_INDEX, LDN_FDC);
41 smsc_config(ACTIVATE_INDEX, 0x01);
42 smsc_config(IRQ_SELECT_INDEX, 6); /* IRQ6 */
43
44 /* IDE1 */
45 smsc_config(CURRENT_LDN_INDEX, LDN_IDE1);
46 smsc_config(ACTIVATE_INDEX, 0x01);
47 smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */
48
49 /* AUXIO (GPIO): to use IDE1 */
50 smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO);
51 smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */
52 smsc_config(GPIO47_INDEX, 0x00); /* nIOWOP */
53
54 /* COM1 */
55 smsc_config(CURRENT_LDN_INDEX, LDN_COM1);
56 smsc_config(ACTIVATE_INDEX, 0x01);
57 smsc_config(IO_BASE_HI_INDEX, 0x03);
58 smsc_config(IO_BASE_LO_INDEX, 0xf8);
59 smsc_config(IRQ_SELECT_INDEX, 4); /* IRQ4 */
60
61 /* COM2 */
62 smsc_config(CURRENT_LDN_INDEX, LDN_COM2);
63 smsc_config(ACTIVATE_INDEX, 0x01);
64 smsc_config(IO_BASE_HI_INDEX, 0x02);
65 smsc_config(IO_BASE_LO_INDEX, 0xf8);
66 smsc_config(IRQ_SELECT_INDEX, 3); /* IRQ3 */
67
68 /* RTC */
69 smsc_config(CURRENT_LDN_INDEX, LDN_RTC);
70 smsc_config(ACTIVATE_INDEX, 0x01);
71 smsc_config(IRQ_SELECT_INDEX, 8); /* IRQ8 */
72
73 /* XXX: PARPORT, KBD, and MOUSE will come here... */
74 outb_p(CONFIG_EXIT, CONFIG_PORT);
75}
76#endif
77
78const char *get_system_type(void)
79{
80 return "7751 SolutionEngine";
81}
82 20
83#ifdef CONFIG_SH_KGDB 21#ifdef CONFIG_SH_KGDB
22#include <asm/kgdb.h>
84static int kgdb_uart_setup(void); 23static int kgdb_uart_setup(void);
85static struct kgdb_sermap kgdb_uart_sermap = 24static struct kgdb_sermap kgdb_uart_sermap =
86{ "ttyS", 0, kgdb_uart_setup, NULL }; 25{ "ttyS", 0, kgdb_uart_setup, NULL };
@@ -89,7 +28,7 @@ static struct kgdb_sermap kgdb_uart_sermap =
89/* 28/*
90 * Initialize the board 29 * Initialize the board
91 */ 30 */
92void __init platform_setup(void) 31static void __init sh7751se_setup(char **cmdline_p)
93{ 32{
94 /* Call init_smsc() replacement to set up SuperIO. */ 33 /* Call init_smsc() replacement to set up SuperIO. */
95 /* XXX: RTC setting comes here */ 34 /* XXX: RTC setting comes here */
@@ -223,3 +162,37 @@ static int kgdb_uart_setup(void)
223 return 0; 162 return 0;
224} 163}
225#endif /* CONFIG_SH_KGDB */ 164#endif /* CONFIG_SH_KGDB */
165
166
167/*
168 * The Machine Vector
169 */
170
171struct sh_machine_vector mv_7751se __initmv = {
172 .mv_name = "7751 SolutionEngine",
173 .mv_setup = sh7751se_setup,
174 .mv_nr_irqs = 72,
175
176 .mv_inb = sh7751se_inb,
177 .mv_inw = sh7751se_inw,
178 .mv_inl = sh7751se_inl,
179 .mv_outb = sh7751se_outb,
180 .mv_outw = sh7751se_outw,
181 .mv_outl = sh7751se_outl,
182
183 .mv_inb_p = sh7751se_inb_p,
184 .mv_inw_p = sh7751se_inw,
185 .mv_inl_p = sh7751se_inl,
186 .mv_outb_p = sh7751se_outb_p,
187 .mv_outw_p = sh7751se_outw,
188 .mv_outl_p = sh7751se_outl,
189
190 .mv_insl = sh7751se_insl,
191 .mv_outsl = sh7751se_outsl,
192
193 .mv_init_irq = init_7751se_IRQ,
194#ifdef CONFIG_HEARTBEAT
195 .mv_heartbeat = heartbeat_7751se,
196#endif
197};
198ALIAS_MV(7751se)