dect
/
linux-2.6
Archived
13
0
Fork 0

x86: ce4100: Set pci ops via callback instead of module init

Setting the pci ops on subsys initcall unconditionally will break
multi platform kernels on anything except ce4100.

Use x86_init.pci.init ops to call this only on real ce4100 platforms.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: sodaville@linutronix.de
LKML-Reference: <20110314093340.GA21026@www.tglx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Sebastian Andrzej Siewior 2011-03-14 10:33:40 +01:00 committed by Thomas Gleixner
parent a79e53d856
commit 03150171dc
3 changed files with 12 additions and 3 deletions

View File

@ -0,0 +1,6 @@
#ifndef _ASM_CE4100_H_
#define _ASM_CE4100_H_
int ce4100_pci_init(void);
#endif

View File

@ -34,6 +34,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/ce4100.h>
#include <asm/pci_x86.h>
struct sim_reg {
@ -306,10 +307,10 @@ struct pci_raw_ops ce4100_pci_conf = {
.write = ce4100_conf_write,
};
static int __init ce4100_pci_init(void)
int __init ce4100_pci_init(void)
{
init_sim_regs();
raw_pci_ops = &ce4100_pci_conf;
return 0;
/* Indicate caller that it should invoke pci_legacy_init() */
return 1;
}
subsys_initcall(ce4100_pci_init);

View File

@ -15,6 +15,7 @@
#include <linux/serial_reg.h>
#include <linux/serial_8250.h>
#include <asm/ce4100.h>
#include <asm/setup.h>
#include <asm/io.h>
@ -129,4 +130,5 @@ void __init x86_ce4100_early_setup(void)
x86_init.resources.probe_roms = x86_init_noop;
x86_init.mpparse.get_smp_config = x86_init_uint_noop;
x86_init.mpparse.find_smp_config = sdv_find_smp_config;
x86_init.pci.init = ce4100_pci_init;
}