1. 15 4月, 2015 1 次提交
  2. 29 3月, 2015 6 次提交
  3. 25 3月, 2015 1 次提交
  4. 19 3月, 2015 1 次提交
  5. 10 3月, 2015 4 次提交
  6. 05 2月, 2015 1 次提交
  7. 23 1月, 2015 2 次提交
  8. 14 1月, 2015 1 次提交
  9. 04 12月, 2014 2 次提交
  10. 28 11月, 2014 1 次提交
  11. 25 11月, 2014 3 次提交
    • P
      of/overlay: Add overlay unittests · 177d271c
      Pantelis Antoniou 提交于
      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: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      177d271c
    • G
      of: Refactor __of_node_alloc() into __of_node_dup() · e5179581
      Grant Likely 提交于
      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: NGrant Likely <grant.likely@linaro.org>
      e5179581
    • G
      of: Use vargs in __of_node_alloc · ef8bbd73
      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: NGrant Likely <grant.likely@linaro.org>
      ef8bbd73
  12. 05 11月, 2014 2 次提交
  13. 04 11月, 2014 2 次提交
    • G
      of: Eliminate of_allnodes list · 5063e25a
      Grant Likely 提交于
      The device tree structure is composed of two lists; the 'allnodes' list
      which is a singly linked list containing every node in the tree, and the
      child->parent structure where each parent node has a singly linked list
      of children. All of the data in the allnodes list can be easily
      reproduced with the parent-child lists, so of_allnodes is actually
      unnecessary. Remove it entirely which saves a bit of memory and
      simplifies the data structure quite a lot.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      Cc: Pantelis Antoniou <pantelis@pantelis.antoniou@konsulko.com>
      5063e25a
    • G
      of: Fix overflow bug in string property parsing functions · a87fa1d8
      Grant Likely 提交于
      The string property read helpers will run off the end of the buffer if
      it is handed a malformed string property. Rework the parsers to make
      sure that doesn't happen. At the same time add new test cases to make
      sure the functions behave themselves.
      
      The original implementations of of_property_read_string_index() and
      of_property_count_strings() both open-coded the same block of parsing
      code, each with it's own subtly different bugs. The fix here merges
      functions into a single helper and makes the original functions static
      inline wrappers around the helper.
      
      One non-bugfix aspect of this patch is the addition of a new wrapper,
      of_property_read_string_array(). The new wrapper is needed by the
      device_properties feature that Rafael is working on and planning to
      merge for v3.19. The implementation is identical both with and without
      the new static inline wrapper, so it just got left in to reduce the
      churn on the header file.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Darren Hart <darren.hart@intel.com>
      Cc: <stable@vger.kernel.org>  # v3.3+: Drop selftest hunks that don't apply
      a87fa1d8
  14. 07 10月, 2014 1 次提交
  15. 05 10月, 2014 3 次提交
    • G
      of/selftest: Use the resolver to fixup phandles · 2eb46da2
      Grant Likely 提交于
      The selftest data ends up causing duplicate phandles in the live tree
      for the time that the testcase data is inserted into the live tree. This
      is obviously a bad situation because anything attempting to read the
      tree while the selftests are running make resolve phandles to one of the
      testcase data nodes. Fix the problem by using the of_resolve_phandles()
      function to eliminate duplicates.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      2eb46da2
    • G
      of/selftest: Add a test for duplicate phandles · 841ec213
      Grant Likely 提交于
      All phandles in the tree should be unique. Add a testcase to make sure
      that this is so.
      
      Note: this testcase fails on the current kernel because the selftest
      code itself ends up adding duplicate phandles. Before this testcase is
      merged the selftest code needs to be modified to resolve phandles before
      adding them.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      841ec213
    • G
      of/selftest: Test structure of device tree · f2051d6a
      Grant Likely 提交于
      Add a testcase to verify that the device tree is properly constructed
      and the lists are in a correct order. The new testcase gets run twice;
      once after adding the testcase data, and once after removing it again.
      It is run twice to make sure adding and removing the testcase data
      doesn't corrupt the data structure.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      f2051d6a
  16. 02 10月, 2014 1 次提交
    • G
      of: Fix NULL dereference in selftest removal code · e66c98c7
      Grant Likely 提交于
      The selftest code removes its testcase data from the live tree when
      exiting, but if the testcases data tree contains an empty child of the
      root, then it causes an oops due to a NULL dereference. The reason is
      that the code tries to directly dereference the child pointer without
      checking first if a child is actually there.
      
      The solution is to pass the parent node into detach_node_and_children()
      instead of trying to pass the child. This required removing the code
      that attempts to remove all of the sibling nodes in
      detach_node_and_children(), which was never sensible in the first place.
      
      At the same time add a check to make sure the bounds of the nodes list
      are not exceeded by the testdata tree. If they are then abort.
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      e66c98c7
  17. 16 8月, 2014 1 次提交
  18. 25 7月, 2014 1 次提交
    • G
      Adding selftest testdata dynamically into live tree · ae9304c9
      Gaurav Minocha 提交于
      This patch attaches selftest's device tree data (required by /drivers/of/selftest.c)
      dynamically into live device tree. First, it links selftest device tree data into the
      kernel image and then iterates over all the nodes and attaches them into the live tree.
      Once the testcases are complete, it removes the data attached.
      
      This patch will remove the manual process of addition and removal of selftest device
      tree data into the machine's dts file.
      
      Tested successfully with current selftest's testcases.
      Signed-off-by: NGaurav Minocha <gaurav.minocha.os@gmail.com>
      [glikely: Removed ability to build as a module and fixed no-devicetree bug]
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      ae9304c9
  19. 24 7月, 2014 1 次提交
    • P
      of: Transactional DT support. · 201c910b
      Pantelis Antoniou 提交于
      Introducing DT transactional support.
      
      A DT transaction is a method which allows one to apply changes
      in the live tree, in such a way that either the full set of changes
      take effect, or the state of the tree can be rolled-back to the
      state it was before it was attempted. An applied transaction
      can be rolled-back at any time.
      
      Documentation is in
      	Documentation/devicetree/changesets.txt
      Signed-off-by: NPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [glikely: Removed device notifiers and reworked to be more consistent]
      Signed-off-by: NGrant Likely <grant.likely@linaro.org>
      201c910b
  20. 16 7月, 2014 1 次提交
  21. 23 5月, 2014 1 次提交
  22. 14 5月, 2014 2 次提交
  23. 24 4月, 2014 1 次提交