aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-06-21 09:56:30 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:30:18 -0400
commitc83cfc9c9477d0bc0e0a1ba29dfc58e0d42b2faf (patch)
tree86c613b44ae25af1808b81dde2a4dc0274647194
parent8c93650890a33318263880dec36603a6d5749b7e (diff)
Get rid of early_init. There's more need to make this form of
initialization actually useful and as is certainly unmergable with upstream. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/au1000/common/setup.c6
-rw-r--r--arch/mips/cobalt/setup.c4
-rw-r--r--arch/mips/ddb5xxx/ddb5074/setup.c4
-rw-r--r--arch/mips/ddb5xxx/ddb5476/setup.c4
-rw-r--r--arch/mips/ddb5xxx/ddb5477/setup.c6
-rw-r--r--arch/mips/dec/setup.c4
-rw-r--r--arch/mips/galileo-boards/ev96100/setup.c4
-rw-r--r--arch/mips/gt64120/ev64120/setup.c4
-rw-r--r--arch/mips/gt64120/momenco_ocelot/setup.c4
-rw-r--r--arch/mips/ite-boards/generic/it8172_setup.c4
-rw-r--r--arch/mips/jazz/setup.c4
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c7
-rw-r--r--arch/mips/kernel/setup.c28
-rw-r--r--arch/mips/kernel/vmlinux.lds.S6
-rw-r--r--arch/mips/lasat/setup.c6
-rw-r--r--arch/mips/mips-boards/atlas/atlas_setup.c8
-rw-r--r--arch/mips/mips-boards/generic/pci.c8
-rw-r--r--arch/mips/mips-boards/malta/malta_setup.c8
-rw-r--r--arch/mips/mips-boards/sead/sead_setup.c2
-rw-r--r--arch/mips/momentum/jaguar_atx/setup.c6
-rw-r--r--arch/mips/momentum/ocelot_3/setup.c6
-rw-r--r--arch/mips/momentum/ocelot_c/setup.c4
-rw-r--r--arch/mips/momentum/ocelot_g/setup.c6
-rw-r--r--arch/mips/pci/pci-lasat.c6
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c6
-rw-r--r--arch/mips/sgi-ip22/ip22-setup.c6
-rw-r--r--arch/mips/sgi-ip27/ip27-init.c6
-rw-r--r--arch/mips/sgi-ip32/ip32-setup.c6
-rw-r--r--arch/mips/sibyte/swarm/setup.c6
-rw-r--r--arch/mips/sni/setup.c6
-rw-r--r--arch/mips/tx4927/common/tx4927_setup.c4
-rw-r--r--arch/mips/vr41xx/common/init.c14
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/setup.c5
-rw-r--r--include/asm-mips/mips-boards/generic.h6
34 files changed, 53 insertions, 161 deletions
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index eff89e109ce6..c1e7d2dcc190 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -57,7 +57,7 @@ extern void au1xxx_time_init(void);
57extern void au1xxx_timer_setup(struct irqaction *irq); 57extern void au1xxx_timer_setup(struct irqaction *irq);
58extern void set_cpuspec(void); 58extern void set_cpuspec(void);
59 59
60static int __init au1x00_setup(void) 60void __init plat_setup(void)
61{ 61{
62 struct cpu_spec *sp; 62 struct cpu_spec *sp;
63 char *argptr; 63 char *argptr;
@@ -153,12 +153,8 @@ static int __init au1x00_setup(void)
153 au_sync(); 153 au_sync();
154 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S); 154 while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S);
155 au_writel(0, SYS_TOYTRIM); 155 au_writel(0, SYS_TOYTRIM);
156
157 return 0;
158} 156}
159 157
160early_initcall(au1x00_setup);
161
162#if defined(CONFIG_64BIT_PHYS_ADDR) 158#if defined(CONFIG_64BIT_PHYS_ADDR)
163/* This routine should be valid for all Au1x based boards */ 159/* This routine should be valid for all Au1x based boards */
164phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 160phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index 6b4737e425ed..f8138c15a535 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -89,7 +89,7 @@ static struct pci_controller cobalt_pci_controller = {
89 .io_offset = 0x00001000UL - GT64111_IO_BASE 89 .io_offset = 0x00001000UL - GT64111_IO_BASE
90}; 90};
91 91
92static void __init cobalt_setup(void) 92void __init plat_setup(void)
93{ 93{
94 unsigned int devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0); 94 unsigned int devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0);
95 int i; 95 int i;
@@ -125,8 +125,6 @@ static void __init cobalt_setup(void)
125#endif 125#endif
126} 126}
127 127
128early_initcall(cobalt_setup);
129
130/* 128/*
131 * Prom init. We read our one and only communication with the firmware. 129 * Prom init. We read our one and only communication with the firmware.
132 * Grab the amount of installed memory 130 * Grab the amount of installed memory
diff --git a/arch/mips/ddb5xxx/ddb5074/setup.c b/arch/mips/ddb5xxx/ddb5074/setup.c
index a73a5978d550..11535be265b9 100644
--- a/arch/mips/ddb5xxx/ddb5074/setup.c
+++ b/arch/mips/ddb5xxx/ddb5074/setup.c
@@ -85,7 +85,7 @@ static void __init ddb_time_init(void)
85 85
86 86
87 87
88static void __init ddb5074_setup(void) 88void __init plat_setup(void)
89{ 89{
90 set_io_port_base(NILE4_PCI_IO_BASE); 90 set_io_port_base(NILE4_PCI_IO_BASE);
91 isa_slot_offset = NILE4_PCI_MEM_BASE; 91 isa_slot_offset = NILE4_PCI_MEM_BASE;
@@ -106,8 +106,6 @@ static void __init ddb5074_setup(void)
106 panic_timeout = 180; 106 panic_timeout = 180;
107} 107}
108 108
109early_initcall(ddb5074_setup);
110
111#define USE_NILE4_SERIAL 0 109#define USE_NILE4_SERIAL 0
112 110
113#if USE_NILE4_SERIAL 111#if USE_NILE4_SERIAL
diff --git a/arch/mips/ddb5xxx/ddb5476/setup.c b/arch/mips/ddb5xxx/ddb5476/setup.c
index 71531f8146ea..f4e480a74edf 100644
--- a/arch/mips/ddb5xxx/ddb5476/setup.c
+++ b/arch/mips/ddb5xxx/ddb5476/setup.c
@@ -124,7 +124,7 @@ static struct {
124 124
125static void ddb5476_board_init(void); 125static void ddb5476_board_init(void);
126 126
127static void __init ddb5476_setup(void) 127void __init plat_setup(void)
128{ 128{
129 set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE)); 129 set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE));
130 130
@@ -158,8 +158,6 @@ static void __init ddb5476_setup(void)
158 ddb5476_board_init(); 158 ddb5476_board_init();
159} 159}
160 160
161early_initcall(ddb5476_setup);
162
163/* 161/*
164 * We don't trust bios. We essentially does hardware re-initialization 162 * We don't trust bios. We essentially does hardware re-initialization
165 * as complete as possible, as far as we know we can safely do. 163 * as complete as possible, as far as we know we can safely do.
diff --git a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c
index d62f5a789b05..81163353c4a8 100644
--- a/arch/mips/ddb5xxx/ddb5477/setup.c
+++ b/arch/mips/ddb5xxx/ddb5477/setup.c
@@ -170,7 +170,7 @@ static void ddb5477_board_init(void);
170extern struct pci_controller ddb5477_ext_controller; 170extern struct pci_controller ddb5477_ext_controller;
171extern struct pci_controller ddb5477_io_controller; 171extern struct pci_controller ddb5477_io_controller;
172 172
173static int ddb5477_setup(void) 173void __init plat_setup(void)
174{ 174{
175 /* initialize board - we don't trust the loader */ 175 /* initialize board - we don't trust the loader */
176 ddb5477_board_init(); 176 ddb5477_board_init();
@@ -193,12 +193,8 @@ static int ddb5477_setup(void)
193 193
194 register_pci_controller (&ddb5477_ext_controller); 194 register_pci_controller (&ddb5477_ext_controller);
195 register_pci_controller (&ddb5477_io_controller); 195 register_pci_controller (&ddb5477_io_controller);
196
197 return 0;
198} 196}
199 197
200early_initcall(ddb5477_setup);
201
202static void __init ddb5477_board_init(void) 198static void __init ddb5477_board_init(void)
203{ 199{
204 /* ----------- setup PDARs ------------ */ 200 /* ----------- setup PDARs ------------ */
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index 6a69309baf40..534a7792a7f6 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -128,7 +128,7 @@ void __init dec_be_init(void)
128extern void dec_time_init(void); 128extern void dec_time_init(void);
129extern void dec_timer_setup(struct irqaction *); 129extern void dec_timer_setup(struct irqaction *);
130 130
131static void __init decstation_setup(void) 131void __init plat_setup(void)
132{ 132{
133 board_be_init = dec_be_init; 133 board_be_init = dec_be_init;
134 board_time_init = dec_time_init; 134 board_time_init = dec_time_init;
@@ -141,8 +141,6 @@ static void __init decstation_setup(void)
141 _machine_power_off = dec_machine_power_off; 141 _machine_power_off = dec_machine_power_off;
142} 142}
143 143
144early_initcall(decstation_setup);
145
146/* 144/*
147 * Machine-specific initialisation for KN01, aka DS2100 (aka Pmin) 145 * Machine-specific initialisation for KN01, aka DS2100 (aka Pmin)
148 * or DS3100 (aka Pmax). 146 * or DS3100 (aka Pmax).
diff --git a/arch/mips/galileo-boards/ev96100/setup.c b/arch/mips/galileo-boards/ev96100/setup.c
index 28bd908c6d55..78dbb18edeb8 100644
--- a/arch/mips/galileo-boards/ev96100/setup.c
+++ b/arch/mips/galileo-boards/ev96100/setup.c
@@ -55,7 +55,7 @@ extern void mips_reboot_setup(void);
55 55
56unsigned char mac_0_1[12]; 56unsigned char mac_0_1[12];
57 57
58static void __init ev96100_setup(void) 58void __init plat_setup(void)
59{ 59{
60 unsigned int config = read_c0_config(); 60 unsigned int config = read_c0_config();
61 unsigned int status = read_c0_status(); 61 unsigned int status = read_c0_status();
@@ -142,8 +142,6 @@ static void __init ev96100_setup(void)
142 tmp = GT_READ(GT_PCI0_CFGDATA_OFS); 142 tmp = GT_READ(GT_PCI0_CFGDATA_OFS);
143} 143}
144 144
145early_initcall(ev96100_setup);
146
147unsigned short get_gt_devid(void) 145unsigned short get_gt_devid(void)
148{ 146{
149 u32 gt_devid; 147 u32 gt_devid;
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c
index dba0961400cc..98b5a96cc039 100644
--- a/arch/mips/gt64120/ev64120/setup.c
+++ b/arch/mips/gt64120/ev64120/setup.c
@@ -69,7 +69,7 @@ unsigned long __init prom_free_prom_memory(void)
69 */ 69 */
70extern void gt64120_time_init(void); 70extern void gt64120_time_init(void);
71 71
72static void __init ev64120_setup(void) 72void __init plat_setup(void)
73{ 73{
74 _machine_restart = galileo_machine_restart; 74 _machine_restart = galileo_machine_restart;
75 _machine_halt = galileo_machine_halt; 75 _machine_halt = galileo_machine_halt;
@@ -79,8 +79,6 @@ static void __init ev64120_setup(void)
79 set_io_port_base(KSEG1); 79 set_io_port_base(KSEG1);
80} 80}
81 81
82early_initcall(ev64120_setup);
83
84const char *get_system_type(void) 82const char *get_system_type(void)
85{ 83{
86 return "Galileo EV64120A"; 84 return "Galileo EV64120A";
diff --git a/arch/mips/gt64120/momenco_ocelot/setup.c b/arch/mips/gt64120/momenco_ocelot/setup.c
index d610f8c17c81..0d07c33112d0 100644
--- a/arch/mips/gt64120/momenco_ocelot/setup.c
+++ b/arch/mips/gt64120/momenco_ocelot/setup.c
@@ -150,7 +150,7 @@ void PMON_v2_setup()
150 gt64120_base = 0xe0000000; 150 gt64120_base = 0xe0000000;
151} 151}
152 152
153static void __init momenco_ocelot_setup(void) 153void __init plat_setup(void)
154{ 154{
155 void (*l3func)(unsigned long)=KSEG1ADDR(&setup_l3cache); 155 void (*l3func)(unsigned long)=KSEG1ADDR(&setup_l3cache);
156 unsigned int tmpword; 156 unsigned int tmpword;
@@ -307,8 +307,6 @@ static void __init momenco_ocelot_setup(void)
307 GT_WRITE(GT_DEV_B3_OFS, 0xfef73); 307 GT_WRITE(GT_DEV_B3_OFS, 0xfef73);
308} 308}
309 309
310early_initcall(momenco_ocelot_setup);
311
312extern int rm7k_tcache_enabled; 310extern int rm7k_tcache_enabled;
313/* 311/*
314 * This runs in KSEG1. See the verbiage in rm7k.c::probe_scache() 312 * This runs in KSEG1. See the verbiage in rm7k.c::probe_scache()
diff --git a/arch/mips/ite-boards/generic/it8172_setup.c b/arch/mips/ite-boards/generic/it8172_setup.c
index a5f6d84bc181..062429dd7ca0 100644
--- a/arch/mips/ite-boards/generic/it8172_setup.c
+++ b/arch/mips/ite-boards/generic/it8172_setup.c
@@ -105,7 +105,7 @@ void __init it8172_init_ram_resource(unsigned long memsize)
105 it8172_resources.ram.end = memsize; 105 it8172_resources.ram.end = memsize;
106} 106}
107 107
108static void __init it8172_setup(void) 108void __init plat_setup(void)
109{ 109{
110 unsigned short dsr; 110 unsigned short dsr;
111 char *argptr; 111 char *argptr;
@@ -251,8 +251,6 @@ static void __init it8172_setup(void)
251#endif /* CONFIG_IT8172_SCR1 */ 251#endif /* CONFIG_IT8172_SCR1 */
252} 252}
253 253
254early_initcall(it8172_setup);
255
256#ifdef CONFIG_SERIO_I8042 254#ifdef CONFIG_SERIO_I8042
257/* 255/*
258 * According to the ITE Special BIOS Note for waking up the 256 * According to the ITE Special BIOS Note for waking up the
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index fccb06fe209d..044df9d4ab7c 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -50,7 +50,7 @@ static struct resource jazz_io_resources[] = {
50 { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, 50 { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
51}; 51};
52 52
53static void __init jazz_setup(void) 53void __init plat_setup(void)
54{ 54{
55 int i; 55 int i;
56 56
@@ -97,5 +97,3 @@ static void __init jazz_setup(void)
97 97
98 vdma_init(); 98 vdma_init();
99} 99}
100
101early_initcall(jazz_setup);
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index 32039bb2f440..d9f7a9989de5 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -193,7 +193,7 @@ static void jmr3927_board_init(void);
193extern struct resource pci_io_resource; 193extern struct resource pci_io_resource;
194extern struct resource pci_mem_resource; 194extern struct resource pci_mem_resource;
195 195
196static void __init jmr3927_setup(void) 196void __init plat_setup(void)
197{ 197{
198 char *argptr; 198 char *argptr;
199 199
@@ -274,9 +274,6 @@ static void __init jmr3927_setup(void)
274#endif 274#endif
275} 275}
276 276
277early_initcall(jmr3927_setup);
278
279
280static void tx3927_setup(void); 277static void tx3927_setup(void);
281 278
282#ifdef CONFIG_PCI 279#ifdef CONFIG_PCI
@@ -335,7 +332,7 @@ static void __init jmr3927_board_init(void)
335 jmr3927_io_dipsw()); 332 jmr3927_io_dipsw());
336} 333}
337 334
338static void __init tx3927_setup(void) 335void __init plat_setup(void)
339{ 336{
340 int i; 337 int i;
341 338
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 12b531c295c4..6fc51b298304 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -510,31 +510,7 @@ static inline void resource_init(void)
510#undef MAXMEM 510#undef MAXMEM
511#undef MAXMEM_PFN 511#undef MAXMEM_PFN
512 512
513static int __initdata earlyinit_debug; 513extern void plat_setup(void);
514
515static int __init earlyinit_debug_setup(char *str)
516{
517 earlyinit_debug = 1;
518 return 1;
519}
520__setup("earlyinit_debug", earlyinit_debug_setup);
521
522extern initcall_t __earlyinitcall_start, __earlyinitcall_end;
523
524static void __init do_earlyinitcalls(void)
525{
526 initcall_t *call, *start, *end;
527
528 start = &__earlyinitcall_start;
529 end = &__earlyinitcall_end;
530
531 for (call = start; call < end; call++) {
532 if (earlyinit_debug)
533 printk("calling earlyinitcall 0x%p\n", *call);
534
535 (*call)();
536 }
537}
538 514
539void __init setup_arch(char **cmdline_p) 515void __init setup_arch(char **cmdline_p)
540{ 516{
@@ -551,7 +527,7 @@ void __init setup_arch(char **cmdline_p)
551#endif 527#endif
552 528
553 /* call board setup routine */ 529 /* call board setup routine */
554 do_earlyinitcalls(); 530 plat_setup();
555 531
556 strlcpy(command_line, arcs_cmdline, sizeof(command_line)); 532 strlcpy(command_line, arcs_cmdline, sizeof(command_line));
557 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 533 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 482ac310c937..ff345f2c42c2 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -96,12 +96,6 @@ SECTIONS
96 .init.setup : { *(.init.setup) } 96 .init.setup : { *(.init.setup) }
97 __setup_end = .; 97 __setup_end = .;
98 98
99 .early_initcall.init : {
100 __earlyinitcall_start = .;
101 *(.initcall.early1.init)
102 }
103 __earlyinitcall_end = .;
104
105 __initcall_start = .; 99 __initcall_start = .;
106 .initcall.init : { 100 .initcall.init : {
107 *(.initcall1.init) 101 *(.initcall1.init)
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
index f2604fab9a99..dcd819d57dae 100644
--- a/arch/mips/lasat/setup.c
+++ b/arch/mips/lasat/setup.c
@@ -155,7 +155,7 @@ void __init serial_init(void)
155} 155}
156#endif 156#endif
157 157
158static int __init lasat_setup(void) 158void __init plat_setup(void)
159{ 159{
160 int i; 160 int i;
161 lasat_misc = &lasat_misc_info[mips_machtype]; 161 lasat_misc = &lasat_misc_info[mips_machtype];
@@ -185,8 +185,4 @@ static int __init lasat_setup(void)
185 change_c0_status(ST0_BEV,0); 185 change_c0_status(ST0_BEV,0);
186 186
187 prom_printf("Lasat specific initialization complete\n"); 187 prom_printf("Lasat specific initialization complete\n");
188
189 return 0;
190} 188}
191
192early_initcall(lasat_setup);
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index 0a1dd9bbc02e..625843b30bed 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -50,8 +50,10 @@ const char *get_system_type(void)
50 return "MIPS Atlas"; 50 return "MIPS Atlas";
51} 51}
52 52
53static int __init atlas_setup(void) 53void __init plat_setup(void)
54{ 54{
55 mips_pcibios_init();
56
55 ioport_resource.end = 0x7fffffff; 57 ioport_resource.end = 0x7fffffff;
56 58
57 serial_init (); 59 serial_init ();
@@ -64,12 +66,8 @@ static int __init atlas_setup(void)
64 board_time_init = mips_time_init; 66 board_time_init = mips_time_init;
65 board_timer_setup = mips_timer_setup; 67 board_timer_setup = mips_timer_setup;
66 rtc_get_time = mips_rtc_get_time; 68 rtc_get_time = mips_rtc_get_time;
67
68 return 0;
69} 69}
70 70
71early_initcall(atlas_setup);
72
73static void __init serial_init(void) 71static void __init serial_init(void)
74{ 72{
75#ifdef CONFIG_SERIAL_8250 73#ifdef CONFIG_SERIAL_8250
diff --git a/arch/mips/mips-boards/generic/pci.c b/arch/mips/mips-boards/generic/pci.c
index 92c34bda02ae..5dadedffba13 100644
--- a/arch/mips/mips-boards/generic/pci.c
+++ b/arch/mips/mips-boards/generic/pci.c
@@ -109,7 +109,7 @@ static struct pci_controller msc_controller = {
109 .io_offset = 0x00000000UL, 109 .io_offset = 0x00000000UL,
110}; 110};
111 111
112static int __init pcibios_init(void) 112void __init mips_pcibios_init(void)
113{ 113{
114 struct pci_controller *controller; 114 struct pci_controller *controller;
115 115
@@ -150,14 +150,10 @@ static int __init pcibios_init(void)
150 controller = &msc_controller; 150 controller = &msc_controller;
151 break; 151 break;
152 default: 152 default:
153 return 1; 153 return;
154 } 154 }
155 155
156 ioport_resource.end = controller->io_resource->end; 156 ioport_resource.end = controller->io_resource->end;
157 157
158 register_pci_controller (controller); 158 register_pci_controller (controller);
159
160 return 0;
161} 159}
162
163early_initcall(pcibios_init);
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index df6db6419ae9..2209e8a9de34 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -111,10 +111,12 @@ void __init fd_activate(void)
111} 111}
112#endif 112#endif
113 113
114static int __init malta_setup(void) 114void __init plat_setup(void)
115{ 115{
116 unsigned int i; 116 unsigned int i;
117 117
118 mips_pcibios_init();
119
118 /* Request I/O space for devices used on the Malta board. */ 120 /* Request I/O space for devices used on the Malta board. */
119 for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++) 121 for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++)
120 request_resource(&ioport_resource, standard_io_resources+i); 122 request_resource(&ioport_resource, standard_io_resources+i);
@@ -224,8 +226,4 @@ static int __init malta_setup(void)
224 board_time_init = mips_time_init; 226 board_time_init = mips_time_init;
225 board_timer_setup = mips_timer_setup; 227 board_timer_setup = mips_timer_setup;
226 rtc_get_time = mips_rtc_get_time; 228 rtc_get_time = mips_rtc_get_time;
227
228 return 0;
229} 229}
230
231early_initcall(malta_setup);
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
index 29892b88a4fc..de90bec5505e 100644
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ b/arch/mips/mips-boards/sead/sead_setup.c
@@ -57,8 +57,6 @@ static void __init sead_setup(void)
57 mips_reboot_setup(); 57 mips_reboot_setup();
58} 58}
59 59
60early_initcall(sead_setup);
61
62static void __init serial_init(void) 60static void __init serial_init(void)
63{ 61{
64#ifdef CONFIG_SERIAL_8250 62#ifdef CONFIG_SERIAL_8250
diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c
index 90288cf2b1e0..768bf4406452 100644
--- a/arch/mips/momentum/jaguar_atx/setup.c
+++ b/arch/mips/momentum/jaguar_atx/setup.c
@@ -351,7 +351,7 @@ static __init int __init ja_pci_init(void)
351 351
352arch_initcall(ja_pci_init); 352arch_initcall(ja_pci_init);
353 353
354static int __init momenco_jaguar_atx_setup(void) 354void __init plat_setup(void)
355{ 355{
356 unsigned int tmpword; 356 unsigned int tmpword;
357 357
@@ -467,8 +467,4 @@ static int __init momenco_jaguar_atx_setup(void)
467 467
468 } 468 }
469#endif 469#endif
470
471 return 0;
472} 470}
473
474early_initcall(momenco_jaguar_atx_setup);
diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c
index ce2efcbab7aa..a7803e08f9db 100644
--- a/arch/mips/momentum/ocelot_3/setup.c
+++ b/arch/mips/momentum/ocelot_3/setup.c
@@ -307,7 +307,7 @@ static __init int __init ja_pci_init(void)
307 307
308arch_initcall(ja_pci_init); 308arch_initcall(ja_pci_init);
309 309
310static int __init momenco_ocelot_3_setup(void) 310void __init plat_setup(void)
311{ 311{
312 unsigned int tmpword; 312 unsigned int tmpword;
313 313
@@ -391,8 +391,4 @@ static int __init momenco_ocelot_3_setup(void)
391 391
392 /* Support for 128 MB memory */ 392 /* Support for 128 MB memory */
393 add_memory_region(0x0, 0x08000000, BOOT_MEM_RAM); 393 add_memory_region(0x0, 0x08000000, BOOT_MEM_RAM);
394
395 return 0;
396} 394}
397
398early_initcall(momenco_ocelot_3_setup);
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c
index 844ddd06349b..ce70fc96f160 100644
--- a/arch/mips/momentum/ocelot_c/setup.c
+++ b/arch/mips/momentum/ocelot_c/setup.c
@@ -222,7 +222,7 @@ void momenco_time_init(void)
222 rtc_set_time = m48t37y_set_time; 222 rtc_set_time = m48t37y_set_time;
223} 223}
224 224
225static void __init momenco_ocelot_c_setup(void) 225void __init plat_setup(void)
226{ 226{
227 unsigned int tmpword; 227 unsigned int tmpword;
228 228
@@ -340,8 +340,6 @@ static void __init momenco_ocelot_c_setup(void)
340 } 340 }
341} 341}
342 342
343early_initcall(momenco_ocelot_c_setup);
344
345#ifndef CONFIG_64BIT 343#ifndef CONFIG_64BIT
346/* This needs to be one of the first initcalls, because no I/O port access 344/* This needs to be one of the first initcalls, because no I/O port access
347 can work before this */ 345 can work before this */
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c
index 38a78ab8c830..6336751391c3 100644
--- a/arch/mips/momentum/ocelot_g/setup.c
+++ b/arch/mips/momentum/ocelot_g/setup.c
@@ -160,7 +160,7 @@ static void __init setup_l3cache(unsigned long size)
160 printk("Done\n"); 160 printk("Done\n");
161} 161}
162 162
163static int __init momenco_ocelot_g_setup(void) 163void __init plat_setup(void)
164{ 164{
165 void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache); 165 void (*l3func)(unsigned long) = (void *) KSEG1ADDR(setup_l3cache);
166 unsigned int tmpword; 166 unsigned int tmpword;
@@ -240,12 +240,8 @@ static int __init momenco_ocelot_g_setup(void)
240 240
241 /* FIXME: Fix up the DiskOnChip mapping */ 241 /* FIXME: Fix up the DiskOnChip mapping */
242 MV_WRITE(0x468, 0xfef73); 242 MV_WRITE(0x468, 0xfef73);
243
244 return 0;
245} 243}
246 244
247early_initcall(momenco_ocelot_g_setup);
248
249/* This needs to be one of the first initcalls, because no I/O port access 245/* This needs to be one of the first initcalls, because no I/O port access
250 can work before this */ 246 can work before this */
251 247
diff --git a/arch/mips/pci/pci-lasat.c b/arch/mips/pci/pci-lasat.c
index ae3cc4b254b5..86937903a9b5 100644
--- a/arch/mips/pci/pci-lasat.c
+++ b/arch/mips/pci/pci-lasat.c
@@ -52,9 +52,11 @@ static int __init lasat_pci_setup(void)
52 } 52 }
53 53
54 register_pci_controller(&lasat_pci_controller); 54 register_pci_controller(&lasat_pci_controller);
55 return 0; 55
56 return 0;
56} 57}
57early_initcall(lasat_pci_setup); 58
59arch_initcall(lasat_pci_setup);
58 60
59#define LASATINT_ETH1 0 61#define LASATINT_ETH1 0
60#define LASATINT_ETH0 1 62#define LASATINT_ETH0 1
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 7225bbf20ce4..bdc2ab55bed6 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -212,7 +212,7 @@ static void __init py_late_time_init(void)
212 py_rtc_setup(); 212 py_rtc_setup();
213} 213}
214 214
215static int __init pmc_yosemite_setup(void) 215void __init plat_setup(void)
216{ 216{
217 board_time_init = yosemite_time_init; 217 board_time_init = yosemite_time_init;
218 late_time_init = py_late_time_init; 218 late_time_init = py_late_time_init;
@@ -228,8 +228,4 @@ static int __init pmc_yosemite_setup(void)
228 OCD_WRITE(RM9000x2_OCD_HTBAR0, HYPERTRANSPORT_BAR0_ADDR); 228 OCD_WRITE(RM9000x2_OCD_HTBAR0, HYPERTRANSPORT_BAR0_ADDR);
229 OCD_WRITE(RM9000x2_OCD_HTMASK0, HYPERTRANSPORT_SIZE0); 229 OCD_WRITE(RM9000x2_OCD_HTMASK0, HYPERTRANSPORT_SIZE0);
230#endif 230#endif
231
232 return 0;
233} 231}
234
235early_initcall(pmc_yosemite_setup);
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
index 0e96a5d67993..5e59b4c8876b 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -53,7 +53,7 @@ EXPORT_SYMBOL(ip22_do_break);
53extern void ip22_be_init(void) __init; 53extern void ip22_be_init(void) __init;
54extern void ip22_time_init(void) __init; 54extern void ip22_time_init(void) __init;
55 55
56static int __init ip22_setup(void) 56void __init plat_setup(void)
57{ 57{
58 char *ctype; 58 char *ctype;
59 59
@@ -137,8 +137,4 @@ static int __init ip22_setup(void)
137 } 137 }
138 } 138 }
139#endif 139#endif
140
141 return 0;
142} 140}
143
144early_initcall(ip22_setup);
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index 6dcee5c46c74..ad1e86b54fae 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -198,7 +198,7 @@ extern void ip27_setup_console(void);
198extern void ip27_time_init(void); 198extern void ip27_time_init(void);
199extern void ip27_reboot_setup(void); 199extern void ip27_reboot_setup(void);
200 200
201static int __init ip27_setup(void) 201void __init plat_setup(void)
202{ 202{
203 hubreg_t p, e, n_mode; 203 hubreg_t p, e, n_mode;
204 nasid_t nid; 204 nasid_t nid;
@@ -245,8 +245,4 @@ static int __init ip27_setup(void)
245 set_io_port_base(IO_BASE); 245 set_io_port_base(IO_BASE);
246 246
247 board_time_init = ip27_time_init; 247 board_time_init = ip27_time_init;
248
249 return 0;
250} 248}
251
252early_initcall(ip27_setup);
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
index 8d270be58224..d10a269aeae1 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -92,7 +92,7 @@ void __init ip32_timer_setup(struct irqaction *irq)
92 setup_irq(IP32_R4K_TIMER_IRQ, irq); 92 setup_irq(IP32_R4K_TIMER_IRQ, irq);
93} 93}
94 94
95static int __init ip32_setup(void) 95void __init plat_setup(void)
96{ 96{
97 board_be_init = ip32_be_init; 97 board_be_init = ip32_be_init;
98 98
@@ -152,8 +152,4 @@ static int __init ip32_setup(void)
152 } 152 }
153 } 153 }
154#endif 154#endif
155
156 return 0;
157} 155}
158
159early_initcall(ip32_setup);
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index 4daeaa413def..b8be07f061ee 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -84,7 +84,7 @@ int swarm_be_handler(struct pt_regs *regs, int is_fixup)
84 return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL); 84 return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL);
85} 85}
86 86
87static int __init swarm_setup(void) 87void __init plat_setup(void)
88{ 88{
89 sb1250_setup(); 89 sb1250_setup();
90 90
@@ -133,12 +133,8 @@ static int __init swarm_setup(void)
133 }; 133 };
134 /* XXXKW for CFE, get lines/cols from environment */ 134 /* XXXKW for CFE, get lines/cols from environment */
135#endif 135#endif
136
137 return 0;
138} 136}
139 137
140early_initcall(swarm_setup);
141
142#ifdef LEDS_PHYS 138#ifdef LEDS_PHYS
143 139
144#ifdef CONFIG_SIBYTE_CARMEL 140#ifdef CONFIG_SIBYTE_CARMEL
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 1b3f8a0903e1..262c85680709 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -167,7 +167,7 @@ static inline void sni_pcimt_time_init(void)
167 rtc_set_time = mc146818_set_rtc_mmss; 167 rtc_set_time = mc146818_set_rtc_mmss;
168} 168}
169 169
170static int __init sni_rm200_pci_setup(void) 170void __init plat_setup(void)
171{ 171{
172 sni_pcimt_detect(); 172 sni_pcimt_detect();
173 sni_pcimt_sc_init(); 173 sni_pcimt_sc_init();
@@ -196,8 +196,4 @@ static int __init sni_rm200_pci_setup(void)
196#ifdef CONFIG_PCI 196#ifdef CONFIG_PCI
197 register_pci_controller(&sni_controller); 197 register_pci_controller(&sni_controller);
198#endif 198#endif
199
200 return 0;
201} 199}
202
203early_initcall(sni_rm200_pci_setup);
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c
index 26d7c53612a8..edc25d89a782 100644
--- a/arch/mips/tx4927/common/tx4927_setup.c
+++ b/arch/mips/tx4927/common/tx4927_setup.c
@@ -76,12 +76,8 @@ static void __init tx4927_setup(void)
76 toshiba_rbtx4927_setup(); 76 toshiba_rbtx4927_setup();
77 } 77 }
78#endif 78#endif
79
80 return;
81} 79}
82 80
83early_initcall(tx4927_setup);
84
85void __init tx4927_time_init(void) 81void __init tx4927_time_init(void)
86{ 82{
87 83
diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c
index e03be896cbc4..578f6496ffd4 100644
--- a/arch/mips/vr41xx/common/init.c
+++ b/arch/mips/vr41xx/common/init.c
@@ -58,6 +58,14 @@ static void __init timer_init(void)
58 board_timer_setup = setup_timer_irq; 58 board_timer_setup = setup_timer_irq;
59} 59}
60 60
61void __init plat_setup(void)
62{
63 vr41xx_calculate_clock_frequency();
64
65 timer_init();
66 iomem_resource_init();
67}
68
61void __init prom_init(void) 69void __init prom_init(void)
62{ 70{
63 int argc, i; 71 int argc, i;
@@ -71,12 +79,6 @@ void __init prom_init(void)
71 if (i < (argc - 1)) 79 if (i < (argc - 1))
72 strcat(arcs_cmdline, " "); 80 strcat(arcs_cmdline, " ");
73 } 81 }
74
75 vr41xx_calculate_clock_frequency();
76
77 timer_init();
78
79 iomem_resource_init();
80} 82}
81 83
82unsigned long __init prom_free_prom_memory (void) 84unsigned long __init prom_free_prom_memory (void)
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
index db686ce42e85..53272a5c3cbe 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/setup.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
@@ -56,7 +56,7 @@ static struct mtd_partition cmbvr4133_mtd_parts[] = {
56 56
57extern void i8259_init(void); 57extern void i8259_init(void);
58 58
59static int __init nec_cmbvr4133_setup(void) 59static void __init nec_cmbvr4133_setup(void)
60{ 60{
61#ifdef CONFIG_ROCKHOPPER 61#ifdef CONFIG_ROCKHOPPER
62 extern void disable_pcnet(void); 62 extern void disable_pcnet(void);
@@ -90,7 +90,4 @@ static int __init nec_cmbvr4133_setup(void)
90#ifdef CONFIG_ROCKHOPPER 90#ifdef CONFIG_ROCKHOPPER
91 i8259_init(); 91 i8259_init();
92#endif 92#endif
93 return 0;
94} 93}
95
96early_initcall(nec_cmbvr4133_setup);
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h
index 65d1d16eab16..ed01124561c1 100644
--- a/include/asm-mips/mips-boards/generic.h
+++ b/include/asm-mips/mips-boards/generic.h
@@ -79,4 +79,10 @@
79 79
80extern unsigned int mips_revision_corid; 80extern unsigned int mips_revision_corid;
81 81
82#ifdef CONFIG_PCI
83extern void mips_pcibios_init(void);
84#else
85#define mips_pcibios_init() do { } while (0)
86#endif
87
82#endif /* __ASM_MIPS_BOARDS_GENERIC_H */ 88#endif /* __ASM_MIPS_BOARDS_GENERIC_H */