Skip to content

Commit

Permalink
Get rid of early_init. There's more need to make this form of
Browse files Browse the repository at this point in the history
initialization actually useful and as is certainly unmergable with
upstream.

Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
ralfbaechle committed Oct 29, 2005
1 parent 8c93650 commit c83cfc9
Show file tree
Hide file tree
Showing 34 changed files with 53 additions and 161 deletions.
6 changes: 1 addition & 5 deletions arch/mips/au1000/common/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ extern void au1xxx_time_init(void);
extern void au1xxx_timer_setup(struct irqaction *irq);
extern void set_cpuspec(void);

static int __init au1x00_setup(void)
void __init plat_setup(void)
{
struct cpu_spec *sp;
char *argptr;
Expand Down Expand Up @@ -153,12 +153,8 @@ static int __init au1x00_setup(void)
au_sync();
while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S);
au_writel(0, SYS_TOYTRIM);

return 0;
}

early_initcall(au1x00_setup);

#if defined(CONFIG_64BIT_PHYS_ADDR)
/* This routine should be valid for all Au1x based boards */
phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size)
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/cobalt/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static struct pci_controller cobalt_pci_controller = {
.io_offset = 0x00001000UL - GT64111_IO_BASE
};

static void __init cobalt_setup(void)
void __init plat_setup(void)
{
unsigned int devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0);
int i;
Expand Down Expand Up @@ -125,8 +125,6 @@ static void __init cobalt_setup(void)
#endif
}

early_initcall(cobalt_setup);

/*
* Prom init. We read our one and only communication with the firmware.
* Grab the amount of installed memory
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/ddb5xxx/ddb5074/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static void __init ddb_time_init(void)



static void __init ddb5074_setup(void)
void __init plat_setup(void)
{
set_io_port_base(NILE4_PCI_IO_BASE);
isa_slot_offset = NILE4_PCI_MEM_BASE;
Expand All @@ -106,8 +106,6 @@ static void __init ddb5074_setup(void)
panic_timeout = 180;
}

early_initcall(ddb5074_setup);

#define USE_NILE4_SERIAL 0

#if USE_NILE4_SERIAL
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/ddb5xxx/ddb5476/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static struct {

static void ddb5476_board_init(void);

static void __init ddb5476_setup(void)
void __init plat_setup(void)
{
set_io_port_base(KSEG1ADDR(DDB_PCI_IO_BASE));

Expand Down Expand Up @@ -158,8 +158,6 @@ static void __init ddb5476_setup(void)
ddb5476_board_init();
}

early_initcall(ddb5476_setup);

/*
* We don't trust bios. We essentially does hardware re-initialization
* as complete as possible, as far as we know we can safely do.
Expand Down
6 changes: 1 addition & 5 deletions arch/mips/ddb5xxx/ddb5477/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static void ddb5477_board_init(void);
extern struct pci_controller ddb5477_ext_controller;
extern struct pci_controller ddb5477_io_controller;

static int ddb5477_setup(void)
void __init plat_setup(void)
{
/* initialize board - we don't trust the loader */
ddb5477_board_init();
Expand All @@ -193,12 +193,8 @@ static int ddb5477_setup(void)

register_pci_controller (&ddb5477_ext_controller);
register_pci_controller (&ddb5477_io_controller);

return 0;
}

early_initcall(ddb5477_setup);

