aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2011-02-22 15:07:45 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-23 16:27:54 -0500
commit1fa4163bdc199a0b80f9e333d718b3f65e901593 (patch)
treea55c3aeb2df13246e062ae7cd0a9f9d7ffc1f888 /arch/x86
parentbcc7c1244fcfd852b9f4590935491057e1cab9dd (diff)
x86: ce4100: Use OF to setup devices
Use device tree information to setup IO_APIC configuration, interrupt routing, HPET and everything else which cannot be enumerated by other means. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Cc: sodaville@linutronix.de Cc: devicetree-discuss@lists.ozlabs.org LKML-Reference: <1298405266-1624-11-git-send-email-bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/platform/ce4100/ce4100.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
index d2c0d51a7178..b3436d344b41 100644
--- a/arch/x86/platform/ce4100/ce4100.c
+++ b/arch/x86/platform/ce4100/ce4100.c
@@ -15,21 +15,19 @@
15#include <linux/serial_reg.h> 15#include <linux/serial_reg.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17 17
18#include <asm/prom.h>
18#include <asm/setup.h> 19#include <asm/setup.h>
20#include <asm/i8259.h>
19#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/io_apic.h>
20 23
21static int ce4100_i8042_detect(void) 24static int ce4100_i8042_detect(void)
22{ 25{
23 return 0; 26 return 0;
24} 27}
25 28
26static void __init sdv_find_smp_config(void)
27{
28}
29
30#ifdef CONFIG_SERIAL_8250 29#ifdef CONFIG_SERIAL_8250
31 30
32
33static unsigned int mem_serial_in(struct uart_port *p, int offset) 31static unsigned int mem_serial_in(struct uart_port *p, int offset)
34{ 32{
35 offset = offset << p->regshift; 33 offset = offset << p->regshift;
@@ -118,6 +116,15 @@ static void __init sdv_arch_setup(void)
118 sdv_serial_fixup(); 116 sdv_serial_fixup();
119} 117}
120 118
119#ifdef CONFIG_X86_IO_APIC
120static void __cpuinit sdv_pci_init(void)
121{
122 x86_of_pci_init();
123 /* We can't set this earlier, because we need to calibrate the timer */
124 legacy_pic = &null_legacy_pic;
125}
126#endif
127
121/* 128/*
122 * CE4100 specific x86_init function overrides and early setup 129 * CE4100 specific x86_init function overrides and early setup
123 * calls. 130 * calls.
@@ -127,6 +134,11 @@ void __init x86_ce4100_early_setup(void)
127 x86_init.oem.arch_setup = sdv_arch_setup; 134 x86_init.oem.arch_setup = sdv_arch_setup;
128 x86_platform.i8042_detect = ce4100_i8042_detect; 135 x86_platform.i8042_detect = ce4100_i8042_detect;
129 x86_init.resources.probe_roms = x86_init_noop; 136 x86_init.resources.probe_roms = x86_init_noop;
130 x86_init.mpparse.get_smp_config = x86_init_uint_noop; 137 x86_init.mpparse.get_smp_config = x86_dtb_get_config;
131 x86_init.mpparse.find_smp_config = sdv_find_smp_config; 138 x86_init.mpparse.find_smp_config = x86_dtb_find_config;
139
140#ifdef CONFIG_X86_IO_APIC
141 x86_init.pci.init_irq = sdv_pci_init;
142 x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck;
143#endif
132} 144}