22 Aug, 2018

1 commit

  • It is tedious to specify extra compiler options for every file.
    HOST_EXTRACFLAGS is useful to add options to all files in a
    directory.

    -I$(src)/libfdt is needed for all the files in this directory
    to include libfdt_env.h etc. from scripts/dtc/libfdt/.

    On the other hand, -I$(src) is used to include check-in headers
    from generated C files. Thus, I added it only to dtc-lexer.lex.o
    and dtc-parser.tab.o .

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Rob Herring

    Masahiro Yamada
     

15 May, 2018

1 commit

  • This adds the following commits from upstream:

    84e414b0b5bc tests: Add a test case for the omit-if-no-ref keyword
    4038fd90056e dtc: add ability to make nodes conditional on them being referenced
    e1f139ea4900 checks: drop warning for missing PCI bridge bus-range
    f4eba68d89ee checks: Print duplicate node name instead of parent name
    46df1fb1b211 .travis.yml: Run valgrind checks via Travis
    14a3002a1aee tests: Update valgrind suppressions for sw_tree1
    02c5fe9debc0 tests: Remove valgrind error from tests/get_path
    df536831d02c checks: add graph binding checks
    2347c96edcbe checks: add a check for duplicate unit-addresses of child nodes
    8f1b35f88395 Correct overlay syntactic sugar for generating target-path fragments
    afbddcd418fb Suppress warnings on overlay fragments
    119e27300359 Improve tests for dtc overlay generation

    Signed-off-by: Rob Herring

    Rob Herring
     

24 Apr, 2018

1 commit

  • Cherry-picked from dtc upstream commit e1f139ea4900fd0324c646822b4061fec6e08321.

    Having a 'bus-range' property for PCI bridges should not be required,
    so remove the warning when missing. There was some confusion with the
    Linux kernel printing a message that no property is present and the OS
    assigned the bus number. This message was intended to be informational
    rather than a warning.

    When the firmware doesn't enumerate the PCI bus and leaves it up to the
    OS to do, then it is perfectly fine for the OS to assign bus numbers
    and bus-range is not necessary.

    There are a few cases where bus-range is needed or useful as Arnd
    Bergmann summarized:

    - Traditionally Linux avoided using multiple PCI domains, but instead
    configured separate PCI host bridges to have non-overlapping
    bus ranges so we can present them to user space as a single
    domain, and run the kernel without CONFIG_PCI_DOMAINS.
    Specifying the bus ranges this way would and give stable bus
    numbers across boots when the probe order is not fixed.

    - On certain ARM64 systems, we must only use the first
    128 bus numbers based on the way the IOMMU identifies
    the device with truncated bus/dev/fn number. There are probably
    others like this, with various limitations.

    - To leave some room for hotplugged devices, each slot on
    a host bridge can in theory get a range of bus numbers
    that are available when assigning bus numbers at boot time

    Cc: Arnd Bergmann
    Signed-off-by: Rob Herring
    Signed-off-by: David Gibson

    Rob Herring
     

16 Apr, 2018

1 commit

  • Pull more Kbuild updates from Masahiro Yamada:

    - pass HOSTLDFLAGS when compiling single .c host programs

    - build genksyms lexer and parser files instead of using shipped
    versions

    - rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency

    - let the top .gitignore globally ignore artifacts generated by flex,
    bison, and asn1_compiler

    - let the top Makefile globally clean artifacts generated by flex,
    bison, and asn1_compiler

    - use safer .SECONDARY marker instead of .PRECIOUS to prevent
    intermediate files from being removed

    - support -fmacro-prefix-map option to make __FILE__ a relative path

    - fix # escaping to prepare for the future GNU Make release

    - clean up deb-pkg by using debian tools instead of handrolled
    source/changes generation

    - improve rpm-pkg portability by supporting kernel-install as a
    fallback of new-kernel-pkg

    - extend Kconfig listnewconfig target to provide more information

    * tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: extend output of 'listnewconfig'
    kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg
    Kbuild: fix # escaping in .cmd files for future Make
    kbuild: deb-pkg: split generating packaging and build
    kbuild: use -fmacro-prefix-map to make __FILE__ a relative path
    kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers
    kbuild: rename *-asn1.[ch] to *.asn1.[ch]
    kbuild: clean up *-asn1.[ch] patterns from top-level Makefile
    .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore
    kbuild: add %.dtb.S and %.dtb to 'targets' automatically
    kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically
    genksyms: generate lexer and parser during build instead of shipping
    kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile
    .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore
    kbuild: use HOSTLDFLAGS for single .c executables

    Linus Torvalds
     

