diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:17:31 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:17:31 -0400 |
commit | 2c7834a6f15fe6c50ed4766f1bb6f9183b9e2740 (patch) | |
tree | 2dee1fc4b2cd69d8e7f07e0462c57c98261a9fcf | |
parent | bc8fb5d0471473f775378d09db712dcb8eeece75 (diff) |
sh: machvec rework.
Some more machvec overhauling and setup code cleanup. Kill off
get_system_type() and platform_setup(), we can do these both
through the machvec. While we're add it, kill off more useless
mach.c's and drop some legacy cruft from setup.c.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
31 files changed, 481 insertions, 776 deletions
diff --git a/arch/sh/boards/bigsur/setup.c b/arch/sh/boards/bigsur/setup.c index dfeede9da50f..9711c20fc9e4 100644 --- a/arch/sh/boards/bigsur/setup.c +++ b/arch/sh/boards/bigsur/setup.c | |||
@@ -41,31 +41,7 @@ | |||
41 | // Big Sur Init Routines | 41 | // Big Sur Init Routines |
42 | /*===========================================================*/ | 42 | /*===========================================================*/ |
43 | 43 | ||
44 | const char *get_system_type(void) | 44 | static void __init bigsur_setup(char **cmdline_p) |
45 | { | ||
46 | return "Big Sur"; | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * The Machine Vector | ||
51 | */ | ||
52 | extern void heartbeat_bigsur(void); | ||
53 | extern void init_bigsur_IRQ(void); | ||
54 | |||
55 | struct sh_machine_vector mv_bigsur __initmv = { | ||
56 | .mv_nr_irqs = NR_IRQS, // Defined in <asm/irq.h> | ||
57 | |||
58 | .mv_isa_port2addr = bigsur_isa_port2addr, | ||
59 | .mv_irq_demux = bigsur_irq_demux, | ||
60 | |||
61 | .mv_init_irq = init_bigsur_IRQ, | ||
62 | #ifdef CONFIG_HEARTBEAT | ||
63 | .mv_heartbeat = heartbeat_bigsur, | ||
64 | #endif | ||
65 | }; | ||
66 | ALIAS_MV(bigsur) | ||
67 | |||
68 | int __init platform_setup(void) | ||
69 | { | 45 | { |
70 | /* Mask all 2nd level IRQ's */ | 46 | /* Mask all 2nd level IRQ's */ |
71 | outb(-1,BIGSUR_IMR0); | 47 | outb(-1,BIGSUR_IMR0); |
@@ -89,7 +65,24 @@ int __init platform_setup(void) | |||
89 | outw(1, BIGSUR_ETHR+0xe); | 65 | outw(1, BIGSUR_ETHR+0xe); |
90 | /* set the IO port to BIGSUR_ETHER_IOPORT */ | 66 | /* set the IO port to BIGSUR_ETHER_IOPORT */ |
91 | outw(BIGSUR_ETHER_IOPORT<<3, BIGSUR_ETHR+0x2); | 67 | outw(BIGSUR_ETHER_IOPORT<<3, BIGSUR_ETHR+0x2); |
92 | |||
93 | return 0; | ||
94 | } | 68 | } |
95 | 69 | ||
70 | /* | ||
71 | * The Machine Vector | ||
72 | */ | ||
73 | extern void heartbeat_bigsur(void); | ||
74 | extern void init_bigsur_IRQ(void); | ||
75 | |||
76 | struct sh_machine_vector mv_bigsur __initmv = { | ||
77 | .mv_name = "Big Sur", | ||
78 | .mv_setup = bigsur_setup, | ||
79 | |||
80 | .mv_isa_port2addr = bigsur_isa_port2addr, | ||
81 | .mv_irq_demux = bigsur_irq_demux, | ||
82 | |||
83 | .mv_init_irq = init_bigsur_IRQ, | ||
84 | #ifdef CONFIG_HEARTBEAT | ||
85 | .mv_heartbeat = heartbeat_bigsur, | ||
86 | #endif | ||
87 | }; | ||
88 | ALIAS_MV(bigsur) | ||
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c index a00ac94beb05..f13017eeeb27 100644 --- a/arch/sh/boards/dreamcast/setup.c +++ b/arch/sh/boards/dreamcast/setup.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
25 | |||
26 | #include <asm/io.h> | 25 | #include <asm/io.h> |
27 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
28 | #include <asm/rtc.h> | 27 | #include <asm/rtc.h> |
@@ -37,24 +36,7 @@ extern int systemasic_irq_demux(int); | |||
37 | void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | 36 | void *dreamcast_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); |
38 | int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t); | 37 | int dreamcast_consistent_free(struct device *, size_t, void *, dma_addr_t); |
39 | 38 | ||
40 | const char *get_system_type(void) | 39 | static void __init dreamcast_setup(char **cmdline_p) |
41 | { | ||
42 | return "Sega Dreamcast"; | ||
43 | } | ||
44 | |||
45 | struct sh_machine_vector mv_dreamcast __initmv = { | ||
46 | .mv_nr_irqs = NR_IRQS, | ||
47 | |||
48 | .mv_irq_demux = systemasic_irq_demux, | ||
49 | |||
50 | #ifdef CONFIG_PCI | ||
51 | .mv_consistent_alloc = dreamcast_consistent_alloc, | ||
52 | .mv_consistent_free = dreamcast_consistent_free, | ||
53 | #endif | ||
54 | }; | ||
55 | ALIAS_MV(dreamcast) | ||
56 | |||
57 | int __init platform_setup(void) | ||
58 | { | 40 | { |
59 | int i; | 41 | int i; |
60 | 42 | ||
@@ -76,6 +58,16 @@ int __init platform_setup(void) | |||
76 | if (gapspci_init() < 0) | 58 | if (gapspci_init() < 0) |
77 | printk(KERN_WARNING "GAPSPCI was not detected.\n"); | 59 | printk(KERN_WARNING "GAPSPCI was not detected.\n"); |
78 | #endif | 60 | #endif |
79 | |||
80 | return 0; | ||
81 | } | 61 | } |
62 | |||
63 | struct sh_machine_vector mv_dreamcast __initmv = { | ||
64 | .mv_name = "Sega Dreamcast", | ||
65 | .mv_setup = dreamcast_setup, | ||
66 | .mv_irq_demux = systemasic_irq_demux, | ||
67 | |||
68 | #ifdef CONFIG_PCI | ||
69 | .mv_consistent_alloc = dreamcast_consistent_alloc, | ||
70 | .mv_consistent_free = dreamcast_consistent_free, | ||
71 | #endif | ||
72 | }; | ||
73 | ALIAS_MV(dreamcast) | ||
diff --git a/arch/sh/boards/ec3104/setup.c b/arch/sh/boards/ec3104/setup.c index 4b3ef16a0e96..902bc975a13e 100644 --- a/arch/sh/boards/ec3104/setup.c +++ b/arch/sh/boards/ec3104/setup.c | |||
@@ -21,22 +21,36 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | |||
25 | #include <asm/io.h> | 24 | #include <asm/io.h> |
26 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
27 | #include <asm/machvec.h> | 26 | #include <asm/machvec.h> |
28 | #include <asm/mach/ec3104.h> | 27 | #include <asm/mach/ec3104.h> |
29 | 28 | ||
30 | const char *get_system_type(void) | 29 | static void __init ec3104_setup(char **cmdline_p) |
31 | { | 30 | { |
32 | return "EC3104"; | 31 | char str[8]; |
32 | int i; | ||
33 | |||
34 | for (i=0; i<8; i++) | ||
35 | str[i] = ctrl_readb(EC3104_BASE + i); | ||
36 | |||
37 | for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) | ||
38 | irq_desc[i].handler = &ec3104_int; | ||
39 | |||
40 | printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", | ||
41 | str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); | ||
42 | |||
43 | /* mask all interrupts. this should have been done by the boot | ||
44 | * loader for us but we want to be sure ... */ | ||
45 | ctrl_writel(0xffffffff, EC3104_IMR); | ||
33 | } | 46 | } |
34 | 47 | ||
35 | /* | 48 | /* |
36 | * The Machine Vector | 49 | * The Machine Vector |
37 | */ | 50 | */ |
38 | |||
39 | struct sh_machine_vector mv_ec3104 __initmv = { | 51 | struct sh_machine_vector mv_ec3104 __initmv = { |
52 | .mv_name = "EC3104", | ||
53 | .mv_setup = ec3104_setup, | ||
40 | .mv_nr_irqs = 96, | 54 | .mv_nr_irqs = 96, |
41 | 55 | ||
42 | .mv_inb = ec3104_inb, | 56 | .mv_inb = ec3104_inb, |
@@ -48,31 +62,4 @@ struct sh_machine_vector mv_ec3104 __initmv = { | |||
48 | 62 | ||
49 | .mv_irq_demux = ec3104_irq_demux, | 63 | .mv_irq_demux = ec3104_irq_demux, |
50 | }; | 64 | }; |
51 | |||
52 | ALIAS_MV(ec3104) | 65 | ALIAS_MV(ec3104) |
53 | |||
54 | int __init platform_setup(void) | ||
55 | { | ||
56 | char str[8]; | ||
57 | int i; | ||
58 | |||
59 | if (0) | ||
60 | return 0; | ||
61 | |||
62 | for (i=0; i<8; i++) | ||
63 | str[i] = ctrl_readb(EC3104_BASE + i); | ||
64 | |||
65 | for (i = EC3104_IRQBASE; i < EC3104_IRQBASE + 32; i++) | ||
66 | irq_desc[i].chip = &ec3104_int; | ||
67 | |||
68 | printk("initializing EC3104 \"%.8s\" at %08x, IRQ %d, IRQ base %d\n", | ||
69 | str, EC3104_BASE, EC3104_IRQ, EC3104_IRQBASE); | ||
70 | |||
71 | |||
72 | /* mask all interrupts. this should have been done by the boot | ||
73 | * loader for us but we want to be sure ... */ | ||
74 | ctrl_writel(0xffffffff, EC3104_IMR); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | |||
diff --git a/arch/sh/boards/hp6xx/Makefile b/arch/sh/boards/hp6xx/Makefile index fdf98ffcf437..ff1b7f5b4e91 100644 --- a/arch/sh/boards/hp6xx/Makefile +++ b/arch/sh/boards/hp6xx/Makefile | |||
@@ -2,8 +2,6 @@ | |||
2 | # Makefile for the HP6xx specific parts of the kernel | 2 | # Makefile for the HP6xx specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := mach.o setup.o | 5 | obj-y := setup.o |
6 | obj-$(CONFIG_PM) += pm.o pm_wakeup.o | 6 | obj-$(CONFIG_PM) += pm.o pm_wakeup.o |
7 | obj-$(CONFIG_APM) += hp6xx_apm.o | 7 | obj-$(CONFIG_APM) += hp6xx_apm.o |
8 | |||
9 | |||
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index 629016bec809..60ab17ad6054 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c | |||
@@ -19,12 +19,7 @@ | |||
19 | #define SCPCR 0xa4000116 | 19 | #define SCPCR 0xa4000116 |
20 | #define SCPDR 0xa4000136 | 20 | #define SCPDR 0xa4000136 |
21 | 21 | ||
22 | const char *get_system_type(void) | 22 | static void __init hp6xx_setup(char **cmdline_p) |
23 | { | ||
24 | return "HP6xx"; | ||
25 | } | ||
26 | |||
27 | int __init platform_setup(void) | ||
28 | { | 23 | { |
29 | u8 v8; | 24 | u8 v8; |
30 | u16 v; | 25 | u16 v; |
@@ -64,6 +59,42 @@ int __init platform_setup(void) | |||
64 | v &= ~SCPCR_TS_MASK; | 59 | v &= ~SCPCR_TS_MASK; |
65 | v |= SCPCR_TS_ENABLE; | 60 | v |= SCPCR_TS_ENABLE; |
66 | ctrl_outw(v, SCPCR); | 61 | ctrl_outw(v, SCPCR); |
67 | |||
68 | return 0; | ||
69 | } | 62 | } |
63 | |||
64 | /* | ||
65 | * XXX: This is stupid, we should have a generic machine vector for the cchips | ||
66 | * and just wrap the platform setup code in to this, as it's the only thing | ||
67 | * that ends up being different. | ||
68 | */ | ||
69 | struct sh_machine_vector mv_hp6xx __initmv = { | ||
70 | .mv_name = "hp6xx", | ||
71 | .mv_setup = hp6xx_setup, | ||
72 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, | ||
73 | |||
74 | .mv_inb = hd64461_inb, | ||
75 | .mv_inw = hd64461_inw, | ||
76 | .mv_inl = hd64461_inl, | ||
77 | .mv_outb = hd64461_outb, | ||
78 | .mv_outw = hd64461_outw, | ||
79 | .mv_outl = hd64461_outl, | ||
80 | |||
81 | .mv_inb_p = hd64461_inb_p, | ||
82 | .mv_inw_p = hd64461_inw, | ||
83 | .mv_inl_p = hd64461_inl, | ||
84 | .mv_outb_p = hd64461_outb_p, | ||
85 | .mv_outw_p = hd64461_outw, | ||
86 | .mv_outl_p = hd64461_outl, | ||
87 | |||
88 | .mv_insb = hd64461_insb, | ||
89 | .mv_insw = hd64461_insw, | ||
90 | .mv_insl = hd64461_insl, | ||
91 | .mv_outsb = hd64461_outsb, | ||
92 | .mv_outsw = hd64461_outsw, | ||
93 | .mv_outsl = hd64461_outsl, | ||
94 | |||
95 | .mv_readw = hd64461_readw, | ||
96 | .mv_writew = hd64461_writew, | ||
97 | |||
98 | .mv_irq_demux = hd64461_irq_demux, | ||
99 | }; | ||
100 | ALIAS_MV(hp6xx) | ||
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c index 3a795cfb1eda..127b9e020e00 100644 --- a/arch/sh/boards/landisk/setup.c +++ b/arch/sh/boards/landisk/setup.c | |||
@@ -69,42 +69,6 @@ static void heartbeat_landisk(void) | |||
69 | landisk_buzzerparam >>= 1; | 69 | landisk_buzzerparam >>= 1; |
70 | } | 70 | } |
71 | 71 | ||
72 | /* | ||
73 | * The Machine Vector | ||
74 | */ | ||
75 | struct sh_machine_vector mv_landisk __initmv = { | ||
76 | .mv_nr_irqs = 72, | ||
77 | .mv_inb = landisk_inb, | ||
78 | .mv_inw = landisk_inw, | ||
79 | .mv_inl = landisk_inl, | ||
80 | .mv_outb = landisk_outb, | ||
81 | .mv_outw = landisk_outw, | ||
82 | .mv_outl = landisk_outl, | ||
83 | .mv_inb_p = landisk_inb_p, | ||
84 | .mv_inw_p = landisk_inw, | ||
85 | .mv_inl_p = landisk_inl, | ||
86 | .mv_outb_p = landisk_outb_p, | ||
87 | .mv_outw_p = landisk_outw, | ||
88 | .mv_outl_p = landisk_outl, | ||
89 | .mv_insb = landisk_insb, | ||
90 | .mv_insw = landisk_insw, | ||
91 | .mv_insl = landisk_insl, | ||
92 | .mv_outsb = landisk_outsb, | ||
93 | .mv_outsw = landisk_outsw, | ||
94 | .mv_outsl = landisk_outsl, | ||
95 | .mv_ioport_map = landisk_ioport_map, | ||
96 | .mv_init_irq = init_landisk_IRQ, | ||
97 | #ifdef CONFIG_HEARTBEAT | ||
98 | .mv_heartbeat = heartbeat_landisk, | ||
99 | #endif | ||
100 | }; | ||
101 | ALIAS_MV(landisk) | ||
102 | |||
103 | const char *get_system_type(void) | ||
104 | { | ||
105 | return "LANDISK"; | ||
106 | } | ||
107 | |||
108 | static void landisk_power_off(void) | 72 | static void landisk_power_off(void) |
109 | { | 73 | { |
110 | ctrl_outb(0x01, PA_SHUTDOWN); | 74 | ctrl_outb(0x01, PA_SHUTDOWN); |
@@ -132,16 +96,6 @@ static void check_usl5p(void) | |||
132 | } | 96 | } |
133 | } | 97 | } |
134 | 98 | ||
135 | void __init platform_setup(void) | ||
136 | { | ||
137 | landisk_buzzerparam = 0; | ||
138 | check_usl5p(); | ||
139 | |||
140 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); | ||
141 | board_time_init = landisk_time_init; | ||
142 | pm_power_off = landisk_power_off; | ||
143 | } | ||
144 | |||
145 | void *area5_io_base; | 99 | void *area5_io_base; |
146 | void *area6_io_base; | 100 | void *area6_io_base; |
147 | 101 | ||
@@ -176,4 +130,48 @@ static int __init landisk_cf_init(void) | |||
176 | return 0; | 130 | return 0; |
177 | } | 131 | } |
178 | 132 | ||
179 | __initcall(landisk_cf_init); | 133 | static void __init landisk_setup(char **cmdline_p) |
134 | { | ||
135 | device_initcall(landisk_cf_init); | ||
136 | |||
137 | landisk_buzzerparam = 0; | ||
138 | check_usl5p(); | ||
139 | |||
140 | printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n"); | ||
141 | |||
142 | board_time_init = landisk_time_init; | ||
143 | pm_power_off = landisk_power_off; | ||
144 | } | ||
145 | |||
146 | /* | ||
147 | * The Machine Vector | ||
148 | */ | ||
149 | struct sh_machine_vector mv_landisk __initmv = { | ||
150 | .mv_name = "LANDISK", | ||
151 | .mv_setup = landisk_setup, | ||
152 | .mv_nr_irqs = 72, | ||
153 | .mv_inb = landisk_inb, | ||
154 | .mv_inw = landisk_inw, | ||
155 | .mv_inl = landisk_inl, | ||
156 | .mv_outb = landisk_outb, | ||
157 | .mv_outw = landisk_outw, | ||
158 | .mv_outl = landisk_outl, | ||
159 | .mv_inb_p = landisk_inb_p, | ||
160 | .mv_inw_p = landisk_inw, | ||
161 | .mv_inl_p = landisk_inl, | ||
162 | .mv_outb_p = landisk_outb_p, | ||
163 | .mv_outw_p = landisk_outw, | ||
164 | .mv_outl_p = landisk_outl, | ||
165 | .mv_insb = landisk_insb, | ||
166 | .mv_insw = landisk_insw, | ||
167 | .mv_insl = landisk_insl, | ||
168 | .mv_outsb = landisk_outsb, | ||
169 | .mv_outsw = landisk_outsw, | ||
170 | .mv_outsl = landisk_outsl, | ||
171 | .mv_ioport_map = landisk_ioport_map, | ||
172 | .mv_init_irq = init_landisk_IRQ, | ||
173 | #ifdef CONFIG_HEARTBEAT | ||
174 | .mv_heartbeat = heartbeat_landisk, | ||
175 | #endif | ||
176 | }; | ||
177 | ALIAS_MV(landisk) | ||
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c index e9c8ff221dda..8eb5d4303972 100644 --- a/arch/sh/boards/mpc1211/setup.c +++ b/arch/sh/boards/mpc1211/setup.c | |||
@@ -10,14 +10,12 @@ | |||
10 | #include <linux/hdreg.h> | 10 | #include <linux/hdreg.h> |
11 | #include <linux/ide.h> | 11 | #include <linux/ide.h> |
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | |||
14 | #include <asm/io.h> | 13 | #include <asm/io.h> |
15 | #include <asm/machvec.h> | 14 | #include <asm/machvec.h> |
16 | #include <asm/mpc1211/mpc1211.h> | 15 | #include <asm/mpc1211/mpc1211.h> |
17 | #include <asm/mpc1211/pci.h> | 16 | #include <asm/mpc1211/pci.h> |
18 | #include <asm/mpc1211/m1543c.h> | 17 | #include <asm/mpc1211/m1543c.h> |
19 | 18 | ||
20 | |||
21 | /* ALI15X3 SMBus address offsets */ | 19 | /* ALI15X3 SMBus address offsets */ |
22 | #define SMBHSTSTS (0 + 0x3100) | 20 | #define SMBHSTSTS (0 + 0x3100) |
23 | #define SMBHSTCNT (1 + 0x3100) | 21 | #define SMBHSTCNT (1 + 0x3100) |
@@ -50,11 +48,6 @@ | |||
50 | #define ALI15X3_STS_TERM 0x80 /* terminated by abort */ | 48 | #define ALI15X3_STS_TERM 0x80 /* terminated by abort */ |
51 | #define ALI15X3_STS_ERR 0xE0 /* all the bad error bits */ | 49 | #define ALI15X3_STS_ERR 0xE0 /* all the bad error bits */ |
52 | 50 | ||
53 | const char *get_system_type(void) | ||
54 | { | ||
55 | return "Interface MPC-1211(CTP/PCI/MPC-SH02)"; | ||
56 | } | ||
57 | |||
58 | static void __init pci_write_config(unsigned long busNo, | 51 | static void __init pci_write_config(unsigned long busNo, |
59 | unsigned long devNo, | 52 | unsigned long devNo, |
60 | unsigned long fncNo, | 53 | unsigned long fncNo, |
@@ -205,7 +198,7 @@ int mpc1211_irq_demux(int irq) | |||
205 | return irq; | 198 | return irq; |
206 | } | 199 | } |
207 | 200 | ||
208 | void __init init_mpc1211_IRQ(void) | 201 | static void __init init_mpc1211_IRQ(void) |
209 | { | 202 | { |
210 | int i; | 203 | int i; |
211 | /* | 204 | /* |
@@ -289,26 +282,10 @@ static int put_smb_blk(unsigned char *p, int address, int command, int no) | |||
289 | return 0; | 282 | return 0; |
290 | } | 283 | } |
291 | 284 | ||
292 | /* | ||
293 | * The Machine Vector | ||
294 | */ | ||
295 | |||
296 | struct sh_machine_vector mv_mpc1211 __initmv = { | ||
297 | .mv_nr_irqs = 48, | ||
298 | .mv_irq_demux = mpc1211_irq_demux, | ||
299 | .mv_init_irq = init_mpc1211_IRQ, | ||
300 | |||
301 | #ifdef CONFIG_HEARTBEAT | ||
302 | .mv_heartbeat = heartbeat_mpc1211, | ||
303 | #endif | ||
304 | }; | ||
305 | |||
306 | ALIAS_MV(mpc1211) | ||
307 | |||
308 | /* arch/sh/boards/mpc1211/rtc.c */ | 285 | /* arch/sh/boards/mpc1211/rtc.c */ |
309 | void mpc1211_time_init(void); | 286 | void mpc1211_time_init(void); |
310 | 287 | ||
311 | int __init platform_setup(void) | 288 | static void __init mpc1211_setup(char **cmdline_p) |
312 | { | 289 | { |
313 | unsigned char spd_buf[128]; | 290 | unsigned char spd_buf[128]; |
314 | 291 | ||
@@ -332,3 +309,18 @@ int __init platform_setup(void) | |||
332 | return 0; | 309 | return 0; |
333 | } | 310 | } |
334 | 311 | ||
312 | /* | ||
313 | * The Machine Vector | ||
314 | */ | ||
315 | struct sh_machine_vector mv_mpc1211 __initmv = { | ||
316 | .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", | ||
317 | .mv_setup = mpc1211_setup, | ||
318 | .mv_nr_irqs = 48, | ||
319 | .mv_irq_demux = mpc1211_irq_demux, | ||
320 | .mv_init_irq = init_mpc1211_IRQ, | ||
321 | |||
322 | #ifdef CONFIG_HEARTBEAT | ||
323 | .mv_heartbeat = heartbeat_mpc1211, | ||
324 | #endif | ||
325 | }; | ||
326 | ALIAS_MV(mpc1211) | ||
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c index ba143fa4afaa..ec5be0107719 100644 --- a/arch/sh/boards/renesas/edosk7705/setup.c +++ b/arch/sh/boards/renesas/edosk7705/setup.c | |||
@@ -8,19 +8,21 @@ | |||
8 | * Modified for edosk7705 development | 8 | * Modified for edosk7705 development |
9 | * board by S. Dunn, 2003. | 9 | * board by S. Dunn, 2003. |
10 | */ | 10 | */ |
11 | |||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <asm/machvec.h> | 12 | #include <asm/machvec.h> |
14 | #include <asm/machvec_init.h> | ||
15 | #include <asm/edosk7705/io.h> | 13 | #include <asm/edosk7705/io.h> |
16 | 14 | ||
17 | static void init_edosk7705(void); | 15 | static void __init sh_edosk7705_init_irq(void) |
16 | { | ||
17 | /* This is the Ethernet interrupt */ | ||
18 | make_imask_irq(0x09); | ||
19 | } | ||
18 | 20 | ||
19 | /* | 21 | /* |
20 | * The Machine Vector | 22 | * The Machine Vector |
21 | */ | 23 | */ |
22 | |||
23 | struct sh_machine_vector mv_edosk7705 __initmv = { | 24 | struct sh_machine_vector mv_edosk7705 __initmv = { |
25 | .mv_name = "EDOSK7705", | ||
24 | .mv_nr_irqs = 80, | 26 | .mv_nr_irqs = 80, |
25 | 27 | ||
26 | .mv_inb = sh_edosk7705_inb, | 28 | .mv_inb = sh_edosk7705_inb, |
@@ -37,23 +39,6 @@ struct sh_machine_vector mv_edosk7705 __initmv = { | |||
37 | .mv_outsl = sh_edosk7705_outsl, | 39 | .mv_outsl = sh_edosk7705_outsl, |
38 | 40 | ||
39 | .mv_isa_port2addr = sh_edosk7705_isa_port2addr, | 41 | .mv_isa_port2addr = sh_edosk7705_isa_port2addr, |
40 | .mv_init_irq = init_edosk7705, | 42 | .mv_init_irq = sh_edosk7705_init_irq, |
41 | }; | 43 | }; |
42 | ALIAS_MV(edosk7705) | 44 | ALIAS_MV(edosk7705) |
43 | |||
44 | static void __init init_edosk7705(void) | ||
45 | { | ||
46 | /* This is the Ethernet interrupt */ | ||
47 | make_imask_irq(0x09); | ||
48 | } | ||
49 | |||
50 | const char *get_system_type(void) | ||
51 | { | ||
52 | return "EDOSK7705"; | ||
53 | } | ||
54 | |||
55 | void __init platform_setup(void) | ||
56 | { | ||
57 | /* Nothing .. */ | ||
58 | } | ||
59 | |||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index a2cbcc5d530f..0414c15c3458 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c | |||
@@ -1,15 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/sh/kernel/setup_hs7751rvoip.c | 2 | * Renesas Technology Sales HS7751RVoIP Support. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Kazumoto Kojima | 4 | * Copyright (C) 2000 Kazumoto Kojima |
5 | * | 5 | * |
6 | * Renesas Technology Sales HS7751RVoIP Support. | ||
7 | * | ||
8 | * Modified for HS7751RVoIP by | 6 | * Modified for HS7751RVoIP by |
9 | * Atom Create Engineering Co., Ltd. 2002. | 7 | * Atom Create Engineering Co., Ltd. 2002. |
10 | * Lineo uSolutions, Inc. 2003. | 8 | * Lineo uSolutions, Inc. 2003. |
11 | */ | 9 | */ |
12 | |||
13 | #include <linux/init.h> | 10 | #include <linux/init.h> |
14 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
15 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
@@ -23,8 +20,6 @@ | |||
23 | #include <asm/rtc.h> | 20 | #include <asm/rtc.h> |
24 | #include <asm/irq.h> | 21 | #include <asm/irq.h> |
25 | 22 | ||
26 | unsigned int debug_counter; | ||
27 | |||
28 | static void __init hs7751rvoip_init_irq(void) | 23 | static void __init hs7751rvoip_init_irq(void) |
29 | { | 24 | { |
30 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 25 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
@@ -35,56 +30,11 @@ static void __init hs7751rvoip_init_irq(void) | |||
35 | init_hs7751rvoip_IRQ(); | 30 | init_hs7751rvoip_IRQ(); |
36 | } | 31 | } |
37 | 32 | ||
38 | struct sh_machine_vector mv_hs7751rvoip __initmv = { | ||
39 | .mv_nr_irqs = 72, | ||
40 | |||
41 | .mv_inb = hs7751rvoip_inb, | ||
42 | .mv_inw = hs7751rvoip_inw, | ||
43 | .mv_inl = hs7751rvoip_inl, | ||
44 | .mv_outb = hs7751rvoip_outb, | ||
45 | .mv_outw = hs7751rvoip_outw, | ||
46 | .mv_outl = hs7751rvoip_outl, | ||
47 | |||
48 | .mv_inb_p = hs7751rvoip_inb_p, | ||
49 | .mv_inw_p = hs7751rvoip_inw, | ||
50 | .mv_inl_p = hs7751rvoip_inl, | ||
51 | .mv_outb_p = hs7751rvoip_outb_p, | ||
52 | .mv_outw_p = hs7751rvoip_outw, | ||
53 | .mv_outl_p = hs7751rvoip_outl, | ||
54 | |||
55 | .mv_insb = hs7751rvoip_insb, | ||
56 | .mv_insw = hs7751rvoip_insw, | ||
57 | .mv_insl = hs7751rvoip_insl, | ||
58 | .mv_outsb = hs7751rvoip_outsb, | ||
59 | .mv_outsw = hs7751rvoip_outsw, | ||
60 | .mv_outsl = hs7751rvoip_outsl, | ||
61 | |||
62 | .mv_init_irq = hs7751rvoip_init_irq, | ||
63 | .mv_ioport_map = hs7751rvoip_ioport_map, | ||
64 | }; | ||
65 | ALIAS_MV(hs7751rvoip) | ||
66 | |||
67 | const char *get_system_type(void) | ||
68 | { | ||
69 | return "HS7751RVoIP"; | ||
70 | } | ||
71 | |||
72 | static void hs7751rvoip_power_off(void) | 33 | static void hs7751rvoip_power_off(void) |
73 | { | 34 | { |
74 | ctrl_outw(ctrl_inw(PA_OUTPORTR) & 0xffdf, PA_OUTPORTR); | 35 | ctrl_outw(ctrl_inw(PA_OUTPORTR) & 0xffdf, PA_OUTPORTR); |
75 | } | 36 | } |
76 | 37 | ||
77 | /* | ||
78 | * Initialize the board | ||
79 | */ | ||
80 | void __init platform_setup(void) | ||
81 | { | ||
82 | printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); | ||
83 | ctrl_outb(0xf0, PA_OUTPORTR); | ||
84 | pm_power_off = hs7751rvoip_power_off; | ||
85 | debug_counter = 0; | ||
86 | } | ||
87 | |||
88 | void *area5_io8_base; | 38 | void *area5_io8_base; |
89 | void *area6_io8_base; | 39 | void *area6_io8_base; |
90 | void *area5_io16_base; | 40 | void *area5_io16_base; |
@@ -127,4 +77,46 @@ static int __init hs7751rvoip_cf_init(void) | |||
127 | return 0; | 77 | return 0; |
128 | } | 78 | } |
129 | 79 | ||
130 | __initcall(hs7751rvoip_cf_init); | 80 | /* |
81 | * Initialize the board | ||
82 | */ | ||
83 | static void __init hs7751rvoip_setup(char **cmdline_p) | ||
84 | { | ||
85 | device_initcall(hs7751rvoip_cf_init); | ||
86 | |||
87 | ctrl_outb(0xf0, PA_OUTPORTR); | ||
88 | pm_power_off = hs7751rvoip_power_off; | ||
89 | |||
90 | printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); | ||
91 | } | ||
92 | |||
93 | struct sh_machine_vector mv_hs7751rvoip __initmv = { | ||
94 | .mv_name = "HS7751RVoIP", | ||
95 | .mv_setup = hs7751rvoip_setup, | ||
96 | .mv_nr_irqs = 72, | ||
97 | |||
98 | .mv_inb = hs7751rvoip_inb, | ||
99 | .mv_inw = hs7751rvoip_inw, | ||
100 | .mv_inl = hs7751rvoip_inl, | ||
101 | .mv_outb = hs7751rvoip_outb, | ||
102 | .mv_outw = hs7751rvoip_outw, | ||
103 | .mv_outl = hs7751rvoip_outl, | ||
104 | |||
105 | .mv_inb_p = hs7751rvoip_inb_p, | ||
106 | .mv_inw_p = hs7751rvoip_inw, | ||
107 | .mv_inl_p = hs7751rvoip_inl, | ||
108 | .mv_outb_p = hs7751rvoip_outb_p, | ||
109 | .mv_outw_p = hs7751rvoip_outw, | ||
110 | .mv_outl_p = hs7751rvoip_outl, | ||
111 | |||
112 | .mv_insb = hs7751rvoip_insb, | ||
113 | .mv_insw = hs7751rvoip_insw, | ||
114 | .mv_insl = hs7751rvoip_insl, | ||
115 | .mv_outsb = hs7751rvoip_outsb, | ||
116 | .mv_outsw = hs7751rvoip_outsw, | ||
117 | .mv_outsl = hs7751rvoip_outsl, | ||
118 | |||
119 | .mv_init_irq = hs7751rvoip_init_irq, | ||
120 | .mv_ioport_map = hs7751rvoip_ioport_map, | ||
121 | }; | ||
122 | ALIAS_MV(hs7751rvoip) | ||
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index 0e4d5e1b541c..b941aa0aa34e 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -20,41 +20,6 @@ | |||
20 | extern void heartbeat_r7780rp(void); | 20 | extern void heartbeat_r7780rp(void); |
21 | extern void init_r7780rp_IRQ(void); | 21 | extern void init_r7780rp_IRQ(void); |
22 | 22 | ||
23 | /* | ||
24 | * The Machine Vector | ||
25 | */ | ||
26 | struct sh_machine_vector mv_r7780rp __initmv = { | ||
27 | .mv_nr_irqs = 109, | ||
28 | |||
29 | .mv_inb = r7780rp_inb, | ||
30 | .mv_inw = r7780rp_inw, | ||
31 | .mv_inl = r7780rp_inl, | ||
32 | .mv_outb = r7780rp_outb, | ||
33 | .mv_outw = r7780rp_outw, | ||
34 | .mv_outl = r7780rp_outl, | ||
35 | |||
36 | .mv_inb_p = r7780rp_inb_p, | ||
37 | .mv_inw_p = r7780rp_inw, | ||
38 | .mv_inl_p = r7780rp_inl, | ||
39 | .mv_outb_p = r7780rp_outb_p, | ||
40 | .mv_outw_p = r7780rp_outw, | ||
41 | .mv_outl_p = r7780rp_outl, | ||
42 | |||
43 | .mv_insb = r7780rp_insb, | ||
44 | .mv_insw = r7780rp_insw, | ||
45 | .mv_insl = r7780rp_insl, | ||
46 | .mv_outsb = r7780rp_outsb, | ||
47 | .mv_outsw = r7780rp_outsw, | ||
48 | .mv_outsl = r7780rp_outsl, | ||
49 | |||
50 | .mv_ioport_map = r7780rp_ioport_map, | ||
51 | .mv_init_irq = init_r7780rp_IRQ, | ||
52 | #ifdef CONFIG_HEARTBEAT | ||
53 | .mv_heartbeat = heartbeat_r7780rp, | ||
54 | #endif | ||
55 | }; | ||
56 | ALIAS_MV(r7780rp) | ||
57 | |||
58 | static struct resource m66596_usb_host_resources[] = { | 23 | static struct resource m66596_usb_host_resources[] = { |
59 | [0] = { | 24 | [0] = { |
60 | .start = 0xa4800000, | 25 | .start = 0xa4800000, |
@@ -88,7 +53,6 @@ static int __init r7780rp_devices_setup(void) | |||
88 | return platform_add_devices(r7780rp_devices, | 53 | return platform_add_devices(r7780rp_devices, |
89 | ARRAY_SIZE(r7780rp_devices)); | 54 | ARRAY_SIZE(r7780rp_devices)); |
90 | } | 55 | } |
91 | __initcall(r7780rp_devices_setup); | ||
92 | 56 | ||
93 | /* | 57 | /* |
94 | * Platform specific clocks | 58 | * Platform specific clocks |
@@ -117,11 +81,6 @@ static struct clk *r7780rp_clocks[] = { | |||
117 | &ivdr_clk, | 81 | &ivdr_clk, |
118 | }; | 82 | }; |
119 | 83 | ||
120 | const char *get_system_type(void) | ||
121 | { | ||
122 | return "Highlander R7780RP-1"; | ||
123 | } | ||
124 | |||
125 | static void r7780rp_power_off(void) | 84 | static void r7780rp_power_off(void) |
126 | { | 85 | { |
127 | #ifdef CONFIG_SH_R7780MP | 86 | #ifdef CONFIG_SH_R7780MP |
@@ -132,11 +91,13 @@ static void r7780rp_power_off(void) | |||
132 | /* | 91 | /* |
133 | * Initialize the board | 92 | * Initialize the board |
134 | */ | 93 | */ |
135 | void __init platform_setup(void) | 94 | static void __init r7780rp_setup(char **cmdline_p) |
136 | { | 95 | { |
137 | u16 ver = ctrl_inw(PA_VERREG); | 96 | u16 ver = ctrl_inw(PA_VERREG); |
138 | int i; | 97 | int i; |
139 | 98 | ||
99 | device_initcall(r7780rp_devices_setup); | ||
100 | |||
140 | printk(KERN_INFO "Renesas Solutions Highlander R7780RP-1 support.\n"); | 101 | printk(KERN_INFO "Renesas Solutions Highlander R7780RP-1 support.\n"); |
141 | 102 | ||
142 | printk(KERN_INFO "Board version: %d (revision %d), " | 103 | printk(KERN_INFO "Board version: %d (revision %d), " |
@@ -162,3 +123,41 @@ void __init platform_setup(void) | |||
162 | 123 | ||
163 | pm_power_off = r7780rp_power_off; | 124 | pm_power_off = r7780rp_power_off; |
164 | } | 125 | } |
126 | |||
127 | /* | ||
128 | * The Machine Vector | ||
129 | */ | ||
130 | struct sh_machine_vector mv_r7780rp __initmv = { | ||
131 | .mv_name = "Highlander R7780RP-1", | ||
132 | .mv_setup = r7780rp_setup, | ||
133 | |||
134 | .mv_nr_irqs = 109, | ||
135 | |||
136 | .mv_inb = r7780rp_inb, | ||
137 | .mv_inw = r7780rp_inw, | ||
138 | .mv_inl = r7780rp_inl, | ||
139 | .mv_outb = r7780rp_outb, | ||
140 | .mv_outw = r7780rp_outw, | ||
141 | .mv_outl = r7780rp_outl, | ||
142 | |||
143 | .mv_inb_p = r7780rp_inb_p, | ||
144 | .mv_inw_p = r7780rp_inw, | ||
145 | .mv_inl_p = r7780rp_inl, | ||
146 | .mv_outb_p = r7780rp_outb_p, | ||
147 | .mv_outw_p = r7780rp_outw, | ||
148 | .mv_outl_p = r7780rp_outl, | ||
149 | |||
150 | .mv_insb = r7780rp_insb, | ||
151 | .mv_insw = r7780rp_insw, | ||
152 | .mv_insl = r7780rp_insl, | ||
153 | .mv_outsb = r7780rp_outsb, | ||
154 | .mv_outsw = r7780rp_outsw, | ||
155 | .mv_outsl = r7780rp_outsl, | ||
156 | |||
157 | .mv_ioport_map = r7780rp_ioport_map, | ||
158 | .mv_init_irq = init_r7780rp_IRQ, | ||
159 | #ifdef CONFIG_HEARTBEAT | ||
160 | .mv_heartbeat = heartbeat_r7780rp, | ||
161 | #endif | ||
162 | }; | ||
163 | ALIAS_MV(r7780rp) | ||
diff --git a/arch/sh/boards/renesas/rts7751r2d/Makefile b/arch/sh/boards/renesas/rts7751r2d/Makefile index eee1ed6f5727..686fc9ea5989 100644 --- a/arch/sh/boards/renesas/rts7751r2d/Makefile +++ b/arch/sh/boards/renesas/rts7751r2d/Makefile | |||
@@ -2,5 +2,5 @@ | |||
2 | # Makefile for the RTS7751R2D specific parts of the kernel | 2 | # Makefile for the RTS7751R2D specific parts of the kernel |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := mach.o setup.o io.o irq.o led.o | 5 | obj-y := setup.o io.o irq.o |
6 | 6 | obj-$(CONFIG_HEARTBEAT) += led.o | |
diff --git a/arch/sh/boards/renesas/rts7751r2d/mach.c b/arch/sh/boards/renesas/rts7751r2d/mach.c deleted file mode 100644 index fe3e8735e9f8..000000000000 --- a/arch/sh/boards/renesas/rts7751r2d/mach.c +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/mach_rts7751r2d.c | ||
3 | * | ||
4 | * Minor tweak of mach_se.c file to reference rts7751r2d-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 Renesas Technology sales RTS7751R2D | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/types.h> | ||
14 | |||
15 | #include <asm/machvec.h> | ||
16 | #include <asm/rtc.h> | ||
17 | #include <asm/irq.h> | ||
18 | #include <asm/mach/rts7751r2d.h> | ||
19 | |||
20 | extern void heartbeat_rts7751r2d(void); | ||
21 | extern void init_rts7751r2d_IRQ(void); | ||
22 | extern int rts7751r2d_irq_demux(int irq); | ||
23 | |||
24 | extern void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | ||
25 | extern int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t); | ||
26 | |||
27 | /* | ||
28 | * The Machine Vector | ||
29 | */ | ||
30 | |||
31 | struct sh_machine_vector mv_rts7751r2d __initmv = { | ||
32 | .mv_nr_irqs = 72, | ||
33 | |||
34 | .mv_inb = rts7751r2d_inb, | ||
35 | .mv_inw = rts7751r2d_inw, | ||
36 | .mv_inl = rts7751r2d_inl, | ||
37 | .mv_outb = rts7751r2d_outb, | ||
38 | .mv_outw = rts7751r2d_outw, | ||
39 | .mv_outl = rts7751r2d_outl, | ||
40 | |||
41 | .mv_inb_p = rts7751r2d_inb_p, | ||
42 | .mv_inw_p = rts7751r2d_inw, | ||
43 | .mv_inl_p = rts7751r2d_inl, | ||
44 | .mv_outb_p = rts7751r2d_outb_p, | ||
45 | .mv_outw_p = rts7751r2d_outw, | ||
46 | .mv_outl_p = rts7751r2d_outl, | ||
47 | |||
48 | .mv_insb = rts7751r2d_insb, | ||
49 | .mv_insw = rts7751r2d_insw, | ||
50 | .mv_insl = rts7751r2d_insl, | ||
51 | .mv_outsb = rts7751r2d_outsb, | ||
52 | .mv_outsw = rts7751r2d_outsw, | ||
53 | .mv_outsl = rts7751r2d_outsl, | ||
54 | |||
55 | .mv_init_irq = init_rts7751r2d_IRQ, | ||
56 | #ifdef CONFIG_HEARTBEAT | ||
57 | .mv_heartbeat = heartbeat_rts7751r2d, | ||
58 | #endif | ||
59 | .mv_irq_demux = rts7751r2d_irq_demux, | ||
60 | |||
61 | #ifdef CONFIG_USB_OHCI_HCD | ||
62 | .mv_consistent_alloc = voyagergx_consistent_alloc, | ||
63 | .mv_consistent_free = voyagergx_consistent_free, | ||
64 | #endif | ||
65 | }; | ||
66 | ALIAS_MV(rts7751r2d) | ||
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index bb56c018f2ee..20597a6e6702 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -13,9 +13,17 @@ | |||
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/machvec.h> | ||
16 | #include <asm/mach/rts7751r2d.h> | 17 | #include <asm/mach/rts7751r2d.h> |
17 | #include <asm/voyagergx.h> | 18 | #include <asm/voyagergx.h> |
18 | 19 | ||
20 | extern void heartbeat_rts7751r2d(void); | ||
21 | extern void init_rts7751r2d_IRQ(void); | ||
22 | extern int rts7751r2d_irq_demux(int irq); | ||
23 | |||
24 | extern void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | ||
25 | extern int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t); | ||
26 | |||
19 | static struct plat_serial8250_port uart_platform_data[] = { | 27 | static struct plat_serial8250_port uart_platform_data[] = { |
20 | { | 28 | { |
21 | .membase = (void *)VOYAGER_UART_BASE, | 29 | .membase = (void *)VOYAGER_UART_BASE, |
@@ -70,12 +78,6 @@ static int __init rts7751r2d_devices_setup(void) | |||
70 | return platform_add_devices(rts7751r2d_devices, | 78 | return platform_add_devices(rts7751r2d_devices, |
71 | ARRAY_SIZE(rts7751r2d_devices)); | 79 | ARRAY_SIZE(rts7751r2d_devices)); |
72 | } | 80 | } |
73 | __initcall(rts7751r2d_devices_setup); | ||
74 | |||
75 | const char *get_system_type(void) | ||
76 | { | ||
77 | return "RTS7751R2D"; | ||
78 | } | ||
79 | 81 | ||
80 | static void rts7751r2d_power_off(void) | 82 | static void rts7751r2d_power_off(void) |
81 | { | 83 | { |
@@ -85,12 +87,56 @@ static void rts7751r2d_power_off(void) | |||
85 | /* | 87 | /* |
86 | * Initialize the board | 88 | * Initialize the board |
87 | */ | 89 | */ |
88 | void __init platform_setup(void) | 90 | static void __init rts7751r2d_setup(char **cmdline_p) |
89 | { | 91 | { |
90 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | 92 | device_initcall(rts7751r2d_devices_setup); |
93 | |||
91 | ctrl_outw(0x0000, PA_OUTPORT); | 94 | ctrl_outw(0x0000, PA_OUTPORT); |
92 | pm_power_off = rts7751r2d_power_off; | 95 | pm_power_off = rts7751r2d_power_off; |
93 | 96 | ||
94 | voyagergx_serial_init(); | 97 | voyagergx_serial_init(); |
95 | 98 | ||
99 | printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); | ||
96 | } | 100 | } |
101 | |||
102 | /* | ||
103 | * The Machine Vector | ||
104 | */ | ||
105 | struct sh_machine_vector mv_rts7751r2d __initmv = { | ||
106 | .mv_name = "RTS7751R2D", | ||
107 | .mv_setup = rts7751r2d_setup, | ||
108 | .mv_nr_irqs = 72, | ||
109 | |||
110 | .mv_inb = rts7751r2d_inb, | ||
111 | .mv_inw = rts7751r2d_inw, | ||
112 | .mv_inl = rts7751r2d_inl, | ||
113 | .mv_outb = rts7751r2d_outb, | ||
114 | .mv_outw = rts7751r2d_outw, | ||
115 | .mv_outl = rts7751r2d_outl, | ||
116 | |||
117 | .mv_inb_p = rts7751r2d_inb_p, | ||
118 | .mv_inw_p = rts7751r2d_inw, | ||
119 | .mv_inl_p = rts7751r2d_inl, | ||
120 | .mv_outb_p = rts7751r2d_outb_p, | ||
121 | .mv_outw_p = rts7751r2d_outw, | ||
122 | .mv_outl_p = rts7751r2d_outl, | ||
123 | |||
124 | .mv_insb = rts7751r2d_insb, | ||
125 | .mv_insw = rts7751r2d_insw, | ||
126 | .mv_insl = rts7751r2d_insl, | ||
127 | .mv_outsb = rts7751r2d_outsb, | ||
128 | .mv_outsw = rts7751r2d_outsw, | ||
129 | .mv_outsl = rts7751r2d_outsl, | ||
130 | |||
131 | .mv_init_irq = init_rts7751r2d_IRQ, | ||
132 | #ifdef CONFIG_HEARTBEAT | ||
133 | .mv_heartbeat = heartbeat_rts7751r2d, | ||
134 | #endif | ||
135 | .mv_irq_demux = rts7751r2d_irq_demux, | ||
136 | |||
137 | #ifdef CONFIG_USB_SM501 | ||
138 | .mv_consistent_alloc = voyagergx_consistent_alloc, | ||
139 | .mv_consistent_free = voyagergx_consistent_free, | ||
140 | #endif | ||
141 | }; | ||
142 | ALIAS_MV(rts7751r2d) | ||
diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c index 433c7c3f35e2..a8467bf90c25 100644 --- a/arch/sh/boards/renesas/systemh/setup.c +++ b/arch/sh/boards/renesas/systemh/setup.c | |||
@@ -20,20 +20,16 @@ | |||
20 | 20 | ||
21 | extern void make_systemh_irq(unsigned int irq); | 21 | extern void make_systemh_irq(unsigned int irq); |
22 | 22 | ||
23 | const char *get_system_type(void) | ||
24 | { | ||
25 | return "7751 SystemH"; | ||
26 | } | ||
27 | |||
28 | /* | 23 | /* |
29 | * Initialize IRQ setting | 24 | * Initialize IRQ setting |
30 | */ | 25 | */ |
31 | void __init init_7751systemh_IRQ(void) | 26 | static void __init sh7751systemh_init_irq(void) |
32 | { | 27 | { |
33 | make_systemh_irq(0xb); /* Ethernet interrupt */ | 28 | make_systemh_irq(0xb); /* Ethernet interrupt */ |
34 | } | 29 | } |
35 | 30 | ||
36 | struct sh_machine_vector mv_7751systemh __initmv = { | 31 | struct sh_machine_vector mv_7751systemh __initmv = { |
32 | .mv_name = "7751 SystemH", | ||
37 | .mv_nr_irqs = 72, | 33 | .mv_nr_irqs = 72, |
38 | 34 | ||
39 | .mv_inb = sh7751systemh_inb, | 35 | .mv_inb = sh7751systemh_inb, |
@@ -57,12 +53,6 @@ struct sh_machine_vector mv_7751systemh __initmv = { | |||
57 | .mv_outsw = sh7751systemh_outsw, | 53 | .mv_outsw = sh7751systemh_outsw, |
58 | .mv_outsl = sh7751systemh_outsl, | 54 | .mv_outsl = sh7751systemh_outsl, |
59 | 55 | ||
60 | .mv_init_irq = init_7751systemh_IRQ, | 56 | .mv_init_irq = sh7751system_init_irq, |
61 | }; | 57 | }; |
62 | ALIAS_MV(7751systemh) | 58 | ALIAS_MV(7751systemh) |
63 | |||
64 | int __init platform_setup(void) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
68 | |||
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c index bea6c572ad82..a3a37c9aad2e 100644 --- a/arch/sh/boards/saturn/setup.c +++ b/arch/sh/boards/saturn/setup.c | |||
@@ -9,22 +9,17 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | |||
13 | #include <asm/io.h> | 12 | #include <asm/io.h> |
14 | #include <asm/machvec.h> | 13 | #include <asm/machvec.h> |
15 | #include <asm/mach/io.h> | 14 | #include <asm/mach/io.h> |
16 | 15 | ||
17 | extern int saturn_irq_demux(int irq_nr); | 16 | extern int saturn_irq_demux(int irq_nr); |
18 | 17 | ||
19 | const char *get_system_type(void) | ||
20 | { | ||
21 | return "Sega Saturn"; | ||
22 | } | ||
23 | |||
24 | /* | 18 | /* |
25 | * The Machine Vector | 19 | * The Machine Vector |
26 | */ | 20 | */ |
27 | struct sh_machine_vector mv_saturn __initmv = { | 21 | struct sh_machine_vector mv_saturn __initmv = { |
22 | .mv_name = "Sega Saturn", | ||
28 | .mv_nr_irqs = 80, /* Fix this later */ | 23 | .mv_nr_irqs = 80, /* Fix this later */ |
29 | 24 | ||
30 | .mv_isa_port2addr = saturn_isa_port2addr, | 25 | .mv_isa_port2addr = saturn_isa_port2addr, |
@@ -33,11 +28,4 @@ struct sh_machine_vector mv_saturn __initmv = { | |||
33 | .mv_ioremap = saturn_ioremap, | 28 | .mv_ioremap = saturn_ioremap, |
34 | .mv_iounmap = saturn_iounmap, | 29 | .mv_iounmap = saturn_iounmap, |
35 | }; | 30 | }; |
36 | |||
37 | ALIAS_MV(saturn) | 31 | ALIAS_MV(saturn) |
38 | |||
39 | int __init platform_setup(void) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | |||
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 @@ | |||
14 | void heartbeat_7300se(void); | 14 | void heartbeat_7300se(void); |
15 | void init_7300se_IRQ(void); | 15 | void init_7300se_IRQ(void); |
16 | 16 | ||
17 | const char * | ||
18 | get_system_type(void) | ||
19 | { | ||
20 | return "SolutionEngine 7300"; | ||
21 | } | ||
22 | |||
23 | /* | 17 | /* |
24 | * The Machine Vector | 18 | * The Machine Vector |
25 | */ | 19 | */ |
26 | |||
27 | struct sh_machine_vector mv_7300se __initmv = { | 20 | struct 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 | |||
56 | ALIAS_MV(7300se) | 49 | ALIAS_MV(7300se) |
57 | /* | ||
58 | * Initialize the board | ||
59 | */ | ||
60 | void __init | ||
61 | platform_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 @@ | |||
17 | void heartbeat_73180se(void); | 17 | void heartbeat_73180se(void); |
18 | void init_73180se_IRQ(void); | 18 | void init_73180se_IRQ(void); |
19 | 19 | ||
20 | const char * | ||
21 | get_system_type(void) | ||
22 | { | ||
23 | return "SolutionEngine 73180"; | ||
24 | } | ||
25 | |||
26 | /* | 20 | /* |
27 | * The Machine Vector | 21 | * The Machine Vector |
28 | */ | 22 | */ |
29 | |||
30 | struct sh_machine_vector mv_73180se __initmv = { | 23 | struct 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 | |||
60 | ALIAS_MV(73180se) | 53 | ALIAS_MV(73180se) |
61 | /* | ||
62 | * Initialize the board | ||
63 | */ | ||
64 | void __init | ||
65 | platform_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 | ||
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) | ||
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 | ||
5 | obj-y := mach.o setup.o io.o irq.o | 5 | obj-y := setup.o io.o irq.o |
6 | 6 | ||
7 | obj-$(CONFIG_PCI) += pci.o | 7 | obj-$(CONFIG_PCI) += pci.o |
8 | obj-$(CONFIG_HEARTBEAT) += led.o | 8 | obj-$(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 | |||
16 | void heartbeat_7751se(void); | ||
17 | void init_7751se_IRQ(void); | ||
18 | |||
19 | /* | ||
20 | * The Machine Vector | ||
21 | */ | ||
22 | |||
23 | struct 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 | }; | ||
48 | ALIAS_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 | 18 | void heartbeat_7751se(void); |
19 | #include <asm/kgdb.h> | 19 | void 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. */ | ||
28 | static void __init smsc_config(int index, int data) | ||
29 | { | ||
30 | outb_p(index, INDEX_PORT); | ||
31 | outb_p(data, DATA_PORT); | ||
32 | } | ||
33 | |||
34 | static 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 | |||
78 | const 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> | ||
84 | static int kgdb_uart_setup(void); | 23 | static int kgdb_uart_setup(void); |
85 | static struct kgdb_sermap kgdb_uart_sermap = | 24 | static 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 | */ |
92 | void __init platform_setup(void) | 31 | static 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 | |||
171 | struct 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 | }; | ||
198 | ALIAS_MV(7751se) | ||
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index 7d31d6aed8a5..6c310587ddfe 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c | |||
@@ -13,12 +13,7 @@ | |||
13 | #include <asm/sh03/sh03.h> | 13 | #include <asm/sh03/sh03.h> |
14 | #include <asm/addrspace.h> | 14 | #include <asm/addrspace.h> |
15 | 15 | ||
16 | const char *get_system_type(void) | 16 | static void __init init_sh03_IRQ(void) |
17 | { | ||
18 | return "Interface (CTP/PCI-SH03)"; | ||
19 | } | ||
20 | |||
21 | static void init_sh03_IRQ(void) | ||
22 | { | 17 | { |
23 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 18 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
24 | 19 | ||
@@ -41,7 +36,17 @@ static void __iomem *sh03_ioport_map(unsigned long port, unsigned int size) | |||
41 | return (void __iomem *)(port + PCI_IO_BASE); | 36 | return (void __iomem *)(port + PCI_IO_BASE); |
42 | } | 37 | } |
43 | 38 | ||
39 | /* arch/sh/boards/sh03/rtc.c */ | ||
40 | void sh03_time_init(void); | ||
41 | |||
42 | static void __init sh03_setup(char **cmdline_p) | ||
43 | { | ||
44 | board_time_init = sh03_time_init; | ||
45 | } | ||
46 | |||
44 | struct sh_machine_vector mv_sh03 __initmv = { | 47 | struct sh_machine_vector mv_sh03 __initmv = { |
48 | .mv_name = "Interface (CTP/PCI-SH03)", | ||
49 | .mv_setup = sh03_setup, | ||
45 | .mv_nr_irqs = 48, | 50 | .mv_nr_irqs = 48, |
46 | .mv_ioport_map = sh03_ioport_map, | 51 | .mv_ioport_map = sh03_ioport_map, |
47 | .mv_init_irq = init_sh03_IRQ, | 52 | .mv_init_irq = init_sh03_IRQ, |
@@ -51,12 +56,3 @@ struct sh_machine_vector mv_sh03 __initmv = { | |||
51 | #endif | 56 | #endif |
52 | }; | 57 | }; |
53 | ALIAS_MV(sh03) | 58 | ALIAS_MV(sh03) |
54 | |||
55 | /* arch/sh/boards/sh03/rtc.c */ | ||
56 | void sh03_time_init(void); | ||
57 | |||
58 | int __init platform_setup(void) | ||
59 | { | ||
60 | board_time_init = sh03_time_init; | ||
61 | return 0; | ||
62 | } | ||
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c index a950ec4d765d..2f0c19706cf9 100644 --- a/arch/sh/boards/shmin/setup.c +++ b/arch/sh/boards/shmin/setup.c | |||
@@ -14,21 +14,12 @@ | |||
14 | 14 | ||
15 | #define PFC_PHCR 0xa400010e | 15 | #define PFC_PHCR 0xa400010e |
16 | 16 | ||
17 | const char *get_system_type(void) | ||
18 | { | ||
19 | return "SHMIN"; | ||
20 | } | ||
21 | |||
22 | static void __init init_shmin_irq(void) | 17 | static void __init init_shmin_irq(void) |
23 | { | 18 | { |
24 | ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ | 19 | ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ |
25 | ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. | 20 | ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active. |
26 | } | 21 | } |
27 | 22 | ||
28 | void __init platform_setup(void) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) | 23 | static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) |
33 | { | 24 | { |
34 | static int dummy; | 25 | static int dummy; |
@@ -43,6 +34,7 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) | |||
43 | } | 34 | } |
44 | 35 | ||
45 | struct sh_machine_vector mv_shmin __initmv = { | 36 | struct sh_machine_vector mv_shmin __initmv = { |
37 | .mv_name = "SHMIN", | ||
46 | .mv_init_irq = init_shmin_irq, | 38 | .mv_init_irq = init_shmin_irq, |
47 | .mv_ioport_map = shmin_ioport_map, | 39 | .mv_ioport_map = shmin_ioport_map, |
48 | }; | 40 | }; |
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index 66ce32f8b13c..f5e98c56b530 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c | |||
@@ -81,16 +81,20 @@ static void __init init_snapgear_IRQ(void) | |||
81 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | 81 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); |
82 | } | 82 | } |
83 | 83 | ||
84 | const char *get_system_type(void) | 84 | /* |
85 | * Initialize the board | ||
86 | */ | ||
87 | static void __init snapgear_setup(char **cmdline_p) | ||
85 | { | 88 | { |
86 | return "SnapGear SecureEdge5410"; | 89 | board_time_init = secureedge5410_rtc_init; |
87 | } | 90 | } |
88 | 91 | ||
89 | /* | 92 | /* |
90 | * The Machine Vector | 93 | * The Machine Vector |
91 | */ | 94 | */ |
92 | |||
93 | struct sh_machine_vector mv_snapgear __initmv = { | 95 | struct sh_machine_vector mv_snapgear __initmv = { |
96 | .mv_name = "SnapGear SecureEdge5410", | ||
97 | .mv_setup = snapgear_setup, | ||
94 | .mv_nr_irqs = 72, | 98 | .mv_nr_irqs = 72, |
95 | 99 | ||
96 | .mv_inb = snapgear_inb, | 100 | .mv_inb = snapgear_inb, |
@@ -110,15 +114,3 @@ struct sh_machine_vector mv_snapgear __initmv = { | |||
110 | .mv_init_irq = init_snapgear_IRQ, | 114 | .mv_init_irq = init_snapgear_IRQ, |
111 | }; | 115 | }; |
112 | ALIAS_MV(snapgear) | 116 | ALIAS_MV(snapgear) |
113 | |||
114 | /* | ||
115 | * Initialize the board | ||
116 | */ | ||
117 | |||
118 | int __init platform_setup(void) | ||
119 | { | ||
120 | board_time_init = secureedge5410_rtc_init; | ||
121 | |||
122 | return 0; | ||
123 | } | ||
124 | |||
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c index 61b402a3f5d7..031c814e6e76 100644 --- a/arch/sh/boards/superh/microdev/setup.c +++ b/arch/sh/boards/superh/microdev/setup.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * May be copied or modified under the terms of the GNU General Public | 10 | * May be copied or modified under the terms of the GNU General Public |
11 | * License. See linux/COPYING for more information. | 11 | * License. See linux/COPYING for more information. |
12 | */ | 12 | */ |
13 | |||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
16 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
@@ -21,41 +20,6 @@ | |||
21 | 20 | ||
22 | extern void microdev_heartbeat(void); | 21 | extern void microdev_heartbeat(void); |
23 | 22 | ||
24 | /* | ||
25 | * The Machine Vector | ||
26 | */ | ||
27 | |||
28 | struct sh_machine_vector mv_sh4202_microdev __initmv = { | ||
29 | .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ | ||
30 | |||
31 | .mv_inb = microdev_inb, | ||
32 | .mv_inw = microdev_inw, | ||
33 | .mv_inl = microdev_inl, | ||
34 | .mv_outb = microdev_outb, | ||
35 | .mv_outw = microdev_outw, | ||
36 | .mv_outl = microdev_outl, | ||
37 | |||
38 | .mv_inb_p = microdev_inb_p, | ||
39 | .mv_inw_p = microdev_inw_p, | ||
40 | .mv_inl_p = microdev_inl_p, | ||
41 | .mv_outb_p = microdev_outb_p, | ||
42 | .mv_outw_p = microdev_outw_p, | ||
43 | .mv_outl_p = microdev_outl_p, | ||
44 | |||
45 | .mv_insb = microdev_insb, | ||
46 | .mv_insw = microdev_insw, | ||
47 | .mv_insl = microdev_insl, | ||
48 | .mv_outsb = microdev_outsb, | ||
49 | .mv_outsw = microdev_outsw, | ||
50 | .mv_outsl = microdev_outsl, | ||
51 | |||
52 | .mv_init_irq = init_microdev_irq, | ||
53 | |||
54 | #ifdef CONFIG_HEARTBEAT | ||
55 | .mv_heartbeat = microdev_heartbeat, | ||
56 | #endif | ||
57 | }; | ||
58 | ALIAS_MV(sh4202_microdev) | ||
59 | 23 | ||
60 | /****************************************************************************/ | 24 | /****************************************************************************/ |
61 | 25 | ||
@@ -113,11 +77,6 @@ ALIAS_MV(sh4202_microdev) | |||
113 | /* assume a Keyboard Controller is present */ | 77 | /* assume a Keyboard Controller is present */ |
114 | int microdev_kbd_controller_present = 1; | 78 | int microdev_kbd_controller_present = 1; |
115 | 79 | ||
116 | const char *get_system_type(void) | ||
117 | { | ||
118 | return "SH4-202 MicroDev"; | ||
119 | } | ||
120 | |||
121 | static struct resource smc91x_resources[] = { | 80 | static struct resource smc91x_resources[] = { |
122 | [0] = { | 81 | [0] = { |
123 | .start = 0x300, | 82 | .start = 0x300, |
@@ -291,25 +250,9 @@ static int __init microdev_devices_setup(void) | |||
291 | return platform_add_devices(microdev_devices, ARRAY_SIZE(microdev_devices)); | 250 | return platform_add_devices(microdev_devices, ARRAY_SIZE(microdev_devices)); |
292 | } | 251 | } |
293 | 252 | ||
294 | __initcall(microdev_devices_setup); | 253 | /* |
295 | 254 | * Setup for the SMSC FDC37C93xAPM | |
296 | void __init platform_setup(void) | 255 | */ |
297 | { | ||
298 | int * const fpgaRevisionRegister = (int*)(MICRODEV_FPGA_GP_BASE + 0x8ul); | ||
299 | const int fpgaRevision = *fpgaRevisionRegister; | ||
300 | int * const CacheControlRegister = (int*)CCR; | ||
301 | |||
302 | printk("SuperH %s board (FPGA rev: 0x%0x, CCR: 0x%0x)\n", | ||
303 | get_system_type(), fpgaRevision, *CacheControlRegister); | ||
304 | } | ||
305 | |||
306 | |||
307 | /****************************************************************************/ | ||
308 | |||
309 | |||
310 | /* | ||
311 | * Setup for the SMSC FDC37C93xAPM | ||
312 | */ | ||
313 | static int __init smsc_superio_setup(void) | 256 | static int __init smsc_superio_setup(void) |
314 | { | 257 | { |
315 | 258 | ||
@@ -412,8 +355,52 @@ static int __init smsc_superio_setup(void) | |||
412 | return 0; | 355 | return 0; |
413 | } | 356 | } |
414 | 357 | ||
358 | static void __init microdev_setup(char **cmdline_p) | ||
359 | { | ||
360 | int * const fpgaRevisionRegister = (int*)(MICRODEV_FPGA_GP_BASE + 0x8ul); | ||
361 | const int fpgaRevision = *fpgaRevisionRegister; | ||
362 | int * const CacheControlRegister = (int*)CCR; | ||
363 | |||
364 | device_initcall(microdev_devices_setup); | ||
365 | device_initcall(smsc_superio_setup); | ||
415 | 366 | ||
416 | /* This is grotty, but, because kernel is always referenced on the link line | 367 | printk("SuperH %s board (FPGA rev: 0x%0x, CCR: 0x%0x)\n", |
417 | * before any devices, this is safe. | 368 | get_system_type(), fpgaRevision, *CacheControlRegister); |
369 | } | ||
370 | |||
371 | /* | ||
372 | * The Machine Vector | ||
418 | */ | 373 | */ |
419 | __initcall(smsc_superio_setup); | 374 | struct sh_machine_vector mv_sh4202_microdev __initmv = { |
375 | .mv_name = "SH4-202 MicroDev", | ||
376 | .mv_setup = microdev_setup, | ||
377 | .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ | ||
378 | |||
379 | .mv_inb = microdev_inb, | ||
380 | .mv_inw = microdev_inw, | ||
381 | .mv_inl = microdev_inl, | ||
382 | .mv_outb = microdev_outb, | ||
383 | .mv_outw = microdev_outw, | ||
384 | .mv_outl = microdev_outl, | ||
385 | |||
386 | .mv_inb_p = microdev_inb_p, | ||
387 | .mv_inw_p = microdev_inw_p, | ||
388 | .mv_inl_p = microdev_inl_p, | ||
389 | .mv_outb_p = microdev_outb_p, | ||
390 | .mv_outw_p = microdev_outw_p, | ||
391 | .mv_outl_p = microdev_outl_p, | ||
392 | |||
393 | .mv_insb = microdev_insb, | ||
394 | .mv_insw = microdev_insw, | ||
395 | .mv_insl = microdev_insl, | ||
396 | .mv_outsb = microdev_outsb, | ||
397 | .mv_outsw = microdev_outsw, | ||
398 | .mv_outsl = microdev_outsl, | ||
399 | |||
400 | .mv_init_irq = init_microdev_irq, | ||
401 | |||
402 | #ifdef CONFIG_HEARTBEAT | ||
403 | .mv_heartbeat = microdev_heartbeat, | ||
404 | #endif | ||
405 | }; | ||
406 | ALIAS_MV(sh4202_microdev) | ||
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c index c8b431c1d0fd..52b66d8b8d2a 100644 --- a/arch/sh/boards/titan/setup.c +++ b/arch/sh/boards/titan/setup.c | |||
@@ -20,19 +20,8 @@ static void __init init_titan_irq(void) | |||
20 | make_ipr_irq( TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); /* PCIRQ3 */ | 20 | make_ipr_irq( TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); /* PCIRQ3 */ |
21 | } | 21 | } |
22 | 22 | ||
23 | const char *get_system_type(void) | ||
24 | { | ||
25 | return "Titan"; | ||
26 | } | ||
27 | |||
28 | int __init platform_setup(void) | ||
29 | { | ||
30 | printk("%s Platform Setup\n", get_system_type()); | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | struct sh_machine_vector mv_titan __initmv = { | 23 | struct sh_machine_vector mv_titan __initmv = { |
35 | .mv_nr_irqs = NR_IRQS, | 24 | .mv_name = "Titan", |
36 | 25 | ||
37 | .mv_inb = titan_inb, | 26 | .mv_inb = titan_inb, |
38 | .mv_inw = titan_inw, | 27 | .mv_inw = titan_inw, |
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c index c5e4ed10876b..1c941370a2e3 100644 --- a/arch/sh/boards/unknown/setup.c +++ b/arch/sh/boards/unknown/setup.c | |||
@@ -14,19 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
17 | #include <asm/irq.h> | ||
18 | 17 | ||
19 | struct sh_machine_vector mv_unknown __initmv = { | 18 | struct sh_machine_vector mv_unknown __initmv = { |
20 | .mv_nr_irqs = NR_IRQS, | 19 | .mv_name = "Unknown", |
21 | }; | 20 | }; |
22 | ALIAS_MV(unknown) | 21 | ALIAS_MV(unknown) |
23 | |||
24 | const char *get_system_type(void) | ||
25 | { | ||
26 | return "Unknown"; | ||
27 | } | ||
28 | |||
29 | void __init platform_setup(void) | ||
30 | { | ||
31 | } | ||
32 | |||
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 86ef17fe48b5..de8df969d6af 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -43,27 +43,14 @@ extern void * __rd_start, * __rd_end; | |||
43 | * The bigger value means no problem. | 43 | * The bigger value means no problem. |
44 | */ | 44 | */ |
45 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; | 45 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; |
46 | #ifdef CONFIG_VT | ||
46 | struct screen_info screen_info; | 47 | struct screen_info screen_info; |
48 | #endif | ||
47 | 49 | ||
48 | #if defined(CONFIG_SH_UNKNOWN) | 50 | #if defined(CONFIG_SH_UNKNOWN) |
49 | struct sh_machine_vector sh_mv; | 51 | struct sh_machine_vector sh_mv; |
50 | #endif | 52 | #endif |
51 | 53 | ||
52 | /* We need this to satisfy some external references. */ | ||
53 | struct screen_info screen_info = { | ||
54 | 0, 25, /* orig-x, orig-y */ | ||
55 | 0, /* unused */ | ||
56 | 0, /* orig-video-page */ | ||
57 | 0, /* orig-video-mode */ | ||
58 | 80, /* orig-video-cols */ | ||
59 | 0,0,0, /* ega_ax, ega_bx, ega_cx */ | ||
60 | 25, /* orig-video-lines */ | ||
61 | 0, /* orig-video-isVGA */ | ||
62 | 16 /* orig-video-points */ | ||
63 | }; | ||
64 | |||
65 | extern void platform_setup(void); | ||
66 | extern char *get_system_type(void); | ||
67 | extern int root_mountflags; | 54 | extern int root_mountflags; |
68 | 55 | ||
69 | #define MV_NAME_SIZE 32 | 56 | #define MV_NAME_SIZE 32 |
@@ -90,29 +77,8 @@ static struct sh_machine_vector* __init get_mv_byname(const char* name); | |||
90 | 77 | ||
91 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; | 78 | static char command_line[COMMAND_LINE_SIZE] = { 0, }; |
92 | 79 | ||
93 | struct resource standard_io_resources[] = { | 80 | static struct resource code_resource = { .name = "Kernel code", }; |
94 | { "dma1", 0x00, 0x1f }, | 81 | static struct resource data_resource = { .name = "Kernel data", }; |
95 | { "pic1", 0x20, 0x3f }, | ||
96 | { "timer", 0x40, 0x5f }, | ||
97 | { "keyboard", 0x60, 0x6f }, | ||
98 | { "dma page reg", 0x80, 0x8f }, | ||
99 | { "pic2", 0xa0, 0xbf }, | ||
100 | { "dma2", 0xc0, 0xdf }, | ||
101 | { "fpu", 0xf0, 0xff } | ||
102 | }; | ||
103 | |||
104 | #define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) | ||
105 | |||
106 | /* System RAM - interrupted by the 640kB-1M hole */ | ||
107 | #define code_resource (ram_resources[3]) | ||
108 | #define data_resource (ram_resources[4]) | ||
109 | static struct resource ram_resources[] = { | ||
110 | { "System RAM", 0x000000, 0x09ffff, IORESOURCE_BUSY }, | ||
111 | { "System RAM", 0x100000, 0x100000, IORESOURCE_BUSY }, | ||
112 | { "Video RAM area", 0x0a0000, 0x0bffff }, | ||
113 | { "Kernel code", 0x100000, 0 }, | ||
114 | { "Kernel data", 0, 0 } | ||
115 | }; | ||
116 | 82 | ||
117 | unsigned long memory_start, memory_end; | 83 | unsigned long memory_start, memory_end; |
118 | 84 | ||
@@ -255,6 +221,9 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
255 | __set_io_port_base(mv_io_base); | 221 | __set_io_port_base(mv_io_base); |
256 | #endif | 222 | #endif |
257 | 223 | ||
224 | if (!sh_mv.mv_nr_irqs) | ||
225 | sh_mv.mv_nr_irqs = NR_IRQS; | ||
226 | |||
258 | return 0; | 227 | return 0; |
259 | } | 228 | } |
260 | 229 | ||
@@ -263,7 +232,6 @@ void __init setup_arch(char **cmdline_p) | |||
263 | unsigned long bootmap_size; | 232 | unsigned long bootmap_size; |
264 | unsigned long start_pfn, max_pfn, max_low_pfn; | 233 | unsigned long start_pfn, max_pfn, max_low_pfn; |
265 | 234 | ||
266 | |||
267 | #ifdef CONFIG_CMDLINE_BOOL | 235 | #ifdef CONFIG_CMDLINE_BOOL |
268 | strcpy(COMMAND_LINE, CONFIG_CMDLINE); | 236 | strcpy(COMMAND_LINE, CONFIG_CMDLINE); |
269 | #endif | 237 | #endif |
@@ -382,14 +350,14 @@ void __init setup_arch(char **cmdline_p) | |||
382 | #endif | 350 | #endif |
383 | 351 | ||
384 | /* Perform the machine specific initialisation */ | 352 | /* Perform the machine specific initialisation */ |
385 | platform_setup(); | 353 | if (likely(sh_mv.mv_setup)) |
354 | sh_mv.mv_setup(cmdline_p); | ||
386 | 355 | ||
387 | paging_init(); | 356 | paging_init(); |
388 | } | 357 | } |
389 | 358 | ||
390 | struct sh_machine_vector* __init get_mv_byname(const char* name) | 359 | struct sh_machine_vector* __init get_mv_byname(const char* name) |
391 | { | 360 | { |
392 | extern int strcasecmp(const char *, const char *); | ||
393 | extern long __machvec_start, __machvec_end; | 361 | extern long __machvec_start, __machvec_end; |
394 | struct sh_machine_vector *all_vecs = | 362 | struct sh_machine_vector *all_vecs = |
395 | (struct sh_machine_vector *)&__machvec_start; | 363 | (struct sh_machine_vector *)&__machvec_start; |
@@ -467,7 +435,8 @@ static void show_cpuflags(struct seq_file *m) | |||
467 | seq_printf(m, "\n"); | 435 | seq_printf(m, "\n"); |
468 | } | 436 | } |
469 | 437 | ||
470 | static void show_cacheinfo(struct seq_file *m, const char *type, struct cache_info info) | 438 | static void show_cacheinfo(struct seq_file *m, const char *type, |
439 | struct cache_info info) | ||
471 | { | 440 | { |
472 | unsigned int cache_size; | 441 | unsigned int cache_size; |
473 | 442 | ||
@@ -624,4 +593,3 @@ static int __init kgdb_parse_options(char *options) | |||
624 | } | 593 | } |
625 | __setup("kgdb=", kgdb_parse_options); | 594 | __setup("kgdb=", kgdb_parse_options); |
626 | #endif /* CONFIG_SH_KGDB */ | 595 | #endif /* CONFIG_SH_KGDB */ |
627 | |||
diff --git a/include/asm-sh/machvec.h b/include/asm-sh/machvec.h index 550501fa4fed..70389b72ffef 100644 --- a/include/asm-sh/machvec.h +++ b/include/asm-sh/machvec.h | |||
@@ -8,17 +8,18 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef _ASM_SH_MACHVEC_H | 10 | #ifndef _ASM_SH_MACHVEC_H |
11 | #define _ASM_SH_MACHVEC_H 1 | 11 | #define _ASM_SH_MACHVEC_H |
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | |||
16 | #include <asm/machtypes.h> | 15 | #include <asm/machtypes.h> |
17 | #include <asm/machvec_init.h> | 16 | #include <asm/machvec_init.h> |
18 | 17 | ||
19 | struct device; | 18 | struct device; |
20 | 19 | ||
21 | struct sh_machine_vector { | 20 | struct sh_machine_vector { |
21 | void (*mv_setup)(char **cmdline_p); | ||
22 | const char *mv_name; | ||
22 | int mv_nr_irqs; | 23 | int mv_nr_irqs; |
23 | 24 | ||
24 | u8 (*mv_inb)(unsigned long); | 25 | u8 (*mv_inb)(unsigned long); |
@@ -65,4 +66,6 @@ struct sh_machine_vector { | |||
65 | 66 | ||
66 | extern struct sh_machine_vector sh_mv; | 67 | extern struct sh_machine_vector sh_mv; |
67 | 68 | ||
69 | #define get_system_type() sh_mv.mv_name | ||
70 | |||
68 | #endif /* _ASM_SH_MACHVEC_H */ | 71 | #endif /* _ASM_SH_MACHVEC_H */ |