diff options
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r-- | arch/x86/kernel/devicetree.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c new file mode 100644 index 000000000000..0b8f0daef933 --- /dev/null +++ b/arch/x86/kernel/devicetree.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Architecture specific OF callbacks. | ||
3 | */ | ||
4 | #include <linux/bootmem.h> | ||
5 | #include <linux/io.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/of.h> | ||
8 | #include <linux/of_fdt.h> | ||
9 | #include <linux/of_platform.h> | ||
10 | #include <linux/slab.h> | ||
11 | |||
12 | char __initdata cmd_line[COMMAND_LINE_SIZE]; | ||
13 | |||
14 | unsigned int irq_create_of_mapping(struct device_node *controller, | ||
15 | const u32 *intspec, unsigned int intsize) | ||
16 | { | ||
17 | return intspec[0]; | ||
18 | |||
19 | } | ||
20 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); | ||
21 | |||
22 | unsigned long pci_address_to_pio(phys_addr_t address) | ||
23 | { | ||
24 | /* | ||
25 | * The ioport address can be directly used by inX / outX | ||
26 | */ | ||
27 | BUG_ON(address >= (1 << 16)); | ||
28 | return (unsigned long)address; | ||
29 | } | ||
30 | EXPORT_SYMBOL_GPL(pci_address_to_pio); | ||
31 | |||
32 | void __init early_init_dt_scan_chosen_arch(unsigned long node) | ||
33 | { | ||
34 | BUG(); | ||
35 | } | ||
36 | |||
37 | void __init early_init_dt_add_memory_arch(u64 base, u64 size) | ||
38 | { | ||
39 | BUG(); | ||
40 | } | ||
41 | |||
42 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | ||
43 | { | ||
44 | return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS)); | ||
45 | } | ||
46 | |||
47 | void __init add_dtb(u64 data) | ||
48 | { | ||
49 | initial_boot_params = phys_to_virt((u64) (u32) data + | ||
50 | offsetof(struct setup_data, data)); | ||
51 | } | ||