static void __init ddb5477_board_init(void)
{
/* ----------- setup PDARs ------------ */
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/dec/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void __init dec_be_init(void)
extern void dec_time_init(void);
extern void dec_timer_setup(struct irqaction *);

static void __init decstation_setup(void)
void __init plat_setup(void)
{
board_be_init = dec_be_init;
board_time_init = dec_time_init;
Expand All @@ -141,8 +141,6 @@ static void __init decstation_setup(void)
_machine_power_off = dec_machine_power_off;
}

early_initcall(decstation_setup);

/*
* Machine-specific initialisation for KN01, aka DS2100 (aka Pmin)
* or DS3100 (aka Pmax).
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/galileo-boards/ev96100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ extern void mips_reboot_setup(void);

unsigned char mac_0_1[12];

static void __init ev96100_setup(void)
void __init plat_setup(void)
{
unsigned int config = read_c0_config();
unsigned int status = read_c0_status();
Expand Down Expand Up @@ -142,8 +142,6 @@ static void __init ev96100_setup(void)
tmp = GT_READ(GT_PCI0_CFGDATA_OFS);
}

early_initcall(ev96100_setup);

unsigned short get_gt_devid(void)
{
u32 gt_devid;
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/gt64120/ev64120/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ unsigned long __init prom_free_prom_memory(void)
*/
extern void gt64120_time_init(void);

static void __init ev64120_setup(void)
void __init plat_setup(void)
{
_machine_restart = galileo_machine_restart;
_machine_halt = galileo_machine_halt;
Expand All @@ -79,8 +79,6 @@ static void __init ev64120_setup(void)
set_io_port_base(KSEG1);
}

early_initcall(ev64120_setup);

const char *get_system_type(void)
{
return "Galileo EV64120A";
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/gt64120/momenco_ocelot/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void PMON_v2_setup()
gt64120_base = 0xe0000000;
}

static void __init momenco_ocelot_setup(void)
void __init plat_setup(void)
{
void (*l3func)(unsigned long)=KSEG1ADDR(&setup_l3cache);
unsigned int tmpword;
Expand Down Expand Up @@ -307,8 +307,6 @@ static void __init momenco_ocelot_setup(void)
GT_WRITE(GT_DEV_B3_OFS, 0xfef73);
}

early_initcall(momenco_ocelot_setup);

extern int rm7k_tcache_enabled;
/*
* This runs in KSEG1. See the verbiage in rm7k.c::probe_scache()
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/ite-boards/generic/it8172_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void __init it8172_init_ram_resource(unsigned long memsize)
it8172_resources.ram.end = memsize;
}

static void __init it8172_setup(void)
void __init plat_setup(void)
{
unsigned short dsr;
char *argptr;
Expand Down Expand Up @@ -251,8 +251,6 @@ static void __init it8172_setup(void)
#endif /* CONFIG_IT8172_SCR1 */
}

early_initcall(it8172_setup);

#ifdef CONFIG_SERIO_I8042
/*
* According to the ITE Special BIOS Note for waking up the
Expand Down
4 changes: 1 addition & 3 deletions arch/mips/jazz/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static struct resource jazz_io_resources[] = {
{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
};

static void __init jazz_setup(void)
void __init plat_setup(void)
{
int i;

Expand Down Expand Up @@ -97,5 +97,3 @@ static void __init jazz_setup(void)

vdma_init();
}

early_initcall(jazz_setup);
7 changes: 2 additions & 5 deletions arch/mips/jmr3927/rbhma3100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static void jmr3927_board_init(void);
extern struct resource pci_io_resource;
extern struct resource pci_mem_resource;

static void __init jmr3927_setup(void)
void __init plat_setup(void)
{
char *argptr;

Expand Down Expand Up @@ -274,9 +274,6 @@ static void __init jmr3927_setup(void)
#endif
}

early_initcall(jmr3927_setup);


static void tx3927_setup(void);

#ifdef CONFIG_PCI
Expand Down Expand Up @@ -335,7 +332,7 @@ static void __init jmr3927_board_init(void)
jmr3927_io_dipsw());
}

static void __init tx3927_setup(void)
void __init plat_setup(void)
{
int i;

Expand Down
28 changes: 2 additions & 26 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,31 +510,7 @@ static inline void resource_init(void)
#undef MAXMEM
#undef MAXMEM_PFN

static int __initdata earlyinit_debug;

static int __init earlyinit_debug_setup(char *str)
{
earlyinit_debug = 1;
return 1;
}
__setup("earlyinit_debug", earlyinit_debug_setup);

extern initcall_t __earlyinitcall_start, __earlyinitcall_end;

static void __init do_earlyinitcalls(void)
{
initcall_t *call, *start, *end;

start = &__earlyinitcall_start;
end = &__earlyinitcall_end;

for (call = start; call < end; call++) {
if (earlyinit_debug)
printk("calling earlyinitcall 0x%p\n", *call);

(*call)();
}
}
extern void plat_setup(void);

void __init setup_arch(char **cmdline_p)
{
Expand All @@ -551,7 +527,7 @@ void __init setup_arch(char **cmdline_p)
#endif

/* call board setup routine */
do_earlyinitcalls();
plat_setup();