13 Apr, 2018

1 commit

  • Pull asm-generic fixes from Arnd Bergmann:
    "I have one regression fix for a minor build problem after the
    architecture removal series, plus a rework of the barriers in the
    readl/writel functions, thanks to work by Sinan Kaya:

    This started from a discussion on the linuxpcc and rdma mailing
    lists[1]. To summarize, we decided that architectures are responsible
    to serialize readl() and writel() accesses on a device MMIO space
    relative to DMA performed by that device.

    This series provides a pessimistic implementation of that behavior for
    asm-generic/io.h, which is in turn used by a number of architectures
    (h8300, microblaze, nios2, openrisc, s390, sparc, um, unicore32, and
    xtensa). Some of those presumably need no extra barriers, or something
    weaker than rmb()/wmb(), and they are advised to override the new
    default for better performance.

    For inb()/outb(), the same barriers are used, but architectures might
    want to add another barrier to outb() here if that can guarantee
    non-posted behavior (some architectures can, others cannot do that).

    The readl_relaxed()/writel_relaxed() family of functions retains the
    existing behavior with no extra barriers"

    [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-March/170481.html

    * tag 'asm-generic' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    io: change writeX_relaxed() to remove barriers
    io: change readX_relaxed() to remove barriers
    dts: remove cris & metag dts hard link file
    io: change inX() to have their own IO barrier overrides
    io: change outX() to have their own IO barrier overrides
    io: define stronger ordering for the default writeX() implementation
    io: define stronger ordering for the default readX() implementation
    io: define several IO & PIO barrier types for the asm-generic version

    Linus Torvalds
     

07 Apr, 2018

3 commits


06 Apr, 2018

1 commit

  • arch cris & metag have been removed from supported archs.
    The dts hard link files should also be removed, or the ctags
    tool will give warning.

    execute"ctags -R", output:
    ctags: Warning: cannot open source file
    "scripts/dtc/include-prefixes/cris" : No such file or directory
    ctags: Warning: cannot open source file
    "scripts/dtc/include-prefixes/metag" : No such file or directory

    Signed-off-by: Liu Changcheng
    Signed-off-by: Arnd Bergmann

    Liu, Changcheng
     

06 Mar, 2018

2 commits

  • This adds the following commits from upstream:

    aadd0b65c987 checks: centralize printing of property names in failure messages
    88960e398907 checks: centralize printing of node path in check_msg
    f1879e1a50eb Add limited read-only support for older (V2 and V3) device tree to libfdt.
    37dea76e9700 srcpos: drop special handling of tab
    65893da4aee0 libfdt: overlay: Add missing license
    962a45ca034d Avoid installing pylibfdt when dependencies are missing
    cd6ea1b2bea6 Makefile: Split INSTALL out into INSTALL_{PROGRAM,LIB,DATA,SCRIPT}
    51b3a16338df Makefile.tests: Add LIBDL make(1) variable for portability sake
    333d533a8f4d Attempt to auto-detect stat(1) being used if not given proper invocation
    e54388015af1 dtc: Bump version to v1.4.6
    a1fe86f380cb fdtoverlay: Switch from using alloca to malloc
    c8d5472de3ff tests: Improve compatibility with other platforms
    c81d389a10cc checks: add chosen node checks
    e671852042a7 checks: add aliases node checks
    d0c44ebe3f42 checks: check for #{size,address}-cells without child nodes
    18a3d84bb802 checks: add string list check for *-names properties
    8fe94fd6f19f checks: add string list check
    6c5730819604 checks: add a string check for 'label' property
    a384191eba09 checks: fix sound-dai phandle with arg property check
    b260c4f610c0 Fix ambiguous grammar for devicetree rule
    fe667e382bac tests: Add some basic tests for the pci_bridge checks
    7975f6422260 Fix widespread incorrect use of strneq(), replace with new strprefixeq()
    fca296445eab Add strstarts() helper function
    cc392f089007 tests: Check non-matching cases for fdt_node_check_compatible()
    bba26a5291c8 livetree: avoid assertion of orphan phandles with overlays
    c8f8194d76cc implement strnlen for systems that need it
    c8b38f65fdec libfdt: Remove leading underscores from identifiers
    3b62fdaebfe5 Remove leading underscores from identifiers
    2d45d1c5c65e Replace FDT_VERSION() with stringify()
    2e6fe5a107b5 Fix some errors in comments
    b0ae9e4b0ceb tests: Correct warning in sw_tree1.c

    Commit c8b38f65fdec upstream ("libfdt: Remove leading underscores from
    identifiers") changed the multiple inclusion define protection, so the
    kernel's libfdt_env.h needs the corresponding update.

    Signed-off-by: Rob Herring

    Rob Herring
     
  • Now that the kernel build supports flex and bison, remove the _shipped
    files and generate them during the build instead.

    Based on Masahiro's original patch.

    Reviewed-by: Masahiro Yamada
    Signed-off-by: Rob Herring

    Rob Herring
     

15 Nov, 2017

1 commit

  • Pull DeviceTree updates from Rob Herring:
    "A bigger diffstat than usual with the kbuild changes and a tree wide
    fix in the binding documentation.

    Summary:

    - kbuild cleanups and improvements for dtbs

    - Code clean-up of overlay code and fixing for some long standing
    memory leak and race condition in applying overlays

    - Improvements to DT memory usage making sysfs/kobjects optional and
    skipping unflattening of disabled nodes. This is part of kernel
    tinification efforts.

    - Final piece of removing storing the full path for every DT node.
    The prerequisite conversion of printk's to use device_node format
    specifier happened in 4.14.

    - Sync with current upstream dtc. This brings additional checks to
    dtb compiling.

    - Binding doc tree wide removal of leading 0s from examples

    - RTC binding documentation adding missing devices and some
    consolidation of duplicated bindings

    - Vendor prefix documentation for nutsboard, Silicon Storage
    Technology, shimafuji, Tecon Microprocessor Technologies, DH
    electronics GmbH, Opal Kelly, and Next Thing"

    * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
    dt-bindings: usb: add #phy-cells to usb-nop-xceiv
    dt-bindings: Remove leading zeros from bindings notation
    kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib
    MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry
    kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile
    .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore
    .gitignore: sort normal pattern rules alphabetically
    dt-bindings: add vendor prefix for Next Thing Co.
    scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
    of: dynamic: fix memory leak related to properties of __of_node_dup
    of: overlay: make pr_err() string unique
    of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove
    of: overlay: remove unneeded check for NULL kbasename()
    of: overlay: remove a dependency on device node full_name
    of: overlay: simplify applying symbols from an overlay
    of: overlay: avoid race condition between applying multiple overlays
    of: overlay: loosen overly strict phandle clash check
    of: overlay: expand check of whether overlay changeset can be removed
    of: overlay: detect cases where device tree may become corrupt
    of: overlay: minor restructuring
    ...

    Linus Torvalds
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 Oct, 2017

1 commit

  • Pickup the fix for handling unresolved phandles in overlays.

    This adds the following commits from upstream:

    c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins
    f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler
    48c91c08bcfa libfdt: add stringlist functions to linker script

    Signed-off-by: Rob Herring

    Rob Herring
     

04 Oct, 2017

2 commits

  • This adds the following commits from upstream:

    b1a60033c110 tests: Add a test for overlays syntactic sugar
    737b2df39cc8 overlay: Add syntactic sugar version of overlays
    497432fd2131 checks: Use proper format modifier for size_t
    22a65c5331c2 dtc: Bump version to v1.4.5
    c575d8059fff Add fdtoverlay to .gitignore
    b6a6f9490d19 fdtoverlay: Sanity check blob size
    8c1eb1526d2d pylibfdt: Use Python2 explicitly
    ee3d26f6960b checks: add interrupts property check
    c1e7738988f5 checks: add gpio binding properties check
    b3bbac02d5e3 checks: add phandle with arg property checks
    fe50bd1ecc1d fdtget: Split out cell list display into a new function
    62d812308d11 README: Add a note about test_tree1.dts
    5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
    46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
    a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
    a198af80344c pylibfdt: Add support for fdt_get_phandle()
    b9eba92ea50f tests: Return a failure code when any tests fail
    155faf6cc209 pylibfdt: Use local pylibfdt module
    50e5cd07f325 pylibfdt: Add a test for use of uint32_t
    ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
    36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
    1bb00655d3e5 fdt: Allow stacked overlays phandle references
    a33c2247ac8d Introduce fdt_setprop_placeholder() method
    0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
    e3b9a9588a35 tests: fdtoverlay unit test
    42409146f2db fdtoverlay: A tool that applies overlays
    aae22722fc8d manual: Document missing options
    13ce6e1c2fc4 dtc: fix sprintf() format string error, again
    d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
    51f56dedf8ea Clean up shared library compile/link options
    21a2bc896e3d Suppress expected error message in fdtdump test
    2a42b14d0d03 dtc: check.c fix compile error
    a10cb3c818d3 Fix get_node_by_path string equality check
    548aea2c436a fdtdump: Discourage use of fdtdump
    c2258841a785 fdtdump: Fix over-zealous version check
    9067ee4be0e6 Fix a few whitespace and style nits
    e56f2b07be38 pylibfdt: Use setup.py to build the swig file
    896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
    90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
    e20d9658cd8f Add Coverity Scan support
    b04a2cf08862 pylibfdt: Fix code style in setup.py
    1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
    580a9f6c2880 Add a libfdt function to write a property placeholder
    ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
    9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
    e91c652af215 pylibfdt: Enable installation of Python module
    8a892fd85d94 pylibfdt: Allow building to be disabled
    741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
    14c4171f4f9a pylibfdt: Use package_dir to set the package directory
    89a5062ab231 pylibfdt: Use environment to pass C flags and files
    4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
    6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/

    Signed-off-by: Rob Herring

    Rob Herring
     
  • libfdt has gained some new files. We need to include them in the
    kernel's copy.

    Reported-by: Kyle Yan
    Signed-off-by: Rob Herring

    Rob Herring
     

20 Sep, 2017

1 commit

  • Update dtx_diff include paths in the same manner as:
    commit b12869a8d519 ("of: remove drivers/of/testcase-data from
    include search path for CPP"), commit 5ffa2aed389c ("of: remove
    arch/$(SRCARCH)/boot/dts from include search path for CPP"), and
    commit 50f9ddaf64e1 ("of: search scripts/dtc/include-prefixes path
    for both CPP and DTC").

    Remove proposed include path kernel/dts/, which was never implemented
    for the dtb build.

    For the diff case, each source file is compiled separately. For
    each of those compiles, provide the location of the source file
    as an include path, not the location of both source files.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     

01 Sep, 2017

1 commit

  • dtc uses an incorrect format specifier for printing a uint64_t value.
    uint64_t may be either 'unsigned long' or 'unsigned long long' depending
    on the host architecture.

    Fix this by using %llx and casting to unsigned long long, which ensures
    that we always have a wide enough variable to print 64 bits of hex.

    HOSTCC scripts/dtc/checks.o
    scripts/dtc/checks.c: In function 'check_simple_bus_reg':
    scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
    snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
    ^
    scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]

    Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk
    Fixes: 828d4cdd012c ("dtc: check.c fix compile error")
    Signed-off-by: Russell King
    Cc: Rob Herring
    Cc: Frank Rowand
    Cc: Shuah Khan
    Cc: David Gibson
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Russell King
     

20 Jul, 2017

1 commit


08 Jul, 2017

2 commits

  • …asahiroy/linux-kbuild

    Pull misc Kbuild updates from Masahiro Yamada:

    - Use more portable shebang for Perl scripts

    - Remove trailing spaces from GCC version in kernel log

    - Make initramfs generation deterministic

    * tag 'kbuild-misc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kbuild: create deterministic initramfs directory listings
    scripts/mkcompile_h: Remove trailing spaces from compiler version
    scripts: Switch to more portable Perl shebang

    Linus Torvalds
     
  • Pull DeviceTree updates from Rob Herring:

    - vsprintf format specifier %pOF for device_node's. This will enable us
    to stop storing the full node names. Conversion of users will happen
    next cycle.

    - Update documentation to point to DT specification instead of ePAPR.

    - Split out graph and property functions to a separate file.

    - New of-graph functions for ALSA

    - Add vendor prefixes for RISC-V, Linksys, iWave Systems, Roofull,
    Itead, and BananaPi.

    - Improve dtx_diff utility filename printing.

    * tag 'devicetree-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (32 commits)
    of: document /sys/firmware/fdt
    dt-bindings: Add RISC-V vendor prefix
    vsprintf: Add %p extension "%pOF" for device tree
    of: find_node_by_full_name rewrite to compare each level
    of: use kbasename instead of open coding
    dt-bindings: thermal: add file extension to brcm,ns-thermal
    of: update ePAPR references to point to Devicetree Specification
    scripts/dtc: dtx_diff - Show real file names in diff header
    of: detect invalid phandle in overlay
    of: be consistent in form of file mode
    of: make __of_attach_node() static
    of: address.c header comment typo
    of: fdt.c header comment typo
    of: make of_fdt_is_compatible() static
    dt-bindings: display-timing.txt convert non-ascii characters to ascii
    Documentation: remove overlay-notes reference to non-existent file
    dt-bindings: usb: exynos-usb: Add missing required VDD properties
    dt-bindings: Add vendor prefix for Linksys
    MAINTAINERS: add device tree ABI documentation file
    of: Add vendor prefix for iWave Systems Technologies Pvt. Ltd
    ...

    Linus Torvalds
     

23 Jun, 2017

1 commit

  • As the comparison uses process substitution to pass files after
    conversion to DTS format, the diff header doesn't show the real
    filenames, but the names of the file descriptors used:

    --- /dev/fd/63 2017-06-22 11:21:47.531637188 +0200
    +++ /dev/fd/62 2017-06-22 11:21:47.531637188 +0200

    This is especially annoying when comparing a bunch of DT files in a
    loop, as the output doesn't show a clue about which files it refers to.

    Fix this by explicitly passing the original file names to the diff
    command using the --label option, giving e.g.:

    --- arch/arm/boot/dts/r8a7791-koelsch.dtb
    +++ arch/arm/boot/dts/r8a7791-porter.dtb

    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Frank Rowand
    Signed-off-by: Rob Herring

    Geert Uytterhoeven
     

20 May, 2017

1 commit


19 May, 2017

1 commit

  • We use a directory under arch/$ARCH/boot/dts as an include path
    that has links outside of the subtree to find dt-bindings from under
    include/dt-bindings. That's been working well, but new DT architectures
    haven't been adding them by default.

    Recently there's been a desire to share some of the DT material between
    arm and arm64, which originally caused developers to create symlinks or
    relative includes between the subtrees. This isn't ideal -- it breaks
    if the DT files aren't stored in the exact same hierarchy as the kernel
    tree, and generally it's just icky.

    As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
    once, and allow DTS files to reference dtsi (and dts) files in other
    architectures that way.

    Original approach was to create these links under each architecture,
    but it lead to the problem of recursive symlinks.

    As a remedy, move the include link directories out of the architecture
    trees into a common location. At the same time, they can now share one
    directory and one dt-bindings/ link as well.

    Fixes: 4027494ae6e3 ('ARM: dts: add arm/arm64 include symlinks')
    Reported-by: Russell King
    Reported-by: Omar Sandoval
    Reviewed-by: Heiko Stuebner
    Reviewed-by: Masahiro Yamada
    Tested-by: Heiko Stuebner
    Acked-by: Rob Herring
    Cc: Heiko Stuebner
    Cc: Mark Rutland
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: James Hogan
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Frank Rowand
    Cc: linux-arch
    Signed-off-by: Olof Johansson

    Olof Johansson
     

18 May, 2017

1 commit

  • Fix the following compile error found on odroid-xu4:

    checks.c: In function ‘check_simple_bus_reg’:
    checks.c:876:41: error: format ‘%lx’ expects argument of type
    ‘long unsigned int’, but argument 4 has type
    ‘uint64_t{aka long long unsigned int}’ [-Werror=format=]
    snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
    ^
    checks.c:876:41: error: format ‘%lx’ expects argument of type
    ‘long unsigned int’, but argument 4 has type
    ‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
    cc1: all warnings being treated as errors
    Makefile:304: recipe for target 'checks.o' failed
    make: *** [checks.o] Error 1

    Signed-off-by: Shuah Khan
    [dwg: Correct new format to be correct in general]
    Signed-off-by: David Gibson
    [robh: cherry-picked from upstream dtc commit 2a42b14d0d03]
    Signed-off-by: Rob Herring

    Shuah Khan
     

14 May, 2017

1 commit

  • The default NetBSD package manager is pkgsrc and it installs Perl
    along other third party programs under custom and configurable prefix.
    The default prefix for binary prebuilt packages is /usr/pkg, and the
    Perl executable lands in /usr/pkg/bin/perl.

    This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
    the most portable solution that should work for almost everybody.
    Perl's executable is detected automatically.

    This change switches -w option passed to the executable with more
    modern "use warnings;" approach. There is no functional change to the
    default behavior.

    While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

    Signed-off-by: Kamil Rytarowski
    Signed-off-by: Masahiro Yamada

    Kamil Rytarowski
     

30 Mar, 2017

1 commit


23 Mar, 2017

2 commits

  • This adds the following commits from upstream:

    756ffc4f52f6 Build pylibfdt as part of the normal build process
    8cb3896358e9 Adjust libfdt.h to work with swig
    b40aa8359aff Mention pylibfdt in the documentation
    12cfb740cc76 Add tests for pylibfdt
    50f250701631 Add an initial Python library for libfdt
    cdbb2b6c7a3a checks: Warn on node name unit-addresses with '0x' or leading 0s
    4c15d5da17cc checks: Add bus checks for simple-bus buses
    33c3985226d3 checks: Add bus checks for PCI buses
    558cd81bdd43 dtc: Bump version to v1.4.4
    c17a811c62eb fdtput: Remove star from value_len documentation
    194d5caaefcb fdtget: Use @return to document the return value
    d922ecdd017b tests: Make realloc_fdt() really allocate *fdt
    921cc17fec29 libfdt: overlay: Check the value of the right variable
    9ffdf60bf463 dtc: Simplify asm_emit_string() implementation
    881012e44386 libfdt: Change names of sparse helper macros
    bad5b28049e5 Fix assorted sparse warnings
    672ac09ea04d Clean up gcc attributes
    49300f2ade6a dtc: Don't abuse struct fdt_reserve_entry
    fa8bc7f928ac dtc: Bump version to v1.4.3
    34a9886a177f Add printf format attributes
    f72508e2b6ca Correct some broken printf() like format mismatches
    397d5ef0203c libfdt: Add fdt_setprop_empty()
    69a1bd6ad3f9 libfdt: Remove undefined behaviour setting empty properties
    acd1b534a592 Print output filename as part of warning messages
    120775eb1cf3 dtc: Use streq() in preference to strcmp()
    852e9ecbe197 checks: Add Warning for stricter node name character checking
    ef0e8f061534 checks: Add Warning for stricter property name character checking
    00d7bb1f4b0e dtc: pos parameter to srcpos_string() can't be NULL
    95d57726bca4 livetree.c: Fix memory leak
    3b9c97093d6e dtc: Fix NULL pointer use in dtlabel + dtref case
    43eb551426ea manual: Fix typo it -> in
    4baf15f7f13f Makefile: Add tags rule

    Signed-off-by: Rob Herring

    Rob Herring
     
  • Further automate the dtc update script to fill in the dtc version and
    commit log.

    Signed-off-by: Rob Herring

    Rob Herring
     

05 Jan, 2017

1 commit

  • Sync to upstream dtc commit 0931cea3ba20 ("dtc: fdtdump: check fdt if
    not in scanning mode"). In particular, this pulls in dtc overlay
    support.

    This adds the following commits from upstream:

    f88865469b65 dtc: Fix memory leak in character literal parsing
    00fbb8696b66 Rename boot_info
    1ef86ad2c24f dtc: Clean up /dts-v1/ and /plugin/ handling in grammar
    e3c769aa9c16 dtc: Don't always generate __symbols__ for plugins
    c96cb3c0169e tests: Don't use -@ on plugin de/recompile tests
    66381538ce24 tests: Remove "suppression of fixups" tests
    ba765b273f0f tests: Clarify dtc overlay tests
    6ea8cd944fcd tests: More thorough tests of libfdt overlay application without dtc
    7d8ef6e1db97 tests: Correct fdt handling of overlays without fixups and base trees without symbols
    b4dc0ed8b127 tests: Fix double expansion bugs in test code
    3ea879dc0c8f tests: Split overlay tests into those with do/don't exercise dtc plugin generation
    47b4d66a2f11 tests: Test auto-alias generation on base tree, not overlay
    72e1ad811523 tests: Make overlay/plugin tests unconditional
    e7b3c3b5951b tests: Add overlay tests
    9637e3f772a9 tests: Add check_path test
    20f29d8d41f6 dtc: Plugin and fixup support
    a2c92cac53f8 dtc: Document the dynamic plugin internals
    8f70ac39801d checks: Pass boot_info instead of root node
    ea10f953878f libfdt: add missing errors to fdt_strerror()
    daa75e8fa594 libfdt: fix fdt_stringlist_search()
    e28eff5b787a libfdt: fix fdt_stringlist_count()
    ae97c7722840 tests: overlay: Rename the device tree blobs to be more explicit
    96162d2bd9cb tests: overlay: Add test suffix to the compiled blobs
    5ce8634733b7 libfdt: Add fdt_overlay_apply to the exported symbols
    804a9db90ad2 fdt: strerr: Remove spurious BADOVERLAY
    e8c3a1a493fa tests: overlay: Move back the bad fixup tests
    7a72d89d3f81 libfdt: overlay: Fix symbols and fixups nodes condition
    cabbaa972cdd libfdt: overlay: Report a bad overlay for mismatching local fixups
    deb0a5c1aeaa libfdt: Add BADPHANDLE error string
    7b7a6be9ba15 libfdt: Don't use 'index' as a local variable name
    aea8860d831e tests: Add tests cases for the overlay code
    0cdd06c5135b libfdt: Add overlay application function
    39240cc865cf libfdt: Extend the reach of FDT_ERR_BADPHANDLE
    4aa3a6f5e6d9 libfdt: Add new errors for the overlay code
    6d1832c9e64b dtc: Remove "home page" link
    45fd440a9561 Fix some typing errors in libfdt.h and livetree.c
    a59be4939c13 Merge tag 'v1.4.2'
    a34bb721caca dtc: Fix assorted problems in the testcases for the -a option
    874f40588d3e Implement the -a option to pad dtb aligned
    ec02b34c05be dtc: Makefile improvements for release uploading
    1ed45d40a137 dtc: Bump version to 1.4.2
    36fd7331fb11 libfdt: simplify fdt_del_mem_rsv()
    d877364e4a0f libfdt: Add fdt_setprop_inplace_namelen_partial
    3e9037aaad44 libfdt: Add fdt_getprop_namelen_w
    84e0e1346c68 libfdt: Add max phandle retrieval function
    d29126c90acb libfdt: Add iterator over properties
    902d0f0953d0 libfdt: Add a subnodes iterator macro
    c539075ba8ba fdtput.c: Fix memory leak.
    f79ddb83e185 fdtget.c: Fix memory leak
    1074ee54b63f convert-dtsv0-lexer.l: fix memory leak
    e24d39a024e6 fdtdump.c: make sure size_t argument to memchr is always unsigned.
    44a59713cf05 Remove unused srcpos_dump() function
    cb9241ae3453 DTC: Fix memory leak on flatname.
    1ee0ae24ea09 Simplify check field and macro names
    9d97527a8621 Remove property check functions
    2e709d158e11 Remove tree check functions
    c4cb12e193e3 Alter grammar to allow multiple /dts-v1/ tags
    d71d25d76012 Use xasprintf() in srcpos
    9dc404958e9c util: Add xasprintf portable asprintf variant
    beef80b8b55f Correct a missing space in a fdt_header cast
    68d43cec1253 Correct line lengths in libfdt.h
    b0dbceafd49a Correct space-after-tab in libfdt.h

    Signed-off-by: Rob Herring

    Rob Herring
     

23 Jul, 2016

1 commit

  • Determining which kernel config options need to be enabled for a
    given devicetree can be a painful process. Create a new tool to
    find the drivers that may match a devicetree node compatible,
    find the kernel config options that enable the driver, and
    optionally report whether the kernel config option is enabled.

    Signed-off-by: Gaurav Minocha
    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Gaurav Minocha
     

30 Mar, 2016

1 commit

  • Sync to upstream dtc commit 53bf130b1cdd ("libfdt: simplify
    fdt_node_check_compatible()"). This adds the following commits from
    upstream:

    53bf130 libfdt: simplify fdt_node_check_compatible()
    c9d9121 Warn on node name unit-address presence/absence mismatch
    2e53f9d Catch unsigned 32bit overflow when parsing flattened device tree offsets

    Signed-off-by: Rob Herring

    Rob Herring
     

12 Feb, 2016

2 commits

  • Sync to upstream dtc commit b06e55c88b9b ("Prevent crash on modulo by
    zero"). This adds the following commits from upstream:

    b06e55c Prevent crash on modulo by zero
    b433450 Fix some bugs in processing of line directives
    d728ad5 Fix crash on nul character in string escape sequence
    1ab2205 Gracefully handle bad octal literals
    1937095 Prevent crash on division by zero
    d0b3ab0 libfdt: Fix undefined behaviour in fdt_offset_ptr()
    d4c7c25 libfdt: check for potential overrun in _fdt_splice()
    f58799b libfdt: Add some missing symbols to version.lds
    af9f26d Remove duplicated -Werror in dtc Makefile
    604e61e fdt: Add functions to retrieve strings
    8702bd1 fdt: Add a function to get the index of a string
    2218387 fdt: Add a function to count strings
    554fde2 libfdt: fix comment block of fdt_get_property_namelen()
    e5e6df7 fdtdump: Fix bug printing bytestrings with negative values
    067829e Remove redundant fdtdump test code
    897a429 Move fdt_path_offset alias tests to right tests section
    2d1417c Add simple .travis.yml
    f6dbc6c guess output file format
    5e78dff guess input file format based on file content or file name
    8b927bf tests: convert `echo -n` to `printf`
    64c46b0 Fix crash with poorly defined #size-cells

    Cc: Grant Likely
    Tested-by: Frank Rowand
    Reviewed-by: Frank Rowand
    Signed-off-by: Rob Herring

    Rob Herring
     
  • If kernel config options are not properly set, "make scripts" will not
    compile dtc. Update the unable to find dtc error message to check
    the kernel config and give better advice on how to create dtc.

    Reword another error message to increase clarity.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     

25 Jan, 2016

1 commit

  • Create script to diff device trees.

    The device tree can be in any of the forms recognized by the dtc compiler:
    - source
    - binary blob
    - file system tree (from /proc/devicetree)

    If the device tree is a source file, then it is pre-processed in the
    same way as it would be when built in the linux kernel source tree
    before diffing.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     

30 Apr, 2015

2 commits

  • Sync dtc with upstream as of commit 9d3649bd3be2 (Add testcases for
    fdt_path_offset_namelen()).

    Signed-off-by: Rob Herring
    Cc: Grant Likely
    Cc: devicetree@vger.kernel.org

    Rob Herring
     
  • The following script is used to import dtc upstream
    into kernel. It was missing import of dtc/libfdt, with
    this commit it will include the same.

    Also, currently in arch and driver code that needs early access to
    the flattened device tree it is necessary to add specific CFLAGS
    so that when scripts/dtc/libfdt/libfdt.h is included the C
    preprocessor is able to locate the libfdt versions of libfdt_env.h
    and fdt.h without generating an error. So, this script replaces
    angular brackets with quotation used to include header files
    fdt.h and libfdt_env.h

    Signed-off-by: Gaurav Minocha
    [robh: reword commit headline and add 'git add']
    Signed-off-by: Rob Herring

    Gaurav Minocha
     

10 Jun, 2014

1 commit


21 Jan, 2014

2 commits

  • A very simple script that automates pulling in a newer version of DTC.
    Not particularly robust, but a whole lot better than doing it by hand
    every time.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Update to the latest version of dtc with the following notable
    enhancements and bug fixes:

    * fdtput: expand fdt if value does not fit
    * dtc/fdt{get, put}/convert-dtsv0-lexer: convert to new usage helpers
    * libfdt: Add fdt_next_subnode() to permit easy subnode iteration
    * utilfdt_read: pass back up the length of data read
    * util_version: new helper for displaying version info
    * die: constify format string arg
    * utilfdt_read_err: use xmalloc funcs
    * Export fdt_stringlist_contains()
    * dtc: Drop the '-S is deprecated' warning
    * dtc/libfdt: sparse fixes
    * dtc/libfdt: introduce fdt types for annotation by endian checkers
    * Fix util_is_printable_string
    * dtc: srcpos_verror() should print to stderr
    * libfdt: Added missing functions to shared library

    Shipped bison/flex generated files were built on an Ubuntu 13.10 system.

    Signed-off-by: Grant Likely

    Grant Likely