24 Jun, 2016

1 commit


21 May, 2016

1 commit

  • Pull devicetree updates from Rob Herring:

    - Rewrite of the unflattening code to avoid recursion and lessen the
    stack usage.

    - Rewrite of the phandle args parsing code to get rid of the fixed args
    size. This is needed for IOMMU code.

    - Sync to latest dtc which adds more dts style checking. These
    warnings are enabled with "W=1" compiles.

    - Tegra documentation updates related to the above warnings.

    - A bunch of spelling and other doc fixes.

    - Various vendor prefix additions.

    * tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (52 commits)
    devicetree: Add Creative Technology vendor id
    gpio: dt-bindings: add ibm,ppc4xx-gpio binding
    of/unittest: Remove unnecessary module.h header inclusion
    drivers/of: Fix build warning in populate_node()
    drivers/of: Fix depth when unflattening devicetree
    of: dynamic: changeset prop-update revert fix
    drivers/of: Export of_detach_node()
    drivers/of: Return allocated memory from of_fdt_unflatten_tree()
    drivers/of: Specify parent node in of_fdt_unflatten_tree()
    drivers/of: Rename unflatten_dt_node()
    drivers/of: Avoid recursively calling unflatten_dt_node()
    drivers/of: Split unflatten_dt_node()
    of: include errno.h in of_graph.h
    of: document refcount incrementation of of_get_cpu_node()
    Documentation: dt: soc: fix spelling mistakes
    Documentation: dt: power: fix spelling mistake
    Documentation: dt: pinctrl: fix spelling mistake
    Documentation: dt: opp: fix spelling mistake
    Documentation: dt: net: fix spelling mistakes
    Documentation: dt: mtd: fix spelling mistake
    ...

    Linus Torvalds
     

19 May, 2016

1 commit


16 May, 2016

1 commit

  • This adds one more argument to of_fdt_unflatten_tree() to specify
    the parent node of the FDT blob that is going to be unflattened.
    In the result, the function can be used to unflatten FDT blob that
    represents device sub-tree in PowerNV PCI hotplug driver.

    Cc: Jyri Sarha
    Signed-off-by: Gavin Shan
    Acked-by: Rob Herring
    Acked-by: Jyri Sarha
    Signed-off-by: Rob Herring

    Gavin Shan
     

22 Apr, 2016

1 commit


04 Mar, 2016