strlcpy(command_line, arcs_cmdline, sizeof(command_line));
strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
Expand Down
6 changes: 0 additions & 6 deletions arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ SECTIONS
.init.setup : { *(.init.setup) }
__setup_end = .;

.early_initcall.init : {
__earlyinitcall_start = .;
*(.initcall.early1.init)
}
__earlyinitcall_end = .;

__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
Expand Down
6 changes: 1 addition & 5 deletions arch/mips/lasat/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void __init serial_init(void)
}
#endif

static int __init lasat_setup(void)
void __init plat_setup(void)
{
int i;
lasat_misc = &lasat_misc_info[mips_machtype];
Expand Down Expand Up @@ -185,8 +185,4 @@ static int __init lasat_setup(void)
change_c0_status(ST0_BEV,0);

prom_printf("Lasat specific initialization complete\n");

return 0;
}

early_initcall(lasat_setup);
8 changes: 3 additions & 5 deletions arch/mips/mips-boards/atlas/atlas_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ const char *get_system_type(void)
return "MIPS Atlas";
}

static int __init atlas_setup(void)
void __init plat_setup(void)
{
mips_pcibios_init();

ioport_resource.end = 0x7fffffff;

serial_init ();
Expand All @@ -64,12 +66,8 @@ static int __init atlas_setup(void)
board_time_init = mips_time_init;
board_timer_setup = mips_timer_setup;
rtc_get_time = mips_rtc_get_time;

return 0;
}

early_initcall(atlas_setup);

static void __init serial_init(void)
{
#ifdef CONFIG_SERIAL_8250
Expand Down
8 changes: 2 additions & 6 deletions arch/mips/mips-boards/generic/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static struct pci_controller msc_controller = {
.io_offset = 0x00000000UL,
};

static int __init pcibios_init(void)
void __init mips_pcibios_init(void)
{
struct pci_controller *controller;

Expand Down Expand Up @@ -150,14 +150,10 @@ static int __init pcibios_init(void)
controller = &msc_controller;
break;
default:
return 1;
return;
}

ioport_resource.end = controller->io_resource->end;

register_pci_controller (controller);

return 0;
}

early_initcall(pcibios_init);
8 changes: 3 additions & 5 deletions arch/mips/mips-boards/malta/malta_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ void __init fd_activate(void)
}
#endif

static int __init malta_setup(void)
void __init plat_setup(void)
{
unsigned int i;

mips_pcibios_init();

/* Request I/O space for devices used on the Malta board. */
for (i = 0; i < ARRAY_SIZE(standard_io_resources); i++)
request_resource(&ioport_resource, standard_io_resources+i);
Expand Down Expand Up @@ -224,8 +226,4 @@ static int __init malta_setup(void)
board_time_init = mips_time_init;
board_timer_setup = mips_timer_setup;
rtc_get_time = mips_rtc_get_time;

return 0;
}

early_initcall(malta_setup);
2 changes: 0 additions & 2 deletions arch/mips/mips-boards/sead/sead_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ static void __init sead_setup(void)
mips_reboot_setup();
}

early_initcall(sead_setup);

static void __init serial_init(void)
{
#ifdef CONFIG_SERIAL_8250
Expand Down
Loading

0 comments on commit c83cfc9

Please sign in to comment.