2 * Definitions for Device tree / OpenFirmware handling on X86
4 * based on arch/powerpc/include/asm/prom.h which is
5 * Copyright (C) 1996-2005 Paul Mackerras.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
13 #ifndef _ASM_X86_PROM_H
14 #define _ASM_X86_PROM_H
18 #include <linux/types.h>
19 #include <linux/pci.h>
22 #include <asm/atomic.h>
23 #include <asm/setup.h>
24 #include <asm/irq_controller.h>
28 extern u64 initial_dtb
;
29 extern void add_dtb(u64 data
);
30 void x86_dtb_find_config(void);
31 void x86_dtb_get_config(unsigned int unused
);
32 void add_interrupt_host(struct irq_domain
*ih
);
33 void __cpuinit
x86_of_pci_init(void);
35 static inline struct device_node
*pci_device_to_OF_node(struct pci_dev
*pdev
)
37 return pdev
? pdev
->dev
.of_node
: NULL
;
40 static inline struct device_node
*pci_bus_to_OF_node(struct pci_bus
*bus
)
42 return pci_device_to_OF_node(bus
->self
);
46 static inline void add_dtb(u64 data
) { }
47 static inline void x86_of_pci_init(void) { }
48 #define x86_dtb_find_config x86_init_noop
49 #define x86_dtb_get_config x86_init_uint_noop
53 extern char cmd_line
[COMMAND_LINE_SIZE
];
55 #define pci_address_to_pio pci_address_to_pio
56 unsigned long pci_address_to_pio(phys_addr_t addr
);
59 * irq_dispose_mapping - Unmap an interrupt
60 * @virq: linux virq number of the interrupt to unmap
62 * FIXME: We really should implement proper virq handling like power,
63 * but that's going to be major surgery.
65 static inline void irq_dispose_mapping(unsigned int virq
) { }
67 #define HAVE_ARCH_DEVTREE_FIXUPS
69 #endif /* __ASSEMBLY__ */