aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/7751/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/se/7751/setup.c')
-rw-r--r--arch/sh/boards/se/7751/setup.c103
1 files changed, 38 insertions, 65 deletions
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)