5 #include <linux/export.h>
9 #include <linux/list.h>
15 #include <linux/slab.h>
16 #include <linux/pci.h>
34 BUG_ON(address >= (1 << 16));
54 #ifdef CONFIG_BLK_DEV_INITRD
73 { .compatible =
"intel,ce4100-cp", },
74 { .compatible =
"isa", },
75 { .compatible =
"pci", },
79 static int __init add_bus_probe(
void)
81 if (!of_have_populated_dt())
84 return of_platform_bus_probe(
NULL, ce4100_ids,
NULL);
93 for_each_node_by_type(np,
"pci") {
101 if (bus->
number == bus_min)
107 static int x86_of_pci_irq_enable(
struct pci_dev *
dev)
132 static void x86_of_pci_irq_disable(
struct pci_dev *dev)
143 static void __init dtb_setup_hpet(
void)
145 #ifdef CONFIG_HPET_TIMER
162 static void __init dtb_lapic_setup(
void)
164 #ifdef CONFIG_X86_LOCAL_APIC
190 #ifdef CONFIG_X86_IO_APIC
191 static unsigned int ioapic_id;
207 static void __init dtb_ioapic_setup(
void)
211 for_each_compatible_node(dn,
NULL,
"intel,ce4100-ioapic")
221 static void __init dtb_ioapic_setup(
void) {}
224 static void __init dtb_apic_setup(
void)
230 #ifdef CONFIG_OF_FLATTREE
231 static void __init x86_flattree_get_config(
void)
244 if (map_len < size) {
257 of_scan_flat_dt(early_init_dt_scan_root,
NULL);
259 unflatten_device_tree();
262 static inline void x86_flattree_get_config(
void) { }
267 x86_flattree_get_config();
269 if (!of_have_populated_dt())
276 #ifdef CONFIG_X86_IO_APIC
278 struct of_ioapic_type {
284 static struct of_ioapic_type of_ioapic_type[] =
308 static int ioapic_xlate(
struct irq_domain *domain,
310 const u32 *intspec,
u32 intsize,
314 struct of_ioapic_type *it;
326 it = &of_ioapic_type[intspec[1]];
329 set_io_apic_irq_attr(&
attr, idx, line, it->trigger, it->polarity);
337 *out_type = it->out_type;
342 .
xlate = ioapic_xlate,
345 static void dt_add_ioapic_domain(
unsigned int ioapic_num,
349 struct mp_ioapic_gsi *gsi_cfg;
354 num = gsi_cfg->gsi_end - gsi_cfg->gsi_base + 1;
359 if (gsi_cfg->gsi_base == 0) {
369 pr_err(
"Error mapping legacy IRQs: %d\n", ret);
375 pr_err(
"Error creating mapping for the "
376 "remaining IRQs: %d\n", ret);
382 pr_err(
"Error creating IRQ mapping: %d\n", ret);
400 dt_add_ioapic_domain(i, np);
411 if (!of_have_populated_dt())
414 for_each_node_with_property(dp,
"interrupt-controller") {
416 ioapic_add_ofnode(dp);