.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Device tree support |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Based on MIPS support for CONFIG_OF device tree support |
---|
8 | 9 | * |
---|
9 | 10 | * Copyright (C) 2010 Cisco Systems Inc. <dediao@cisco.com> |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License as published by |
---|
13 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
14 | | - * (at your option) any later version. |
---|
15 | | - * |
---|
16 | | - * This program is distributed in the hope that it will be useful, |
---|
17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
19 | | - * GNU General Public License for more details. |
---|
20 | | - * |
---|
21 | | - * You should have received a copy of the GNU General Public License |
---|
22 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
23 | | - * |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
26 | 13 | #include <linux/init.h> |
---|
27 | 14 | #include <linux/types.h> |
---|
28 | | -#include <linux/bootmem.h> |
---|
| 15 | +#include <linux/memblock.h> |
---|
29 | 16 | #include <linux/of.h> |
---|
30 | 17 | #include <linux/of_fdt.h> |
---|
31 | 18 | #include <linux/io.h> |
---|
32 | 19 | |
---|
33 | 20 | #include <asm/sections.h> |
---|
34 | | - |
---|
35 | | -void __init early_init_dt_add_memory_arch(u64 base, u64 size) |
---|
36 | | -{ |
---|
37 | | - u64 kernel_start = (u64)virt_to_phys(_text); |
---|
38 | | - |
---|
39 | | - if (!memory_size && |
---|
40 | | - (kernel_start >= base) && (kernel_start < (base + size))) |
---|
41 | | - memory_size = size; |
---|
42 | | - |
---|
43 | | -} |
---|
44 | | - |
---|
45 | | -int __init early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, |
---|
46 | | - bool nomap) |
---|
47 | | -{ |
---|
48 | | - reserve_bootmem(base, size, BOOTMEM_DEFAULT); |
---|
49 | | - return 0; |
---|
50 | | -} |
---|
51 | 21 | |
---|
52 | 22 | void __init early_init_devtree(void *params) |
---|
53 | 23 | { |
---|