aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_fdt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_fdt.h')
-rw-r--r--include/linux/of_fdt.h18
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;
47extern char __dtb_start[]; 44extern char __dtb_start[];
48extern char __dtb_end[]; 45extern char __dtb_end[];
49 46
47/* Other Prototypes */
48extern u64 of_flat_dt_translate_address(unsigned long node);
49extern 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 */
51extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, 54extern 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);
77extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size); 80extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size);
78extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, 81extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size,
79 bool no_map); 82 bool no_map);
80extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
81extern u64 dt_mem_next_cell(int s, const __be32 **cellp); 83extern 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);
97extern void unflatten_and_copy_device_tree(void); 99extern void unflatten_and_copy_device_tree(void);
98extern void early_init_devtree(void *); 100extern void early_init_devtree(void *);
99extern void early_get_first_memblock_info(void *, phys_addr_t *); 101extern void early_get_first_memblock_info(void *, phys_addr_t *);
100extern u64 of_flat_dt_translate_address(unsigned long node); 102#else /* CONFIG_OF_EARLY_FLATTREE */
101extern void of_fdt_limit_memory(int limit);
102#else /* CONFIG_OF_FLATTREE */
103static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } 103static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
104static inline void early_init_fdt_scan_reserved_mem(void) {} 104static inline void early_init_fdt_scan_reserved_mem(void) {}
105static inline void early_init_fdt_reserve_self(void) {} 105static inline void early_init_fdt_reserve_self(void) {}
106static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } 106static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
107static inline void unflatten_device_tree(void) {} 107static inline void unflatten_device_tree(void) {}
108static inline void unflatten_and_copy_device_tree(void) {} 108static 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 */