diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 10:57:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 10:57:45 -0800 |
commit | 2bed26606b61a7b20fc1cc54df53c48c06cd9aa8 (patch) | |
tree | 262dba1440bfaa5b30d54d92075699e6732ad1f2 /drivers/of/fdt.c | |
parent | eea43ed86f38347979446905a20792a8be7bf5d1 (diff) | |
parent | 3a6fbcb2e2e4b263df1cc8647ce1858c57ddc805 (diff) | |
download | op-kernel-dev-2bed26606b61a7b20fc1cc54df53c48c06cd9aa8.zip op-kernel-dev-2bed26606b61a7b20fc1cc54df53c48c06cd9aa8.tar.gz |
Merge tag 'devicetree-for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull DeviceTree updates from Rob Herring:
- Convert to use memblock_virt_alloc in DT code which supports
bootmem arches. With this we can remove the arch specific
early_init_dt_alloc_memory_arch() functions.
- Enable running the DT unittests on UML
- Use SPDX license tags on DT files
- Fix early FDT kconfig ifdef logic
- Clean-up unittest Makefile
- Fix function comment for of_irq_parse_raw
- Add missing documentation for linux,initrd-{start,end} properties
- Clean-up of binding examples using uppercase hex
- Add trivial devices W83773G and Infineon TLV493D-A1B6
- Add missing STM32 SoC bindings
- Various small binding doc fixes
* tag 'devicetree-for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (23 commits)
xtensa: remove arch specific early DT functions
x86: remove arch specific early_init_dt_alloc_memory_arch
nios2: remove arch specific early_init_dt_alloc_memory_arch
mips: remove arch specific early_init_dt_alloc_memory_arch
metag: remove arch specific early DT functions
cris: remove arch specific early DT functions
libfdt: remove unnecessary include directive from <linux/libfdt.h>
of: unittest: refactor Makefile
of/fdt: use memblock_virt_alloc for early alloc
of: Use SPDX license tag for DT files
of/fdt: Fix #ifdef dependency of early flattree declarations
dt-bindings: h8300 clocksource: correct spelling of pulse
dt-bindings: imx6q-pcie: Add required property for i.MX6SX
mmc: Don't reference Linux-specific OF_GPIO_ACTIVE_LOW flag in DT binding
dt-bindings: Use lower case hex in unit-addresses
dt-bindings: display: panel: Fix compatible string for Toshiba LT089AC29000
dt-bindings: Add Infineon TLV493D-A1B6
dt-bindings: mailbox: ti,message-manager: Fix interrupt name error
dt-bindings: chosen: Document linux,initrd-{start,end}
dt-bindings: arm: document supported STM32 SoC family
...
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4675e5a..84aa9d6 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Functions for working with the Flattened Device Tree data format * * Copyright 2009 Benjamin Herrenschmidt, IBM Corp * benh@kernel.crashing.org - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. */ #define pr_fmt(fmt) "OF: fdt: " fmt @@ -14,6 +11,7 @@ #include <linux/crc32.h> #include <linux/kernel.h> #include <linux/initrd.h> +#include <linux/bootmem.h> #include <linux/memblock.h> #include <linux/mutex.h> #include <linux/of.h> @@ -1183,14 +1181,6 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, return memblock_reserve(base, size); } -/* - * called from unflatten_device_tree() to bootstrap devicetree itself - * Architectures can override this definition if memblock isn't used - */ -void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align) -{ - return __va(memblock_alloc(size, align)); -} #else void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) { @@ -1209,13 +1199,12 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, &base, &size, nomap ? " (nomap)" : ""); return -ENOSYS; } +#endif -void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align) +static void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) { - WARN_ON(1); - return NULL; + return memblock_virt_alloc(size, align); } -#endif bool __init early_init_dt_verify(void *params) { |