Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sebastian Andrzej Siewior and committed by
Thomas Gleixner
1fa4163b bcc7c124

+19 -7
+19 -7
arch/x86/platform/ce4100/ce4100.c
··· 15 15 #include <linux/serial_reg.h> 16 16 #include <linux/serial_8250.h> 17 17 18 + #include <asm/prom.h> 18 19 #include <asm/setup.h> 20 + #include <asm/i8259.h> 19 21 #include <asm/io.h> 22 + #include <asm/io_apic.h> 20 23 21 24 static int ce4100_i8042_detect(void) 22 25 { 23 26 return 0; 24 27 } 25 28 26 - static void __init sdv_find_smp_config(void) 27 - { 28 - } 29 - 30 29 #ifdef CONFIG_SERIAL_8250 31 - 32 30 33 31 static unsigned int mem_serial_in(struct uart_port *p, int offset) 34 32 { ··· 116 118 sdv_serial_fixup(); 117 119 } 118 120 121 + #ifdef CONFIG_X86_IO_APIC 122 + static void __cpuinit sdv_pci_init(void) 123 + { 124 + x86_of_pci_init(); 125 + /* We can't set this earlier, because we need to calibrate the timer */ 126 + legacy_pic = &null_legacy_pic; 127 + } 128 + #endif 129 + 119 130 /* 120 131 * CE4100 specific x86_init function overrides and early setup 121 132 * calls. ··· 134 127 x86_init.oem.arch_setup = sdv_arch_setup; 135 128 x86_platform.i8042_detect = ce4100_i8042_detect; 136 129 x86_init.resources.probe_roms = x86_init_noop; 137 - x86_init.mpparse.get_smp_config = x86_init_uint_noop; 138 - x86_init.mpparse.find_smp_config = sdv_find_smp_config; 130 + x86_init.mpparse.get_smp_config = x86_dtb_get_config; 131 + x86_init.mpparse.find_smp_config = x86_dtb_find_config; 132 + 133 + #ifdef CONFIG_X86_IO_APIC 134 + x86_init.pci.init_irq = sdv_pci_init; 135 + x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; 136 + #endif 139 137 }