]> Git Repo - linux.git/commitdiff
Merge tag 'devicetree-for-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Thu, 1 Feb 2018 18:57:45 +0000 (10:57 -0800)
committerLinus Torvalds <[email protected]>
Thu, 1 Feb 2018 18:57:45 +0000 (10:57 -0800)
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  2 
arch/xtensa/kernel/setup.c
drivers/of/base.c
drivers/of/property.c
include/linux/of.h
include/linux/of_gpio.h

index a931af9075f29dd383d101bc5318666487b1d6bf,82bd1a94157c23c42febdf9084060573a4bfe2a3..686a27444bba24fcee3812b07c7c44becf93061e
@@@ -20,7 -20,6 +20,6 @@@
  #include <linux/mm.h>
  #include <linux/proc_fs.h>
  #include <linux/screen_info.h>
- #include <linux/bootmem.h>
  #include <linux/kernel.h>
  #include <linux/percpu.h>
  #include <linux/cpu.h>
@@@ -36,7 -35,6 +35,7 @@@
  #endif
  
  #include <asm/bootparam.h>
 +#include <asm/kasan.h>
  #include <asm/mmu_context.h>
  #include <asm/pgtable.h>
  #include <asm/processor.h>
@@@ -157,7 -155,7 +156,7 @@@ static int __init parse_bootparam(cons
        /* Boot parameters must start with a BP_TAG_FIRST tag. */
  
        if (tag->id != BP_TAG_FIRST) {
 -              printk(KERN_WARNING "Invalid boot parameters!\n");
 +              pr_warn("Invalid boot parameters!\n");
                return 0;
        }
  
        /* Parse all tags. */
  
        while (tag != NULL && tag->id != BP_TAG_LAST) {
 -              for (t = &__tagtable_begin; t < &__tagtable_end; t++) {
 +              for (t = &__tagtable_begin; t < &__tagtable_end; t++) {
                        if (tag->id == t->tag) {
                                t->parse(tag);
                                break;
                        }
                }
                if (t == &__tagtable_end)
 -                      printk(KERN_WARNING "Ignoring tag "
 -                             "0x%08x\n", tag->id);
 +                      pr_warn("Ignoring tag 0x%08x\n", tag->id);
                tag = (bp_tag_t*)((unsigned long)(tag + 1) + tag->size);
        }
  
@@@ -208,8 -207,6 +207,8 @@@ static int __init xtensa_dt_io_area(uns
        /* round down to nearest 256MB boundary */
        xtensa_kio_paddr &= 0xf0000000;
  
 +      init_kio();
 +
        return 1;
  }
  #else
@@@ -220,17 -217,6 +219,6 @@@ static int __init xtensa_dt_io_area(uns
  }
  #endif
  
- void __init early_init_dt_add_memory_arch(u64 base, u64 size)
- {
-       size &= PAGE_MASK;
-       memblock_add(base, size);
- }
- void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
- {
-       return __alloc_bootmem(size, align, 0);
- }
  void __init early_init_devtree(void *params)
  {
        early_init_dt_scan(params);
  
  void __init init_arch(bp_tag_t *bp_start)
  {
 +      /* Initialize MMU. */
 +
 +      init_mmu();
 +
 +      /* Initialize initial KASAN shadow map */
 +
 +      kasan_early_init();
 +
        /* Parse boot parameters */
  
        if (bp_start)
        /* Early hook for platforms */
  
        platform_init(bp_start);
 -
 -      /* Initialize MMU. */
 -
 -      init_mmu();
  }
  
  /*
@@@ -283,13 -265,13 +271,13 @@@ extern char _end[]
  extern char _stext[];
  extern char _WindowVectors_text_start;
  extern char _WindowVectors_text_end;
 -extern char _DebugInterruptVector_literal_start;
 +extern char _DebugInterruptVector_text_start;
  extern char _DebugInterruptVector_text_end;
 -extern char _KernelExceptionVector_literal_start;
 +extern char _KernelExceptionVector_text_start;
  extern char _KernelExceptionVector_text_end;
 -extern char _UserExceptionVector_literal_start;
 +extern char _UserExceptionVector_text_start;
  extern char _UserExceptionVector_text_end;
 -extern char _DoubleExceptionVector_literal_start;
 +extern char _DoubleExceptionVector_text_start;
  extern char _DoubleExceptionVector_text_end;
  #if XCHAL_EXCM_LEVEL >= 2
  extern char _Level2InterruptVector_text_start;
@@@ -323,13 -305,6 +311,13 @@@ static inline int mem_reserve(unsigned 
  
  void __init setup_arch(char **cmdline_p)
  {
 +      pr_info("config ID: %08x:%08x\n",
 +              get_sr(SREG_EPC), get_sr(SREG_EXCSAVE));
 +      if (get_sr(SREG_EPC) != XCHAL_HW_CONFIGID0 ||
 +          get_sr(SREG_EXCSAVE) != XCHAL_HW_CONFIGID1)
 +              pr_info("built for config ID: %08x:%08x\n",
 +                      XCHAL_HW_CONFIGID0, XCHAL_HW_CONFIGID1);
 +
        *cmdline_p = command_line;
        platform_setup(cmdline_p);
        strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
        mem_reserve(__pa(&_WindowVectors_text_start),
                    __pa(&_WindowVectors_text_end));
  
 -      mem_reserve(__pa(&_DebugInterruptVector_literal_start),
 +      mem_reserve(__pa(&_DebugInterruptVector_text_start),
                    __pa(&_DebugInterruptVector_text_end));
  
 -      mem_reserve(__pa(&_KernelExceptionVector_literal_start),
 +      mem_reserve(__pa(&_KernelExceptionVector_text_start),
                    __pa(&_KernelExceptionVector_text_end));
  
 -      mem_reserve(__pa(&_UserExceptionVector_literal_start),
 +      mem_reserve(__pa(&_UserExceptionVector_text_start),
                    __pa(&_UserExceptionVector_text_end));
  
 -      mem_reserve(__pa(&_DoubleExceptionVector_literal_start),
 +      mem_reserve(__pa(&_DoubleExceptionVector_text_start),
                    __pa(&_DoubleExceptionVector_text_end));
  
  #if XCHAL_EXCM_LEVEL >= 2
  #endif
        parse_early_param();
        bootmem_init();
 -
 +      kasan_init();
        unflatten_and_copy_device_tree();
  
  #ifdef CONFIG_SMP
@@@ -595,14 -570,12 +583,14 @@@ c_show(struct seq_file *f, void *slot
                      "model\t\t: Xtensa " XCHAL_HW_VERSION_NAME "\n"
                      "core ID\t\t: " XCHAL_CORE_ID "\n"
                      "build ID\t: 0x%x\n"
 +                    "config ID\t: %08x:%08x\n"
                      "byte order\t: %s\n"
                      "cpu MHz\t\t: %lu.%02lu\n"
                      "bogomips\t: %lu.%02lu\n",
                      num_online_cpus(),
                      cpumask_pr_args(cpu_online_mask),
                      XCHAL_BUILD_UNIQUE_ID,
 +                    get_sr(SREG_EPC), get_sr(SREG_EXCSAVE),
                      XCHAL_HAVE_BE ?  "big" : "little",
                      ccount_freq/1000000,
                      (ccount_freq/10000) % 100,
diff --combined drivers/of/base.c
index a9d6fe86585bb6f05647839e481df94a8493a1c4,dd0b4201f1cc0f9020c9353700e9b127716799be..ad28de96e13f5a411ff51ad4a0b4f71e13f89938
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0+
  /*
   * Procedures for creating, accessing and interpreting the device tree.
   *
   *
   *  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
@@@ -315,32 -311,6 +311,32 @@@ struct device_node *of_get_cpu_node(in
  }
  EXPORT_SYMBOL(of_get_cpu_node);
  
 +/**
 + * of_cpu_node_to_id: Get the logical CPU number for a given device_node
 + *
 + * @cpu_node: Pointer to the device_node for CPU.
 + *
 + * Returns the logical CPU number of the given CPU device_node.
 + * Returns -ENODEV if the CPU is not found.
 + */
 +int of_cpu_node_to_id(struct device_node *cpu_node)
 +{
 +      int cpu;
 +      bool found = false;
 +      struct device_node *np;
 +
 +      for_each_possible_cpu(cpu) {
 +              np = of_cpu_device_node_get(cpu);
 +              found = (cpu_node == np);
 +              of_node_put(np);
 +              if (found)
 +                      return cpu;
 +      }
 +
 +      return -ENODEV;
 +}
 +EXPORT_SYMBOL(of_cpu_node_to_id);
 +
  /**
   * __of_device_is_compatible() - Check if the node matches given constraints
   * @device: pointer to node
diff --combined drivers/of/property.c
index f25d36358187ddecee74df3b2042252fbbfa4c6d,2b22560b60c1945e2ed6f345aa14c0131151b211..36ed84e26d9c262c32c6c600938f6ec53573c683
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0+
  /*
   * drivers/of/property.c - Procedures for accessing and interpreting
   *                       Devicetree properties and graphs.
   *
   *  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
@@@ -981,18 -977,10 +977,18 @@@ static int of_fwnode_graph_parse_endpoi
        return 0;
  }
  
 +static void *
 +of_fwnode_device_get_match_data(const struct fwnode_handle *fwnode,
 +                              const struct device *dev)
 +{
 +      return (void *)of_device_get_match_data(dev);
 +}
 +
  const struct fwnode_operations of_fwnode_ops = {
        .get = of_fwnode_get,
        .put = of_fwnode_put,
        .device_is_available = of_fwnode_device_is_available,
 +      .device_get_match_data = of_fwnode_device_get_match_data,
        .property_present = of_fwnode_property_present,
        .property_read_int_array = of_fwnode_property_read_int_array,
        .property_read_string_array = of_fwnode_property_read_string_array,
diff --combined include/linux/of.h
index 173102dafb07131da6fc9b5af19e3c38e0bc1140,d4abee0e8fc470d4ae3d99198965fdf96a3748b0..da1ee95241c12ccf920b03bd685dc4bf17d0b667
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0+ */
  #ifndef _LINUX_OF_H
  #define _LINUX_OF_H
  /*
@@@ -9,11 -10,6 +10,6 @@@
   * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.
   * Updates for SPARC64 by David S. Miller
   * Derived from PowerPC and Sparc prom.h files by Stephen Rothwell, IBM Corp.
-  *
-  * 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/types.h>
  #include <linux/bitops.h>
@@@ -544,8 -540,6 +540,8 @@@ const char *of_prop_next_string(struct 
  
  bool of_console_check(struct device_node *dn, char *name, int index);
  
 +extern int of_cpu_node_to_id(struct device_node *np);
 +
  #else /* CONFIG_OF */
  
  static inline void of_core_init(void)
@@@ -918,11 -912,6 +914,11 @@@ static inline void of_property_clear_fl
  {
  }
  
 +static inline int of_cpu_node_to_id(struct device_node *np)
 +{
 +      return -ENODEV;
 +}
 +
  #define of_match_ptr(_ptr)    NULL
  #define of_match_node(_matches, _node)        NULL
  #endif /* CONFIG_OF */
diff --combined include/linux/of_gpio.h
index 18a7f03e11826ff545bc979f99983f5eaabbaa9e,f6af4276fd51d7b51d3091b574ca0dca52e8a66a..163b79ecd01a39fb141ae8f6052f74fc86b93210
@@@ -1,14 -1,10 +1,10 @@@
+ /* SPDX-License-Identifier: GPL-2.0+ */
  /*
   * OF helpers for the GPIO API
   *
   * Copyright (c) 2007-2008  MontaVista Software, Inc.
   *
   * Author: Anton Vorontsov <[email protected]>
-  *
-  * 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.
   */
  
  #ifndef __LINUX_OF_GPIO_H
@@@ -31,7 -27,7 +27,7 @@@ enum of_gpio_flags 
        OF_GPIO_ACTIVE_LOW = 0x1,
        OF_GPIO_SINGLE_ENDED = 0x2,
        OF_GPIO_OPEN_DRAIN = 0x4,
 -      OF_GPIO_SLEEP_MAY_LOSE_VALUE = 0x8,
 +      OF_GPIO_TRANSITORY = 0x8,
  };
  
  #ifdef CONFIG_OF_GPIO
This page took 0.131949 seconds and 4 git commands to generate.