1. 12 Mar, 2019 6 commits
  2. 06 Mar, 2019 1 commit
  3. 19 Feb, 2019 5 commits
  4. 02 Jan, 2019 1 commit
  5. 23 Dec, 2018 1 commit
  6. 21 Dec, 2018 1 commit
  7. 15 Dec, 2018 1 commit
    • Kumar Gala's avatar
      checks: Add unit address check if node is enabled · 7cbc550f
      Kumar Gala authored
      There are various SoCs that have 2 different peripheral blocks at the
      same register offset.  However, we might have one block marked as
      status = "disabled" and the other status = "ok".  In such cases we
      shouldn't warn about duplicate unit-address.
      
      Here's a cut down example that we would warning about before:
      
      /dts-v1/;
      
      / {
      	#address-cells = <0x01>;
      	#size-cells = <0x01>;
      
      	soc {
      		#address-cells = <0x01>;
      		#size-cells = <0x01>;
      		compatible = "simple-bus";
      		ranges;
      
      		i2c0: i2c@40003000 {
      			compatible = "nordic,nrf-i2c";
      			reg = <0x40003000 0x1000>;
      			status = "ok";
      		};
      
      		spi0: spi@40003000 {
      			compatible = "nordic,nrf-spi";
      			reg = <0x40003000 0x1000>;
      			status = "disabled";
      		};
      	};
      };
      
      We introduce 'unique_unit_address_if_enabled' check that is disabled by
      default.
      Signed-off-by: 's avatarKumar Gala <kumar.gala@linaro.org>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      7cbc550f
  8. 27 Nov, 2018 1 commit
  9. 25 Nov, 2018 3 commits
    • Rob Herring's avatar
      checks: Use source position information for check failures · 3616b9a8
      Rob Herring authored
      Now that we retain source position information of nodes and properties,
      make that the preferred file name (and position) to print out in check
      failures. This will greatly simplify finding and fixing check errors
      because most errors are in included source .dtsi files and they get
      duplicated every time the source file is included.
      Signed-off-by: 's avatarRob Herring <robh@kernel.org>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      3616b9a8
    • Rob Herring's avatar
      checks: Make each message output atomic · 2bdbd07a
      Rob Herring authored
      Printing to stderr as we build up the check message results in
      interleaving of messages when multiple instances of dtc are running.
      Change the message output to use an intermediate buffer for constructing
      the message and then output the message to stderr with a single fputs.
      
      While perhaps there is no guarantee that fputs will be atomic, this gets
      rid of any interleaved output that previously occurred on Linux.
      Signed-off-by: 's avatarRob Herring <robh@kernel.org>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      2bdbd07a
    • Rob Herring's avatar
      util: Add xa{v}sprintf_append functions · a1eff70c
      Rob Herring authored
      Add variadic and va_list functions, xa{v}sprintf, which appends a
      formatted string to an existing string and re-allocate the string buffer
      if necessary. xasprintf becomes just a special case of xasprintf_append
      with a NULL starting string.
      
      Rather than looping to get a big enough buffer, simply the implementation
      by assuming we have a C99 compliant vsnprintf implementation to return the
      necessary size. A side effect is glibc 2.0 support is dropped which seems
      unnecessary.
      Signed-off-by: 's avatarRob Herring <robh@kernel.org>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      a1eff70c
  10. 24 Nov, 2018 1 commit
  11. 23 Nov, 2018 8 commits
  12. 22 Nov, 2018 2 commits
  13. 19 Nov, 2018 2 commits
    • Julia Lawall's avatar
      annotations: add the annotation functionality · 5667e7ef
      Julia Lawall authored
      Provide the new command-line option:
      
      --annotate (abbreviated -T)
      
      --annotate provides one or more filenames and line numbers indicating
      the origin of a given line.  The filename is expressed relative the the
      filename provided on the command line.  Nothing is printed for overlays,
      etc.
      
      -T can be repeated giving more verbose annotations.  These consist of
      one or more tuples of: filename, starting line, starting column, ending
      line ending column.  The full path is given for the file name.
      Overlays, etc are annotated with <no-file>:<no-line>.
      
      The verbose annotations may be too verbose for normal use.
      
      There are numerous changes in srcpos.c to provide the relative filenames
      (variables initial_path, initial_pathlen and initial_cpp, new functions
      set_initial_path and shorten_to_initial_path, and changes in
      srcfile_push and srcpos_set_line).  The change in srcpos_set_line takes
      care of the case where cpp is used as a preprocessor.  In that case the
      initial file name is not the one provided on the command line but the
      one found at the beginnning of the cpp output.
      
      shorten_to_initial_path only returns a string if it has some shortening
      to do.  Otherwise it returns NULL and relies on the caller to use the
      initial string.  This simplifies memory management, by making clear to
      the caller whether a new string is allocated.
      
      The new functions srcpos_string_comment, srcpos_string_first, and
      srcpos_string_last print the annotations.  srcpos_string_comment is
      recursive to print a list of source file positions.
      
      Various changes are sprinkled throughout treesource.c to print the
      annotations.
      Signed-off-by: 's avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      5667e7ef
    • Julia Lawall's avatar
      annotations: add positions · 8e20ccf5
      Julia Lawall authored
      Extend the parser to record positions, in build_node,
      build_node_delete, and build_property.
      
      srcpos structures are added to the property and node types, and to the
      parameter lists of the above functions that construct these types.
      Nodes and properties that are created by the compiler rather than from
      parsing source code have NULL as the srcpos value.
      
      merge_nodes, defined in livetree.c, uses srcpos_extend to combine
      multiple positions, resulting in a list of positions.  srcpos_extend
      is defined in srcpos.c.  New elements are added at the end.  This
      requires the srcpos type, define in srcpos.h, to be a list structure
      with a next field.  This next field is initialized to NULL in
      srcpos.h, in the macro YYLLOC_DEFAULT invoked implicitly by the
      generated parser code.
      
      Another change to srcpos.c is to make srcpos_copy always do a full
      copy, including a copy of the file substructure.  This is required
      because when dtc is used on the output of cpp, the successive detected
      file names overwrite the file name in the file structure.  The next
      field does not need to be deep copied, because it is always NULL when
      srcpos_copy is called; an assert checks for this. File names are only
      updated in uncopied position structures.
      Signed-off-by: 's avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      8e20ccf5
  14. 14 Nov, 2018 5 commits
  15. 13 Nov, 2018 1 commit
    • Julia Lawall's avatar
      annotations: add positions · baa1d2cf
      Julia Lawall authored
      Extend the parser to record positions, in build_node, build_node_delete,
      and build_property.
      
      srcpos structures are added to the property and node types, and to the
      parameter lists of the above functions that construct these types.
      Nodes and properties that are created by the compiler rather than from
      parsing source code have NULL as the srcpos value.
      
      merge_nodes, defined in livetree.c, uses srcpos_extend to combine
      multiple positions, resulting in a list of positions.  srcpos_extend is
      defined in srcpos.c.  New elements are added at the end.  The srcpos
      type, define in srcpos.h, is now a list structure with a next field.
      
      Another change to srcpos.c is to make srcpos_copy always do a full copy,
      including a copy of the file substructure.  This is required because
      when dtc is used on the output of cpp, the successive detected file
      names overwrite the file name in the file structure.  The next field
      does not need to be deep copied, because it is only updated in newly
      copied positions and the positions to which it points have also been
      copied.  File names are only updated in uncopied position structures.
      Signed-off-by: 's avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: 's avatarDavid Gibson <david@gibson.dropbear.id.au>
      baa1d2cf
  16. 07 Nov, 2018 1 commit