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 ...
このコミットが含まれているのは:
@@ -1,3 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
config DTC
|
||||
bool
|
||||
|
||||
@@ -13,7 +14,8 @@ if OF
|
||||
|
||||
config OF_UNITTEST
|
||||
bool "Device Tree runtime unit tests"
|
||||
depends on OF_IRQ
|
||||
depends on !SPARC
|
||||
select IRQ_DOMAIN
|
||||
select OF_EARLY_FLATTREE
|
||||
select OF_RESOLVE
|
||||
help
|
||||
@@ -61,7 +63,7 @@ config OF_DYNAMIC
|
||||
|
||||
config OF_ADDRESS
|
||||
def_bool y
|
||||
depends on !SPARC && HAS_IOMEM
|
||||
depends on !SPARC && (HAS_IOMEM || UML)
|
||||
select OF_ADDRESS_PCI if PCI
|
||||
|
||||
config OF_ADDRESS_PCI
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#define pr_fmt(fmt) "OF: " fmt
|
||||
|
||||
#include <linux/device.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Procedures for creating, accessing and interpreting the device tree.
|
||||
*
|
||||
@@ -11,11 +12,6 @@
|
||||
*
|
||||
* Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell and
|
||||
* Grant Likely.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: " fmt
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/string.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/of.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Support for dynamic device trees.
|
||||
*
|
||||
|
@@ -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,14 +1199,13 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
|
||||
&base, &size, nomap ? " (nomap)" : "");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
void * __init __weak early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||
{
|
||||
WARN_ON(1);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||
{
|
||||
return memblock_virt_alloc(size, align);
|
||||
}
|
||||
|
||||
bool __init early_init_dt_verify(void *params)
|
||||
{
|
||||
if (!params)
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* FDT Address translation based on u-boot fdt_support.c which in turn was
|
||||
* based on the kernel unflattened DT address translation code.
|
||||
@@ -6,11 +7,6 @@
|
||||
* Gerald Van Baren, Custom IDEAS, vanbaren@cideas.com
|
||||
*
|
||||
* Copyright 2010-2011 Freescale Semiconductor, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: fdt: " fmt
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Derived from arch/i386/kernel/irq.c
|
||||
* Copyright (C) 1992 Linus Torvalds
|
||||
@@ -8,11 +9,6 @@
|
||||
* Adapted for Power Macintosh by Paul Mackerras
|
||||
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This file contains the code used to make IRQ descriptions in the
|
||||
* device tree to actual irq numbers on an interrupt controller
|
||||
* driver.
|
||||
@@ -83,9 +79,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent);
|
||||
|
||||
/**
|
||||
* of_irq_parse_raw - Low level interrupt tree parsing
|
||||
* @parent: the device interrupt parent
|
||||
* @addr: address specifier (start of "reg" property of the device) in be32 format
|
||||
* @out_irq: structure of_irq updated by this function
|
||||
* @out_irq: structure of_phandle_args updated by this function
|
||||
*
|
||||
* Returns 0 on success and a negative number on error
|
||||
*
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/of.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
@@ -161,4 +162,3 @@ void __of_detach_node_sysfs(struct device_node *np)
|
||||
/* finally remove the kobj_init ref */
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
|
@@ -1,19 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* OF NUMA Parsing support.
|
||||
*
|
||||
* Copyright (C) 2015 - 2016 Cavium Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: NUMA: " fmt
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
#ifndef _LINUX_OF_PRIVATE_H
|
||||
#define _LINUX_OF_PRIVATE_H
|
||||
/*
|
||||
@@ -5,11 +6,6 @@
|
||||
*
|
||||
* Paul Mackerras August 1996.
|
||||
* Copyright (C) 1996-2005 Paul Mackerras.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Device tree based initialization code for reserved memory.
|
||||
*
|
||||
@@ -6,11 +7,6 @@
|
||||
* http://www.samsung.com
|
||||
* Author: Marek Szyprowski <m.szyprowski@samsung.com>
|
||||
* Author: Josh Cartwright <joshc@codeaurora.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License or (at your optional) any later version of the license.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: reserved mem: " fmt
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Functions for working with device tree overlays
|
||||
*
|
||||
* Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
* Copyright (C) 2012 Texas Instruments Inc.
|
||||
*
|
||||
* 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: overlay: " fmt
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/* pdt.c: OF PROM device tree support code.
|
||||
*
|
||||
* Paul Mackerras August 1996.
|
||||
@@ -8,11 +9,6 @@
|
||||
*
|
||||
* Adapted for sparc by David S. Miller davem@davemloft.net
|
||||
* Adapted for multiple architectures by Andres Salomon <dilinger@queued.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@@ -1,15 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp.
|
||||
* <benh@kernel.crashing.org>
|
||||
* and Arnd Bergmann, IBM Corp.
|
||||
* Merged from powerpc/kernel/of_platform.c and
|
||||
* sparc{,64}/kernel/of_device.c by Stephen Rothwell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: " fmt
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* drivers/of/property.c - Procedures for accessing and interpreting
|
||||
* Devicetree properties and graphs.
|
||||
@@ -16,11 +17,6 @@
|
||||
*
|
||||
* Reconsolidated from arch/x/kernel/prom.c by Stephen Rothwell and
|
||||
* Grant Likely.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "OF: " fmt
|
||||
|
@@ -1,12 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Functions for dealing with DT resolution
|
||||
*
|
||||
* Copyright (C) 2012 Pantelis Antoniou <panto@antoniou-consulting.com>
|
||||
* Copyright (C) 2012 Texas Instruments Inc.
|
||||
*
|
||||
* 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: resolver: " fmt
|
||||
|
@@ -2,19 +2,12 @@
|
||||
DTC_FLAGS_testcases := -Wno-interrupts_property
|
||||
obj-y += testcases.dtb.o
|
||||
|
||||
targets += testcases.dtb testcases.dtb.S
|
||||
obj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \
|
||||
overlay_bad_phandle.dtb.o \
|
||||
overlay_bad_symbol.dtb.o \
|
||||
overlay_base.dtb.o
|
||||
|
||||
ifdef CONFIG_OF_OVERLAY
|
||||
|
||||
obj-y += overlay.dtb.o
|
||||
obj-y += overlay_bad_phandle.dtb.o
|
||||
obj-y += overlay_bad_symbol.dtb.o
|
||||
obj-y += overlay_base.dtb.o
|
||||
|
||||
targets += overlay.dtb overlay.dtb.S
|
||||
targets += overlay_bad_phandle.dtb overlay_bad_phandle.dtb.S
|
||||
targets += overlay_bad_symbol.dtb overlay_bad_symbol.dtb.S
|
||||
targets += overlay_base.dtb overlay_base.dtb.S
|
||||
targets += $(foreach suffix, dtb dtb.S, $(patsubst %.dtb.o,%.$(suffix),$(obj-y)))
|
||||
|
||||
# enable creation of __symbols__ node
|
||||
DTC_FLAGS_overlay := -@
|
||||
@@ -22,8 +15,6 @@ DTC_FLAGS_overlay_bad_phandle := -@
|
||||
DTC_FLAGS_overlay_bad_symbol := -@
|
||||
DTC_FLAGS_overlay_base := -@
|
||||
|
||||
endif
|
||||
|
||||
.PRECIOUS: \
|
||||
$(obj)/%.dtb.S \
|
||||
$(obj)/%.dtb
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#define pr_fmt(fmt) "### dt-test ### " fmt
|
||||
|
||||
#include <linux/bootmem.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
@@ -2053,6 +2054,11 @@ static struct overlay_info overlays[] = {
|
||||
|
||||
static struct device_node *overlay_base_root;
|
||||
|
||||
static void * __init dt_alloc_memory(u64 size, u64 align)
|
||||
{
|
||||
return memblock_virt_alloc(size, align);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create base device tree for the overlay unittest.
|
||||
*
|
||||
@@ -2092,8 +2098,7 @@ void __init unittest_unflatten_overlay_base(void)
|
||||
return;
|
||||
}
|
||||
|
||||
info->data = early_init_dt_alloc_memory_arch(size,
|
||||
roundup_pow_of_two(FDT_V17_SIZE));
|
||||
info->data = dt_alloc_memory(size, roundup_pow_of_two(FDT_V17_SIZE));
|
||||
if (!info->data) {
|
||||
pr_err("alloc for dtb 'overlay_base' failed");
|
||||
return;
|
||||
@@ -2102,7 +2107,7 @@ void __init unittest_unflatten_overlay_base(void)
|
||||
memcpy(info->data, info->dtb_begin, size);
|
||||
|
||||
__unflatten_device_tree(info->data, NULL, &info->np_overlay,
|
||||
early_init_dt_alloc_memory_arch, true);
|
||||
dt_alloc_memory, true);
|
||||
overlay_base_root = info->np_overlay;
|
||||
}
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする