diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-15 02:19:34 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:39 -0400 |
commit | 82f81f4784479df17a80caff4a7156da0a2f7dea (patch) | |
tree | 3679bd23f2c9daa24f9cf3e170a33f851ed45029 | |
parent | 25f8151bdcdd62c6b879e3669a562c0d329eee4a (diff) |
sh: Kill off machvec aliases.
We now throw all of the machvecs in to .machvec.init and either
select one on the command line, or copy out the first (and
usually only) one to sh_mv. The rest are freed as usual.
This gets rid of all of the silly sh_mv aliasing and makes the
selection explicit rather than link-order dependent.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
32 files changed, 69 insertions, 91 deletions
diff --git a/arch/sh/boards/dreamcast/setup.c b/arch/sh/boards/dreamcast/setup.c index f13017eeeb..8799df6e86 100644 --- a/arch/sh/boards/dreamcast/setup.c +++ b/arch/sh/boards/dreamcast/setup.c | |||
@@ -60,7 +60,7 @@ static void __init dreamcast_setup(char **cmdline_p) | |||
60 | #endif | 60 | #endif |
61 | } | 61 | } |
62 | 62 | ||
63 | struct sh_machine_vector mv_dreamcast __initmv = { | 63 | static struct sh_machine_vector mv_dreamcast __initmv = { |
64 | .mv_name = "Sega Dreamcast", | 64 | .mv_name = "Sega Dreamcast", |
65 | .mv_setup = dreamcast_setup, | 65 | .mv_setup = dreamcast_setup, |
66 | .mv_irq_demux = systemasic_irq_demux, | 66 | .mv_irq_demux = systemasic_irq_demux, |
@@ -70,4 +70,3 @@ struct sh_machine_vector mv_dreamcast __initmv = { | |||
70 | .mv_consistent_free = dreamcast_consistent_free, | 70 | .mv_consistent_free = dreamcast_consistent_free, |
71 | #endif | 71 | #endif |
72 | }; | 72 | }; |
73 | ALIAS_MV(dreamcast) | ||
diff --git a/arch/sh/boards/hp6xx/mach.c b/arch/sh/boards/hp6xx/mach.c index 08dbba910f..35b8959604 100644 --- a/arch/sh/boards/hp6xx/mach.c +++ b/arch/sh/boards/hp6xx/mach.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | 15 | ||
16 | struct sh_machine_vector mv_hp6xx __initmv = { | 16 | static struct sh_machine_vector mv_hp6xx __initmv = { |
17 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, | 17 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, |
18 | 18 | ||
19 | .mv_inb = hd64461_inb, | 19 | .mv_inb = hd64461_inb, |
@@ -42,5 +42,3 @@ struct sh_machine_vector mv_hp6xx __initmv = { | |||
42 | 42 | ||
43 | .mv_irq_demux = hd64461_irq_demux, | 43 | .mv_irq_demux = hd64461_irq_demux, |
44 | }; | 44 | }; |
45 | |||
46 | ALIAS_MV(hp6xx) | ||
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index 6aeee85c97..7ae708930b 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c | |||
@@ -98,10 +98,9 @@ static void __init hp6xx_setup(char **cmdline_p) | |||
98 | } | 98 | } |
99 | device_initcall(hp6xx_devices_setup); | 99 | device_initcall(hp6xx_devices_setup); |
100 | 100 | ||
101 | struct sh_machine_vector mv_hp6xx __initmv = { | 101 | static struct sh_machine_vector mv_hp6xx __initmv = { |
102 | .mv_name = "hp6xx", | 102 | .mv_name = "hp6xx", |
103 | .mv_setup = hp6xx_setup, | 103 | .mv_setup = hp6xx_setup, |
104 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, | 104 | .mv_nr_irqs = HD64461_IRQBASE + HD64461_IRQ_NUM, |
105 | .mv_irq_demux = hd64461_irq_demux, | 105 | .mv_irq_demux = hd64461_irq_demux, |
106 | }; | 106 | }; |
107 | ALIAS_MV(hp6xx) | ||
diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c index f953c74277..eda71763ec 100644 --- a/arch/sh/boards/landisk/setup.c +++ b/arch/sh/boards/landisk/setup.c | |||
@@ -97,10 +97,9 @@ static void __init landisk_setup(char **cmdline_p) | |||
97 | /* | 97 | /* |
98 | * The Machine Vector | 98 | * The Machine Vector |
99 | */ | 99 | */ |
100 | struct sh_machine_vector mv_landisk __initmv = { | 100 | static struct sh_machine_vector mv_landisk __initmv = { |
101 | .mv_name = "LANDISK", | 101 | .mv_name = "LANDISK", |
102 | .mv_nr_irqs = 72, | 102 | .mv_nr_irqs = 72, |
103 | .mv_setup = landisk_setup, | 103 | .mv_setup = landisk_setup, |
104 | .mv_init_irq = init_landisk_IRQ, | 104 | .mv_init_irq = init_landisk_IRQ, |
105 | }; | 105 | }; |
106 | ALIAS_MV(landisk) | ||
diff --git a/arch/sh/boards/lboxre2/setup.c b/arch/sh/boards/lboxre2/setup.c index 4e20f7c63b..9c830fdc41 100644 --- a/arch/sh/boards/lboxre2/setup.c +++ b/arch/sh/boards/lboxre2/setup.c | |||
@@ -77,9 +77,8 @@ device_initcall(lboxre2_devices_setup); | |||
77 | /* | 77 | /* |
78 | * The Machine Vector | 78 | * The Machine Vector |
79 | */ | 79 | */ |
80 | struct sh_machine_vector mv_lboxre2 __initmv = { | 80 | static struct sh_machine_vector mv_lboxre2 __initmv = { |
81 | .mv_name = "L-BOX RE2", | 81 | .mv_name = "L-BOX RE2", |
82 | .mv_nr_irqs = 72, | 82 | .mv_nr_irqs = 72, |
83 | .mv_init_irq = init_lboxre2_IRQ, | 83 | .mv_init_irq = init_lboxre2_IRQ, |
84 | }; | 84 | }; |
85 | ALIAS_MV(lboxre2) | ||
diff --git a/arch/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c index 1a0604b23c..8ce03e00b0 100644 --- a/arch/sh/boards/mpc1211/setup.c +++ b/arch/sh/boards/mpc1211/setup.c | |||
@@ -338,11 +338,10 @@ static void __init mpc1211_setup(char **cmdline_p) | |||
338 | /* | 338 | /* |
339 | * The Machine Vector | 339 | * The Machine Vector |
340 | */ | 340 | */ |
341 | struct sh_machine_vector mv_mpc1211 __initmv = { | 341 | static struct sh_machine_vector mv_mpc1211 __initmv = { |
342 | .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", | 342 | .mv_name = "Interface MPC-1211(CTP/PCI/MPC-SH02)", |
343 | .mv_setup = mpc1211_setup, | 343 | .mv_setup = mpc1211_setup, |
344 | .mv_nr_irqs = 48, | 344 | .mv_nr_irqs = 48, |
345 | .mv_irq_demux = mpc1211_irq_demux, | 345 | .mv_irq_demux = mpc1211_irq_demux, |
346 | .mv_init_irq = init_mpc1211_IRQ, | 346 | .mv_init_irq = init_mpc1211_IRQ, |
347 | }; | 347 | }; |
348 | ALIAS_MV(mpc1211) | ||
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c index ec5be01077..f076c45308 100644 --- a/arch/sh/boards/renesas/edosk7705/setup.c +++ b/arch/sh/boards/renesas/edosk7705/setup.c | |||
@@ -21,7 +21,7 @@ static void __init sh_edosk7705_init_irq(void) | |||
21 | /* | 21 | /* |
22 | * The Machine Vector | 22 | * The Machine Vector |
23 | */ | 23 | */ |
24 | struct sh_machine_vector mv_edosk7705 __initmv = { | 24 | static struct sh_machine_vector mv_edosk7705 __initmv = { |
25 | .mv_name = "EDOSK7705", | 25 | .mv_name = "EDOSK7705", |
26 | .mv_nr_irqs = 80, | 26 | .mv_nr_irqs = 80, |
27 | 27 | ||
@@ -41,4 +41,3 @@ struct sh_machine_vector mv_edosk7705 __initmv = { | |||
41 | .mv_isa_port2addr = sh_edosk7705_isa_port2addr, | 41 | .mv_isa_port2addr = sh_edosk7705_isa_port2addr, |
42 | .mv_init_irq = sh_edosk7705_init_irq, | 42 | .mv_init_irq = sh_edosk7705_init_irq, |
43 | }; | 43 | }; |
44 | ALIAS_MV(edosk7705) | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index f7d0e304d8..fa5fa39202 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c | |||
@@ -89,7 +89,7 @@ static void __init hs7751rvoip_setup(char **cmdline_p) | |||
89 | printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); | 89 | printk(KERN_INFO "Renesas Technology Sales HS7751RVoIP-2 support.\n"); |
90 | } | 90 | } |
91 | 91 | ||
92 | struct sh_machine_vector mv_hs7751rvoip __initmv = { | 92 | static struct sh_machine_vector mv_hs7751rvoip __initmv = { |
93 | .mv_name = "HS7751RVoIP", | 93 | .mv_name = "HS7751RVoIP", |
94 | .mv_setup = hs7751rvoip_setup, | 94 | .mv_setup = hs7751rvoip_setup, |
95 | .mv_nr_irqs = 72, | 95 | .mv_nr_irqs = 72, |
@@ -118,4 +118,3 @@ struct sh_machine_vector mv_hs7751rvoip __initmv = { | |||
118 | .mv_init_irq = hs7751rvoip_init_irq, | 118 | .mv_init_irq = hs7751rvoip_init_irq, |
119 | .mv_ioport_map = hs7751rvoip_ioport_map, | 119 | .mv_ioport_map = hs7751rvoip_ioport_map, |
120 | }; | 120 | }; |
121 | ALIAS_MV(hs7751rvoip) | ||
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index 0727ef92f2..5afb864a1e 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -166,10 +166,9 @@ static void __init highlander_setup(char **cmdline_p) | |||
166 | /* | 166 | /* |
167 | * The Machine Vector | 167 | * The Machine Vector |
168 | */ | 168 | */ |
169 | struct sh_machine_vector mv_highlander __initmv = { | 169 | static struct sh_machine_vector mv_highlander __initmv = { |
170 | .mv_name = "Highlander", | 170 | .mv_name = "Highlander", |
171 | .mv_nr_irqs = 109, | 171 | .mv_nr_irqs = 109, |
172 | .mv_setup = highlander_setup, | 172 | .mv_setup = highlander_setup, |
173 | .mv_init_irq = highlander_init_irq, | 173 | .mv_init_irq = highlander_init_irq, |
174 | }; | 174 | }; |
175 | ALIAS_MV(highlander) | ||
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 593f26a85e..656fda30ef 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -176,7 +176,7 @@ static void __init rts7751r2d_setup(char **cmdline_p) | |||
176 | /* | 176 | /* |
177 | * The Machine Vector | 177 | * The Machine Vector |
178 | */ | 178 | */ |
179 | struct sh_machine_vector mv_rts7751r2d __initmv = { | 179 | static struct sh_machine_vector mv_rts7751r2d __initmv = { |
180 | .mv_name = "RTS7751R2D", | 180 | .mv_name = "RTS7751R2D", |
181 | .mv_setup = rts7751r2d_setup, | 181 | .mv_setup = rts7751r2d_setup, |
182 | .mv_nr_irqs = 72, | 182 | .mv_nr_irqs = 72, |
@@ -189,4 +189,3 @@ struct sh_machine_vector mv_rts7751r2d __initmv = { | |||
189 | .mv_consistent_free = voyagergx_consistent_free, | 189 | .mv_consistent_free = voyagergx_consistent_free, |
190 | #endif | 190 | #endif |
191 | }; | 191 | }; |
192 | ALIAS_MV(rts7751r2d) | ||
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c index 180810b121..2dce8bd97f 100644 --- a/arch/sh/boards/renesas/sh7710voipgw/setup.c +++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c | |||
@@ -88,9 +88,8 @@ static void __init sh7710voipgw_init_irq(void) | |||
88 | /* | 88 | /* |
89 | * The Machine Vector | 89 | * The Machine Vector |
90 | */ | 90 | */ |
91 | struct sh_machine_vector mv_sh7710voipgw __initmv = { | 91 | static struct sh_machine_vector mv_sh7710voipgw __initmv = { |
92 | .mv_name = "SH7710 VoIP Gateway", | 92 | .mv_name = "SH7710 VoIP Gateway", |
93 | .mv_nr_irqs = 104, | 93 | .mv_nr_irqs = 104, |
94 | .mv_init_irq = sh7710voipgw_init_irq, | 94 | .mv_init_irq = sh7710voipgw_init_irq, |
95 | }; | 95 | }; |
96 | ALIAS_MV(sh7710voipgw) | ||
diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c index 936117659b..ee78af8427 100644 --- a/arch/sh/boards/renesas/systemh/setup.c +++ b/arch/sh/boards/renesas/systemh/setup.c | |||
@@ -28,7 +28,7 @@ static void __init sh7751systemh_init_irq(void) | |||
28 | make_systemh_irq(0xb); /* Ethernet interrupt */ | 28 | make_systemh_irq(0xb); /* Ethernet interrupt */ |
29 | } | 29 | } |
30 | 30 | ||
31 | struct sh_machine_vector mv_7751systemh __initmv = { | 31 | static struct sh_machine_vector mv_7751systemh __initmv = { |
32 | .mv_name = "7751 SystemH", | 32 | .mv_name = "7751 SystemH", |
33 | .mv_nr_irqs = 72, | 33 | .mv_nr_irqs = 72, |
34 | 34 | ||
@@ -55,4 +55,3 @@ struct sh_machine_vector mv_7751systemh __initmv = { | |||
55 | 55 | ||
56 | .mv_init_irq = sh7751systemh_init_irq, | 56 | .mv_init_irq = sh7751systemh_init_irq, |
57 | }; | 57 | }; |
58 | ALIAS_MV(7751systemh) | ||
diff --git a/arch/sh/boards/saturn/setup.c b/arch/sh/boards/saturn/setup.c index a3a37c9aad..7df4312fbb 100644 --- a/arch/sh/boards/saturn/setup.c +++ b/arch/sh/boards/saturn/setup.c | |||
@@ -18,7 +18,7 @@ extern int saturn_irq_demux(int irq_nr); | |||
18 | /* | 18 | /* |
19 | * The Machine Vector | 19 | * The Machine Vector |
20 | */ | 20 | */ |
21 | struct sh_machine_vector mv_saturn __initmv = { | 21 | static struct sh_machine_vector mv_saturn __initmv = { |
22 | .mv_name = "Sega Saturn", | 22 | .mv_name = "Sega Saturn", |
23 | .mv_nr_irqs = 80, /* Fix this later */ | 23 | .mv_nr_irqs = 80, /* Fix this later */ |
24 | 24 | ||
@@ -28,4 +28,3 @@ struct sh_machine_vector mv_saturn __initmv = { | |||
28 | .mv_ioremap = saturn_ioremap, | 28 | .mv_ioremap = saturn_ioremap, |
29 | .mv_iounmap = saturn_iounmap, | 29 | .mv_iounmap = saturn_iounmap, |
30 | }; | 30 | }; |
31 | ALIAS_MV(saturn) | ||
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c index ca714879f5..a074b62505 100644 --- a/arch/sh/boards/se/7206/setup.c +++ b/arch/sh/boards/se/7206/setup.c | |||
@@ -70,7 +70,7 @@ __initcall(se7206_devices_setup); | |||
70 | * The Machine Vector | 70 | * The Machine Vector |
71 | */ | 71 | */ |
72 | 72 | ||
73 | struct sh_machine_vector mv_se __initmv = { | 73 | static struct sh_machine_vector mv_se __initmv = { |
74 | .mv_name = "SolutionEngine", | 74 | .mv_name = "SolutionEngine", |
75 | .mv_nr_irqs = 256, | 75 | .mv_nr_irqs = 256, |
76 | .mv_inb = se7206_inb, | 76 | .mv_inb = se7206_inb, |
@@ -96,4 +96,3 @@ struct sh_machine_vector mv_se __initmv = { | |||
96 | 96 | ||
97 | .mv_init_irq = init_se7206_IRQ, | 97 | .mv_init_irq = init_se7206_IRQ, |
98 | }; | 98 | }; |
99 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c index f1960956ba..eb469f5b6e 100644 --- a/arch/sh/boards/se/7300/setup.c +++ b/arch/sh/boards/se/7300/setup.c | |||
@@ -46,7 +46,7 @@ __initcall(se7300_devices_setup); | |||
46 | /* | 46 | /* |
47 | * The Machine Vector | 47 | * The Machine Vector |
48 | */ | 48 | */ |
49 | struct sh_machine_vector mv_7300se __initmv = { | 49 | static struct sh_machine_vector mv_7300se __initmv = { |
50 | .mv_name = "SolutionEngine 7300", | 50 | .mv_name = "SolutionEngine 7300", |
51 | .mv_nr_irqs = 109, | 51 | .mv_nr_irqs = 109, |
52 | .mv_inb = sh7300se_inb, | 52 | .mv_inb = sh7300se_inb, |
@@ -72,4 +72,3 @@ struct sh_machine_vector mv_7300se __initmv = { | |||
72 | 72 | ||
73 | .mv_init_irq = init_7300se_IRQ, | 73 | .mv_init_irq = init_7300se_IRQ, |
74 | }; | 74 | }; |
75 | ALIAS_MV(7300se) | ||
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c index e143017c89..1deee85566 100644 --- a/arch/sh/boards/se/73180/setup.c +++ b/arch/sh/boards/se/73180/setup.c | |||
@@ -46,7 +46,7 @@ __initcall(se73180_devices_setup); | |||
46 | /* | 46 | /* |
47 | * The Machine Vector | 47 | * The Machine Vector |
48 | */ | 48 | */ |
49 | struct sh_machine_vector mv_73180se __initmv = { | 49 | static struct sh_machine_vector mv_73180se __initmv = { |
50 | .mv_name = "SolutionEngine 73180", | 50 | .mv_name = "SolutionEngine 73180", |
51 | .mv_nr_irqs = 108, | 51 | .mv_nr_irqs = 108, |
52 | .mv_inb = sh73180se_inb, | 52 | .mv_inb = sh73180se_inb, |
@@ -73,4 +73,3 @@ struct sh_machine_vector mv_73180se __initmv = { | |||
73 | .mv_init_irq = init_73180se_IRQ, | 73 | .mv_init_irq = init_73180se_IRQ, |
74 | .mv_irq_demux = shmse_irq_demux, | 74 | .mv_irq_demux = shmse_irq_demux, |
75 | }; | 75 | }; |
76 | ALIAS_MV(73180se) | ||
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c index 3fdb16f2ce..8fec155e2f 100644 --- a/arch/sh/boards/se/7343/setup.c +++ b/arch/sh/boards/se/7343/setup.c | |||
@@ -64,7 +64,7 @@ static void __init sh7343se_setup(char **cmdline_p) | |||
64 | /* | 64 | /* |
65 | * The Machine Vector | 65 | * The Machine Vector |
66 | */ | 66 | */ |
67 | struct sh_machine_vector mv_7343se __initmv = { | 67 | static struct sh_machine_vector mv_7343se __initmv = { |
68 | .mv_name = "SolutionEngine 7343", | 68 | .mv_name = "SolutionEngine 7343", |
69 | .mv_setup = sh7343se_setup, | 69 | .mv_setup = sh7343se_setup, |
70 | .mv_nr_irqs = 108, | 70 | .mv_nr_irqs = 108, |
@@ -92,4 +92,3 @@ struct sh_machine_vector mv_7343se __initmv = { | |||
92 | .mv_init_irq = init_7343se_IRQ, | 92 | .mv_init_irq = init_7343se_IRQ, |
93 | .mv_irq_demux = shmse_irq_demux, | 93 | .mv_irq_demux = shmse_irq_demux, |
94 | }; | 94 | }; |
95 | ALIAS_MV(7343se) | ||
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c index 52d2c4d5d2..1d0ef7faa1 100644 --- a/arch/sh/boards/se/7619/setup.c +++ b/arch/sh/boards/se/7619/setup.c | |||
@@ -15,8 +15,7 @@ | |||
15 | * The Machine Vector | 15 | * The Machine Vector |
16 | */ | 16 | */ |
17 | 17 | ||
18 | struct sh_machine_vector mv_se __initmv = { | 18 | static struct sh_machine_vector mv_se __initmv = { |
19 | .mv_name = "SolutionEngine", | 19 | .mv_name = "SolutionEngine", |
20 | .mv_nr_irqs = 108, | 20 | .mv_nr_irqs = 108, |
21 | }; | 21 | }; |
22 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index 17a2631de3..2962da148f 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c | |||
@@ -122,7 +122,7 @@ device_initcall(se_devices_setup); | |||
122 | /* | 122 | /* |
123 | * The Machine Vector | 123 | * The Machine Vector |
124 | */ | 124 | */ |
125 | struct sh_machine_vector mv_se __initmv = { | 125 | static struct sh_machine_vector mv_se __initmv = { |
126 | .mv_name = "SolutionEngine", | 126 | .mv_name = "SolutionEngine", |
127 | .mv_setup = smsc_setup, | 127 | .mv_setup = smsc_setup, |
128 | #if defined(CONFIG_CPU_SH4) | 128 | #if defined(CONFIG_CPU_SH4) |
@@ -160,4 +160,3 @@ struct sh_machine_vector mv_se __initmv = { | |||
160 | 160 | ||
161 | .mv_init_irq = init_se_IRQ, | 161 | .mv_init_irq = init_se_IRQ, |
162 | }; | 162 | }; |
163 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/7722/setup.c b/arch/sh/boards/se/7722/setup.c index 636ca6c987..6cca6cbc80 100644 --- a/arch/sh/boards/se/7722/setup.c +++ b/arch/sh/boards/se/7722/setup.c | |||
@@ -137,7 +137,7 @@ static void __init se7722_setup(char **cmdline_p) | |||
137 | /* | 137 | /* |
138 | * The Machine Vector | 138 | * The Machine Vector |
139 | */ | 139 | */ |
140 | struct sh_machine_vector mv_se7722 __initmv = { | 140 | static struct sh_machine_vector mv_se7722 __initmv = { |
141 | .mv_name = "Solution Engine 7722" , | 141 | .mv_name = "Solution Engine 7722" , |
142 | .mv_setup = se7722_setup , | 142 | .mv_setup = se7722_setup , |
143 | .mv_nr_irqs = 109 , | 143 | .mv_nr_irqs = 109 , |
@@ -145,4 +145,3 @@ struct sh_machine_vector mv_se7722 __initmv = { | |||
145 | .mv_irq_demux = se7722_irq_demux, | 145 | .mv_irq_demux = se7722_irq_demux, |
146 | 146 | ||
147 | }; | 147 | }; |
148 | ALIAS_MV(se7722) | ||
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index 52c7bfa57c..7873d07e40 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c | |||
@@ -48,7 +48,7 @@ __initcall(se7751_devices_setup); | |||
48 | /* | 48 | /* |
49 | * The Machine Vector | 49 | * The Machine Vector |
50 | */ | 50 | */ |
51 | struct sh_machine_vector mv_7751se __initmv = { | 51 | static struct sh_machine_vector mv_7751se __initmv = { |
52 | .mv_name = "7751 SolutionEngine", | 52 | .mv_name = "7751 SolutionEngine", |
53 | .mv_nr_irqs = 72, | 53 | .mv_nr_irqs = 72, |
54 | 54 | ||
@@ -71,4 +71,3 @@ struct sh_machine_vector mv_7751se __initmv = { | |||
71 | 71 | ||
72 | .mv_init_irq = init_7751se_IRQ, | 72 | .mv_init_irq = init_7751se_IRQ, |
73 | }; | 73 | }; |
74 | ALIAS_MV(7751se) | ||
diff --git a/arch/sh/boards/se/7780/setup.c b/arch/sh/boards/se/7780/setup.c index df7d08a24c..723f2fd4d5 100644 --- a/arch/sh/boards/se/7780/setup.c +++ b/arch/sh/boards/se/7780/setup.c | |||
@@ -113,10 +113,9 @@ static void __init se7780_setup(char **cmdline_p) | |||
113 | /* | 113 | /* |
114 | * The Machine Vector | 114 | * The Machine Vector |
115 | */ | 115 | */ |
116 | struct sh_machine_vector mv_se7780 __initmv = { | 116 | static struct sh_machine_vector mv_se7780 __initmv = { |
117 | .mv_name = "Solution Engine 7780" , | 117 | .mv_name = "Solution Engine 7780" , |
118 | .mv_setup = se7780_setup , | 118 | .mv_setup = se7780_setup , |
119 | .mv_nr_irqs = 111 , | 119 | .mv_nr_irqs = 111 , |
120 | .mv_init_irq = init_se7780_IRQ, | 120 | .mv_init_irq = init_se7780_IRQ, |
121 | }; | 121 | }; |
122 | ALIAS_MV(se7780) | ||
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index c069c444b4..d7867c190a 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c | |||
@@ -74,11 +74,10 @@ static int __init sh03_devices_setup(void) | |||
74 | } | 74 | } |
75 | __initcall(sh03_devices_setup); | 75 | __initcall(sh03_devices_setup); |
76 | 76 | ||
77 | struct sh_machine_vector mv_sh03 __initmv = { | 77 | static struct sh_machine_vector mv_sh03 __initmv = { |
78 | .mv_name = "Interface (CTP/PCI-SH03)", | 78 | .mv_name = "Interface (CTP/PCI-SH03)", |
79 | .mv_setup = sh03_setup, | 79 | .mv_setup = sh03_setup, |
80 | .mv_nr_irqs = 48, | 80 | .mv_nr_irqs = 48, |
81 | .mv_ioport_map = sh03_ioport_map, | 81 | .mv_ioport_map = sh03_ioport_map, |
82 | .mv_init_irq = init_sh03_IRQ, | 82 | .mv_init_irq = init_sh03_IRQ, |
83 | }; | 83 | }; |
84 | ALIAS_MV(sh03) | ||
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c index 4a9df4a6b0..9c8bb51eb4 100644 --- a/arch/sh/boards/shmin/setup.c +++ b/arch/sh/boards/shmin/setup.c | |||
@@ -43,9 +43,8 @@ static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size) | |||
43 | 43 | ||
44 | } | 44 | } |
45 | 45 | ||
46 | struct sh_machine_vector mv_shmin __initmv = { | 46 | static struct sh_machine_vector mv_shmin __initmv = { |
47 | .mv_name = "SHMIN", | 47 | .mv_name = "SHMIN", |
48 | .mv_init_irq = init_shmin_irq, | 48 | .mv_init_irq = init_shmin_irq, |
49 | .mv_ioport_map = shmin_ioport_map, | 49 | .mv_ioport_map = shmin_ioport_map, |
50 | }; | 50 | }; |
51 | ALIAS_MV(shmin) | ||
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index 650fb36459..b40124c092 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c | |||
@@ -96,7 +96,7 @@ static void __init snapgear_setup(char **cmdline_p) | |||
96 | /* | 96 | /* |
97 | * The Machine Vector | 97 | * The Machine Vector |
98 | */ | 98 | */ |
99 | struct sh_machine_vector mv_snapgear __initmv = { | 99 | static struct sh_machine_vector mv_snapgear __initmv = { |
100 | .mv_name = "SnapGear SecureEdge5410", | 100 | .mv_name = "SnapGear SecureEdge5410", |
101 | .mv_setup = snapgear_setup, | 101 | .mv_setup = snapgear_setup, |
102 | .mv_nr_irqs = 72, | 102 | .mv_nr_irqs = 72, |
@@ -117,4 +117,3 @@ struct sh_machine_vector mv_snapgear __initmv = { | |||
117 | 117 | ||
118 | .mv_init_irq = init_snapgear_IRQ, | 118 | .mv_init_irq = init_snapgear_IRQ, |
119 | }; | 119 | }; |
120 | ALIAS_MV(snapgear) | ||
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c index 6396cea1c8..fc8cd06d66 100644 --- a/arch/sh/boards/superh/microdev/setup.c +++ b/arch/sh/boards/superh/microdev/setup.c | |||
@@ -371,7 +371,7 @@ static void __init microdev_setup(char **cmdline_p) | |||
371 | /* | 371 | /* |
372 | * The Machine Vector | 372 | * The Machine Vector |
373 | */ | 373 | */ |
374 | struct sh_machine_vector mv_sh4202_microdev __initmv = { | 374 | static struct sh_machine_vector mv_sh4202_microdev __initmv = { |
375 | .mv_name = "SH4-202 MicroDev", | 375 | .mv_name = "SH4-202 MicroDev", |
376 | .mv_setup = microdev_setup, | 376 | .mv_setup = microdev_setup, |
377 | .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ | 377 | .mv_nr_irqs = 72, /* QQQ need to check this - use the MACRO */ |
@@ -403,4 +403,3 @@ struct sh_machine_vector mv_sh4202_microdev __initmv = { | |||
403 | .mv_heartbeat = microdev_heartbeat, | 403 | .mv_heartbeat = microdev_heartbeat, |
404 | #endif | 404 | #endif |
405 | }; | 405 | }; |
406 | ALIAS_MV(sh4202_microdev) | ||
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c index 6bcd939bfa..630f62f69a 100644 --- a/arch/sh/boards/titan/setup.c +++ b/arch/sh/boards/titan/setup.c | |||
@@ -28,7 +28,7 @@ static void __init init_titan_irq(void) | |||
28 | make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); | 28 | make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); |
29 | } | 29 | } |
30 | 30 | ||
31 | struct sh_machine_vector mv_titan __initmv = { | 31 | static struct sh_machine_vector mv_titan __initmv = { |
32 | .mv_name = "Titan", | 32 | .mv_name = "Titan", |
33 | 33 | ||
34 | .mv_inb = titan_inb, | 34 | .mv_inb = titan_inb, |
@@ -52,4 +52,3 @@ struct sh_machine_vector mv_titan __initmv = { | |||
52 | 52 | ||
53 | .mv_init_irq = init_titan_irq, | 53 | .mv_init_irq = init_titan_irq, |
54 | }; | 54 | }; |
55 | ALIAS_MV(titan) | ||
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c index bee4612de5..f975a1f909 100644 --- a/arch/sh/boards/unknown/setup.c +++ b/arch/sh/boards/unknown/setup.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
17 | 17 | ||
18 | struct sh_machine_vector mv_unknown __initmv = { | 18 | static struct sh_machine_vector mv_unknown __initmv = { |
19 | .mv_name = "Unknown", | 19 | .mv_name = "Unknown", |
20 | }; | 20 | }; |
21 | ALIAS_MV(unknown) | ||
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c index 1e78191154..e8121de5fa 100644 --- a/arch/sh/kernel/machvec.c +++ b/arch/sh/kernel/machvec.c | |||
@@ -29,7 +29,7 @@ static struct sh_machine_vector * __init get_mv_byname(const char *name) | |||
29 | struct sh_machine_vector *mv; | 29 | struct sh_machine_vector *mv; |
30 | 30 | ||
31 | for_each_mv(mv) | 31 | for_each_mv(mv) |
32 | if (strcasecmp(name, get_system_type()) == 0) | 32 | if (strcasecmp(name, mv->mv_name) == 0) |
33 | return mv; | 33 | return mv; |
34 | 34 | ||
35 | return NULL; | 35 | return NULL; |
@@ -55,20 +55,17 @@ static int __init early_parse_mv(char *from) | |||
55 | mv_name[mv_len] = '\0'; | 55 | mv_name[mv_len] = '\0'; |
56 | from = mv_end; | 56 | from = mv_end; |
57 | 57 | ||
58 | if (strcmp(sh_mv.mv_name, mv_name) != 0) { | 58 | mvp = get_mv_byname(mv_name); |
59 | mvp = get_mv_byname(mv_name); | 59 | if (unlikely(!mvp)) { |
60 | if (unlikely(!mvp)) { | 60 | printk("Available vectors:\n\n\t"); |
61 | printk("Available vectors:\n\n\t"); | 61 | for_each_mv(mvp) |
62 | for_each_mv(mvp) | 62 | printk("'%s', ", mvp->mv_name); |
63 | printk("'%s', ", mvp->mv_name); | 63 | printk("\n\n"); |
64 | printk("\n\n"); | 64 | panic("Failed to select machvec '%s' -- halting.\n", |
65 | panic("Failed to select machvec '%s' -- halting.\n", | 65 | mv_name); |
66 | mv_name); | 66 | } else |
67 | } else | 67 | sh_mv = *mvp; |
68 | sh_mv = *mvp; | ||
69 | } | ||
70 | 68 | ||
71 | printk(KERN_NOTICE "Booting machvec: %s\n", sh_mv.mv_name); | ||
72 | return 0; | 69 | return 0; |
73 | } | 70 | } |
74 | early_param("sh_mv", early_parse_mv); | 71 | early_param("sh_mv", early_parse_mv); |
@@ -76,6 +73,26 @@ early_param("sh_mv", early_parse_mv); | |||
76 | void __init sh_mv_setup(void) | 73 | void __init sh_mv_setup(void) |
77 | { | 74 | { |
78 | /* | 75 | /* |
76 | * Only overload the machvec if one hasn't been selected on | ||
77 | * the command line with sh_mv= | ||
78 | */ | ||
79 | if (strcmp(sh_mv.mv_name, "Unknown") != 0) { | ||
80 | unsigned long machvec_size; | ||
81 | |||
82 | machvec_size = ((unsigned long)&__machvec_end - | ||
83 | (unsigned long)&__machvec_start); | ||
84 | |||
85 | /* | ||
86 | * If the machvec hasn't been preselected, use the first | ||
87 | * vector (usually the only one) from .machvec.init. | ||
88 | */ | ||
89 | if (machvec_size >= sizeof(struct sh_machine_vector)) | ||
90 | sh_mv = *(struct sh_machine_vector *)&__machvec_start; | ||
91 | } | ||
92 | |||
93 | printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type()); | ||
94 | |||
95 | /* | ||
79 | * Manually walk the vec, fill in anything that the board hasn't yet | 96 | * Manually walk the vec, fill in anything that the board hasn't yet |
80 | * by hand, wrapping to the generic implementation. | 97 | * by hand, wrapping to the generic implementation. |
81 | */ | 98 | */ |
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 65c093145d..55ed653c7a 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -42,6 +42,13 @@ extern void * __rd_start, * __rd_end; | |||
42 | * The bigger value means no problem. | 42 | * The bigger value means no problem. |
43 | */ | 43 | */ |
44 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; | 44 | struct sh_cpuinfo boot_cpu_data = { CPU_SH_NONE, 10000000, }; |
45 | |||
46 | /* | ||
47 | * The machine vector. First entry in .machvec.init, or clobbered by | ||
48 | * sh_mv= on the command line, prior to .machvec.init teardown. | ||
49 | */ | ||
50 | struct sh_machine_vector sh_mv = { .mv_name = "Unknown", }; | ||
51 | |||
45 | #ifdef CONFIG_VT | 52 | #ifdef CONFIG_VT |
46 | struct screen_info screen_info; | 53 | struct screen_info screen_info; |
47 | #endif | 54 | #endif |
diff --git a/include/asm-sh/machvec.h b/include/asm-sh/machvec.h index 70389b72ff..088698bacf 100644 --- a/include/asm-sh/machvec.h +++ b/include/asm-sh/machvec.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <linux/time.h> | 14 | #include <linux/time.h> |
15 | #include <asm/machtypes.h> | 15 | #include <asm/machtypes.h> |
16 | #include <asm/machvec_init.h> | ||
17 | 16 | ||
18 | struct device; | 17 | struct device; |
19 | 18 | ||
@@ -68,4 +67,7 @@ extern struct sh_machine_vector sh_mv; | |||
68 | 67 | ||
69 | #define get_system_type() sh_mv.mv_name | 68 | #define get_system_type() sh_mv.mv_name |
70 | 69 | ||
70 | #define __initmv \ | ||
71 | __attribute_used__ __attribute__((__section__ (".machvec.init"))) | ||
72 | |||
71 | #endif /* _ASM_SH_MACHVEC_H */ | 73 | #endif /* _ASM_SH_MACHVEC_H */ |
diff --git a/include/asm-sh/machvec_init.h b/include/asm-sh/machvec_init.h deleted file mode 100644 index cb015b8bb3..0000000000 --- a/include/asm-sh/machvec_init.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/machvec_init.h | ||
3 | * | ||
4 | * Copyright 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 | * This file has goodies to help simplify instantiation of machine vectors. | ||
10 | */ | ||
11 | |||
12 | #ifndef __SH_MACHVEC_INIT_H | ||
13 | #define __SH_MACHVEC_INIT_H | ||
14 | |||
15 | #define __initmv __attribute__((unused,__section__ (".machvec.init"))) | ||
16 | #define ALIAS_MV(system) \ | ||
17 | asm(".weak sh_mv\nsh_mv = mv_"#system ); | ||
18 | |||
19 | #endif /* __SH_MACHVEC_INIT_H */ | ||