1 commit

  • of_overlay_destroy() can return `-ENODEV' error code once it
    failed to find the requested overlay in `ov_idr'. However,
    of_unittest_destroy_tracked_overlays() does not handle this
    error code correctly and continues to call of_overlay_destroy()
    on the 'missing' overlay over and over again. This results in
    a printk flood

    [..]
    [ 33.497583] of_overlay_destroy: Could not find overlay #6
    [ 33.497583] of_overlay_destroy: Could not find overlay #6
    [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
    [ 33.497584] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
    [ 33.497586] of_overlay_destroy: Could not find overlay #6
    [ 33.497586] of_overlay_destroy: Could not find overlay #6
    [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
    [ 33.497587] ### dt-test ### of_unittest_destroy_tracked_overlays: overlay destroy failed for #6
    [..]

    which is not really good due to printk design, and can lead to soft
    lockups, hard lockups, etc. (depending on the context console_unlock()
    is being called from). The problem has bee observed in real life
    and reported by Ying Huang.

    This patch does not address the root cause of missing overlay in
    `ov_idr', it fixes the endless loop only.

    Signed-off-by: Sergey Senozhatsky
    Reported-by: kernel test robot
    Link: lkml.kernel.org/r/87fuwk1c0o.fsf@yhuang-dev.intel.com
    Signed-off-by: Rob Herring

    Sergey Senozhatsky
     

14 Jan, 2016

1 commit

  • The PowerNV PCI hotplug driver is going to use the OF changeset
    to manage the changed device sub-tree. This exports those OF
    changeset functions for that.

    Signed-off-by: Gavin Shan
    Acked-by: Wolfram Sang
    Tested-by: Wolfram Sang
    Signed-off-by: Rob Herring

    Gavin Shan
     

05 Jan, 2016

1 commit

  • Add a single resource to the test bus device to exercise the platform
    bus code a little more. This isn't strictly a devicetree test, but it is
    a corner case that the devicetree runs into. Until we've got platform
    device unittests, it can live here. It doesn't need to be an explicit
    text because the kernel will oops when it is wrong.

    Cc: Pantelis Antoniou
    Cc: Rob Herring
    Cc: Greg Kroah-Hartman
    Cc: Ricardo Ribalda Delgado
    Signed-off-by: Grant Likely
    [wsa: added the comment provided by Grant, rebased, and tested]
    Signed-off-by: Wolfram Sang
    Signed-off-by: Rob Herring

    Grant Likely
     

22 Oct, 2015

1 commit

  • for_each_child_of_node performs an of_node_get on each iteration, so
    a break out of the loop requires an of_node_put.

    A simplified version of the semantic patch that fixes this problem is as
    follows (http://coccinelle.lip6.fr):

    //
    @@
    expression root,e;
    local idexpression child;
    @@

    for_each_child_of_node(root, child) {
    ... when != of_node_put(child)
    when != e = child
    (
    return child;
    |
    + of_node_put(child);
    ? return ...;
    )
    ...
    }
    //

    Combine the puts into code at the end of the function, for conciseness.

    Signed-off-by: Julia Lawall
    Signed-off-by: Rob Herring

    Julia Lawall
     

27 Jul, 2015

1 commit


24 Apr, 2015

1 commit

  • Pull second batch of devicetree updates from Rob Herring:
    "As Grant mentioned in the first devicetree pull request, here is the
    2nd batch of DT changes for 4.1. The main remaining item here is the
    endianness bindings and related 8250 driver support.

    - DT endianness specification bindings

    - big-endian 8250 serial support

    - DT overlay unittest updates

    - various DT doc updates

    - compile fixes for OF_IRQ=n"

    * tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    frv: add io{read,write}{16,32}be functions
    mn10300: add io{read,write}{16,32}be functions
    Documentation: DT bindings: add doc for Altera's SoCFPGA platform
    of: base: improve of_get_next_child() kernel-doc
    Doc: dt: arch_timer: discourage clock-frequency use
    of: unittest: overlay: Keep track of created overlays
    of/fdt: fix allocation size for device node path
    serial: of_serial: Support big-endian register accesses
    serial: 8250: Add support for big-endian MMIO accesses
    of: Document {little,big,native}-endian bindings
    of/fdt: Add endianness helper function for early init code
    of: Add helper function to check MMIO register endianness
    of/fdt: Remove "reg" data prints from early_init_dt_scan_memory
    of: add vendor prefix for Artesyn
    of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
    of: OF_IRQ should depend on IRQ_DOMAIN

    Linus Torvalds
     

15 Apr, 2015

1 commit


29 Mar, 2015

7 commits


25 Mar, 2015

1 commit


19 Mar, 2015

1 commit

  • There were regressions seen with commit 106937e8ccdc ("of: fix handling
    of '/' in options for of_find_node_by_path()"), where we couldn't handle
    extra '/' before the ':'. Let's test for this now.

    Confirmed that this test fails without the previous patch and passes
    when patched. All other tests pass.

    Signed-off-by: Brian Norris
    Acked-by: Leif Lindholm
    Signed-off-by: Rob Herring

    Brian Norris
     

10 Mar, 2015

4 commits


12 Feb, 2015

1 commit


05 Feb, 2015

2 commits


23 Jan, 2015

2 commits


14 Jan, 2015

1 commit

  • This patch intends to remove the unittests dependency on
    the functions defined in dynamic.c. So, rather than calling
    of_attach_node defined in dynamic.c, minimal functionality
    required to attach a new node is re-defined in unittest.c.
    Also, now after executing the tests the test data is not
    removed from the device tree so there is no need to call
    of_detach_node.

    Tested with and without OF_DYNAMIC enabled on ppc, arm and
    x86

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

    Gaurav Minocha
     

04 Dec, 2014

2 commits

  • The of_node_put() function tests whether its argument is NULL and then
    returns immediately. Thus the test around the call is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Grant Likely

    Markus Elfring
     
  • Update of_find_node_by_path():
    1) Rename function to of_find_node_opts_by_path(), adding an optional
    pointer argument. Provide a static inline wrapper version of
    of_find_node_by_path() which calls the new function with NULL as
    the optional argument.
    2) Ignore any part of the path beyond and including the ':' separator.
    3) Set the new provided pointer argument to the beginning of the string
    following the ':' separator.
    4: Add tests.

    Signed-off-by: Leif Lindholm
    Signed-off-by: Grant Likely

    Leif Lindholm
     

28 Nov, 2014

1 commit


25 Nov, 2014

3 commits

  • Add unittests for OF overlays.

    It tests overlay device addition/removal and whether
    the apply revert sequence is correct.

    Changes since V1:
    * Added local fixups entries.

    Signed-off-by: Pantelis Antoniou
    Signed-off-by: Grant Likely

    Pantelis Antoniou
     
  • Add a node argument to __of_node_alloc() and rename it to
    __of_node_dup() so that it can also be used to duplicate a node with
    its properties. This is important for the overlay code so that it can
    create new nodes without using separate changeset items for every single
    property.

    At the same time rework the overlay code to use the new function and
    drop the extra changeset items.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • The overlay code needs to construct a new full_name from the parent name
    and the node name, but the current method has to allocate and then free
    an temporary string which is wasteful. Fix this problem by using vargs
    to pass in a format and arguments into __of_node_alloc().

    At the same time remove the allocflags argument to __of_node_alloc().
    The only users all use GFP_KERNEL, so there is no need to provide it as
    an option. If there is ever a need later it can be added back.

    Signed-off-by: Grant Likely

    Grant Likely
     

24 Nov, 2014

1 commit

  • v3.18-rc6 contains an important DT bug fix, c1a2086e2d, "of/selftest:
    Fix off-by-one error in removal path" which affects testing of the
    overlay patch series. Merge it into the devicetree/next staging branch
    so that the overlay patches are applied on top of a known working tree.

    Linux 3.18-rc6

    Conflicts:
    drivers/of/address.c

    Grant Likely
     

05 Nov, 2014

1 commit