diff options
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r-- | include/linux/of_fdt.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 013c5418aeec..b9cd9ebdf9b9 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -1,12 +1,9 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
1 | /* | 2 | /* |
2 | * Definitions for working with the Flattened Device Tree data format | 3 | * Definitions for working with the Flattened Device Tree data format |
3 | * | 4 | * |
4 | * Copyright 2009 Benjamin Herrenschmidt, IBM Corp | 5 | * Copyright 2009 Benjamin Herrenschmidt, IBM Corp |
5 | * benh@kernel.crashing.org | 6 | * benh@kernel.crashing.org |
6 | * | ||
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 | * version 2 as published by the Free Software Foundation. | ||
10 | */ | 7 | */ |
11 | 8 | ||
12 | #ifndef _LINUX_OF_FDT_H | 9 | #ifndef _LINUX_OF_FDT_H |
@@ -47,6 +44,12 @@ extern void *initial_boot_params; | |||
47 | extern char __dtb_start[]; | 44 | extern char __dtb_start[]; |
48 | extern char __dtb_end[]; | 45 | extern char __dtb_end[]; |
49 | 46 | ||
47 | /* Other Prototypes */ | ||
48 | extern u64 of_flat_dt_translate_address(unsigned long node); | ||
49 | extern void of_fdt_limit_memory(int limit); | ||
50 | #endif /* CONFIG_OF_FLATTREE */ | ||
51 | |||
52 | #ifdef CONFIG_OF_EARLY_FLATTREE | ||
50 | /* For scanning the flat device-tree at boot time */ | 53 | /* For scanning the flat device-tree at boot time */ |
51 | extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | 54 | extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, |
52 | int depth, void *data), | 55 | int depth, void *data), |
@@ -77,7 +80,6 @@ extern void early_init_dt_add_memory_arch(u64 base, u64 size); | |||
77 | extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size); | 80 | extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size); |
78 | extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, | 81 | extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, |
79 | bool no_map); | 82 | bool no_map); |
80 | extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align); | ||
81 | extern u64 dt_mem_next_cell(int s, const __be32 **cellp); | 83 | extern u64 dt_mem_next_cell(int s, const __be32 **cellp); |
82 | 84 | ||
83 | /* Early flat tree scan hooks */ | 85 | /* Early flat tree scan hooks */ |
@@ -97,16 +99,14 @@ extern void unflatten_device_tree(void); | |||
97 | extern void unflatten_and_copy_device_tree(void); | 99 | extern void unflatten_and_copy_device_tree(void); |
98 | extern void early_init_devtree(void *); | 100 | extern void early_init_devtree(void *); |
99 | extern void early_get_first_memblock_info(void *, phys_addr_t *); | 101 | extern void early_get_first_memblock_info(void *, phys_addr_t *); |
100 | extern u64 of_flat_dt_translate_address(unsigned long node); | 102 | #else /* CONFIG_OF_EARLY_FLATTREE */ |
101 | extern void of_fdt_limit_memory(int limit); | ||
102 | #else /* CONFIG_OF_FLATTREE */ | ||
103 | static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } | 103 | static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } |
104 | static inline void early_init_fdt_scan_reserved_mem(void) {} | 104 | static inline void early_init_fdt_scan_reserved_mem(void) {} |
105 | static inline void early_init_fdt_reserve_self(void) {} | 105 | static inline void early_init_fdt_reserve_self(void) {} |
106 | static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } | 106 | static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } |
107 | static inline void unflatten_device_tree(void) {} | 107 | static inline void unflatten_device_tree(void) {} |
108 | static inline void unflatten_and_copy_device_tree(void) {} | 108 | static inline void unflatten_and_copy_device_tree(void) {} |
109 | #endif /* CONFIG_OF_FLATTREE */ | 109 | #endif /* CONFIG_OF_EARLY_FLATTREE */ |
110 | 110 | ||
111 | #endif /* __ASSEMBLY__ */ | 111 | #endif /* __ASSEMBLY__ */ |
112 | #endif /* _LINUX_OF_FDT_H */ | 112 | #endif /* _LINUX_OF_FDT_H */ |