aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-02-01 06:06:03 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:19 -0500
commit50373c1b7ee9cdd9b8ccaa1b58d13ad43f879908 (patch)
treed6b61fc049f9be3f357c332720fff6491df28b7d /arch/sh
parentde02797aa744c96a90f47be7bc081ce2f74b17fd (diff)
[PATCH] sh: unknown mach-type updates
Trivial cleanup of the unknown machine type for some of the recent machvec changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/unknown/Makefile2
-rw-r--r--arch/sh/boards/unknown/io.c46
-rw-r--r--arch/sh/boards/unknown/mach.c67
-rw-r--r--arch/sh/boards/unknown/setup.c12
-rw-r--r--arch/sh/kernel/setup.c13
5 files changed, 16 insertions, 124 deletions
diff --git a/arch/sh/boards/unknown/Makefile b/arch/sh/boards/unknown/Makefile
index cffc21031e7..7d18f408b0c 100644
--- a/arch/sh/boards/unknown/Makefile
+++ b/arch/sh/boards/unknown/Makefile
@@ -2,5 +2,5 @@
2# Makefile for unknown SH boards 2# Makefile for unknown SH boards
3# 3#
4 4
5obj-y := mach.o io.o setup.o 5obj-y := setup.o
6 6
diff --git a/arch/sh/boards/unknown/io.c b/arch/sh/boards/unknown/io.c
deleted file mode 100644
index 8f3f17267bd..00000000000
--- a/arch/sh/boards/unknown/io.c
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * linux/arch/sh/kernel/io_unknown.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 * I/O routine for unknown hardware.
10 */
11
12static unsigned int unknown_handler(void)
13{
14 return 0;
15}
16
17#define UNKNOWN_ALIAS(fn) \
18 void unknown_##fn(void) __attribute__ ((alias ("unknown_handler")));
19
20UNKNOWN_ALIAS(inb)
21UNKNOWN_ALIAS(inw)
22UNKNOWN_ALIAS(inl)
23UNKNOWN_ALIAS(outb)
24UNKNOWN_ALIAS(outw)
25UNKNOWN_ALIAS(outl)
26UNKNOWN_ALIAS(inb_p)
27UNKNOWN_ALIAS(inw_p)
28UNKNOWN_ALIAS(inl_p)
29UNKNOWN_ALIAS(outb_p)
30UNKNOWN_ALIAS(outw_p)
31UNKNOWN_ALIAS(outl_p)
32UNKNOWN_ALIAS(insb)
33UNKNOWN_ALIAS(insw)
34UNKNOWN_ALIAS(insl)
35UNKNOWN_ALIAS(outsb)
36UNKNOWN_ALIAS(outsw)
37UNKNOWN_ALIAS(outsl)
38UNKNOWN_ALIAS(readb)
39UNKNOWN_ALIAS(readw)
40UNKNOWN_ALIAS(readl)
41UNKNOWN_ALIAS(writeb)
42UNKNOWN_ALIAS(writew)
43UNKNOWN_ALIAS(writel)
44UNKNOWN_ALIAS(isa_port2addr)
45UNKNOWN_ALIAS(ioremap)
46UNKNOWN_ALIAS(iounmap)
diff --git a/arch/sh/boards/unknown/mach.c b/arch/sh/boards/unknown/mach.c
deleted file mode 100644
index ad0bcc60a64..00000000000
--- a/arch/sh/boards/unknown/mach.c
+++ /dev/null
@@ -1,67 +0,0 @@
1/*
2 * linux/arch/sh/kernel/mach_unknown.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 specific code for an unknown machine (internal peripherials only)
10 */
11
12#include <linux/config.h>
13#include <linux/init.h>
14
15#include <asm/machvec.h>
16#include <asm/machvec_init.h>
17
18#include <asm/io_unknown.h>
19
20#include <asm/rtc.h>
21/*
22 * The Machine Vector
23 */
24
25struct sh_machine_vector mv_unknown __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#endif
33
34 .mv_inb = unknown_inb,
35 .mv_inw = unknown_inw,
36 .mv_inl = unknown_inl,
37 .mv_outb = unknown_outb,
38 .mv_outw = unknown_outw,
39 .mv_outl = unknown_outl,
40
41 .mv_inb_p = unknown_inb_p,
42 .mv_inw_p = unknown_inw_p,
43 .mv_inl_p = unknown_inl_p,
44 .mv_outb_p = unknown_outb_p,
45 .mv_outw_p = unknown_outw_p,
46 .mv_outl_p = unknown_outl_p,
47
48 .mv_insb = unknown_insb,
49 .mv_insw = unknown_insw,
50 .mv_insl = unknown_insl,
51 .mv_outsb = unknown_outsb,
52 .mv_outsw = unknown_outsw,
53 .mv_outsl = unknown_outsl,
54
55 .mv_readb = unknown_readb,
56 .mv_readw = unknown_readw,
57 .mv_readl = unknown_readl,
58 .mv_writeb = unknown_writeb,
59 .mv_writew = unknown_writew,
60 .mv_writel = unknown_writel,
61
62 .mv_ioremap = unknown_ioremap,
63 .mv_iounmap = unknown_iounmap,
64
65 .mv_isa_port2addr = unknown_isa_port2addr,
66};
67ALIAS_MV(unknown)
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
index 7d772a6f886..02e84f03f45 100644
--- a/arch/sh/boards/unknown/setup.c
+++ b/arch/sh/boards/unknown/setup.c
@@ -7,10 +7,20 @@
7 * License. See linux/COPYING for more information. 7 * License. See linux/COPYING for more information.
8 * 8 *
9 * Setup code for an unknown machine (internal peripherials only) 9 * Setup code for an unknown machine (internal peripherials only)
10 *
11 * This is the simplest of all boards, and serves only as a quick and dirty
12 * method to start debugging a new board during bring-up until proper board
13 * setup code is written.
10 */ 14 */
11
12#include <linux/config.h> 15#include <linux/config.h>
13#include <linux/init.h> 16#include <linux/init.h>
17#include <asm/machvec.h>
18#include <asm/irq.h>
19
20struct sh_machine_vector mv_unknown __initmv = {
21 .mv_nr_irqs = NR_IRQS,
22};
23ALIAS_MV(unknown)
14 24
15const char *get_system_type(void) 25const char *get_system_type(void)
16{ 26{
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 0f1fbe72cce..a067a34e0b6 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -186,7 +186,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE],
186 186
187static int __init sh_mv_setup(char **cmdline_p) 187static int __init sh_mv_setup(char **cmdline_p)
188{ 188{
189#if defined(CONFIG_SH_UNKNOWN) 189#ifdef CONFIG_SH_UNKNOWN
190 extern struct sh_machine_vector mv_unknown; 190 extern struct sh_machine_vector mv_unknown;
191#endif 191#endif
192 struct sh_machine_vector *mv = NULL; 192 struct sh_machine_vector *mv = NULL;
@@ -196,7 +196,7 @@ static int __init sh_mv_setup(char **cmdline_p)
196 196
197 parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); 197 parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable);
198 198
199#ifdef CONFIG_SH_GENERIC 199#ifdef CONFIG_SH_UNKNOWN
200 if (mv == NULL) { 200 if (mv == NULL) {
201 mv = &mv_unknown; 201 mv = &mv_unknown;
202 if (*mv_name != '\0') { 202 if (*mv_name != '\0') {
@@ -206,9 +206,6 @@ static int __init sh_mv_setup(char **cmdline_p)
206 } 206 }
207 sh_mv = *mv; 207 sh_mv = *mv;
208#endif 208#endif
209#ifdef CONFIG_SH_UNKNOWN
210 sh_mv = mv_unknown;
211#endif
212 209
213 /* 210 /*
214 * Manually walk the vec, fill in anything that the board hasn't yet 211 * Manually walk the vec, fill in anything that the board hasn't yet
@@ -231,10 +228,8 @@ static int __init sh_mv_setup(char **cmdline_p)
231 mv_set(readb); mv_set(readw); mv_set(readl); 228 mv_set(readb); mv_set(readw); mv_set(readl);
232 mv_set(writeb); mv_set(writew); mv_set(writel); 229 mv_set(writeb); mv_set(writew); mv_set(writel);
233 230
234 mv_set(ioremap); 231 mv_set(ioport_map);
235 mv_set(iounmap); 232 mv_set(ioport_unmap);
236
237 mv_set(isa_port2addr);
238 mv_set(irq_demux); 233 mv_set(irq_demux);
239 234
240#ifdef CONFIG_SH_UNKNOWN 235#ifdef CONFIG_SH_UNKNOWN