Skip to content
Snippets Groups Projects
  1. Jul 15, 2011
    • Gerald Van Baren's avatar
      fdt: introduce fdt_create_phandle() · a8d2a75d
      Gerald Van Baren authored
      
      The ePAPR specification says that phandle properties should be called
      "phandle", and not "linux,phandle".  To facilitate the migration from
      "linux,phandle" to "phandle", introduce function fdt_create_phandle(),
      which creates a phandle in a given node.  For now, we create both the
      "phandle" and "linux,phandle" properties.  A later version of this
      function will remove support for "linux,phandle".
      
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      a8d2a75d
    • Timur Tabi's avatar
      fdt: add prototype for fdt_increase_size() · b3606f14
      Timur Tabi authored
      
      Add a prototype for fdt_increase_size() so that anyone can call it.
      
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      b3606f14
    • Timur Tabi's avatar
      fdt: introduce fdt_verify_alias_address() and fdt_get_base_address() · bb682001
      Timur Tabi authored
      
      Introduce two functions, fdt_verify_alias_address() and
      fdt_get_base_address(), which can be used to verify the physical address
      of a device in a device tree.
      
      fdt_get_base_address() returns the base address of an SOC or PCI node.
      
      fdt_verify_alias_address() prints a message if the address of a node
      specified by an alias does not match the given physical address.
      
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      bb682001
    • David Gibson's avatar
      libfdt: Implement property iteration functions · d1c63148
      David Gibson authored
      
      For ages, we've been talking about adding functions to libfdt to allow
      iteration through properties.  So, finally, here are some.
      
      I got bogged down on this for a long time because I didn't want to
      expose offsets directly to properties to the callers.  But without
      that, attempting to make reasonable iteration functions just became
      horrible.  So eventually, I settled on an interface which does now
      expose property offsets.  fdt_first_property_offset() and
      fdt_next_property_offset() are used to step through the offsets of the
      properties starting from a particularly node offset.  The details of
      the property at each offset can then be retrieved with either
      fdt_get_property_by_offset() or fdt_getprop_by_offset() which have
      interfaces similar to fdt_get_property() and fdt_getprop()
      respectively.
      
      No explicit testcases are included, but we do use the new functions to
      reimplement the existing fdt_get_property() function.
      
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      
      This was extracted from the DTC commit:
      73dca9ae0b9abe6924ba640164ecce9f8df69c5a Mon Sep 17 00:00:00 2001
      
      Signed-off-by: default avatarGerald Van Baren <vanbaren@cideas.com>
      d1c63148
    • David Gibson's avatar
      Support ePAPR compliant phandle properties · 05a22ba0
      David Gibson authored
      
      Currently, the Linux kernel, libfdt and dtc, when using flattened
      device trees encode a node's phandle into a property named
      "linux,phandle".  The ePAPR specification, however - aiming as it is
      to not be a Linux specific spec - requires that phandles be encoded in
      a property named simply "phandle".
      
      This patch adds support for this newer approach to dtc and libfdt.
      Specifically:
      
      	- fdt_get_phandle() will now return the correct phandle if it
                is supplied in either of these properties
      
      	- fdt_node_offset_by_phandle() will correctly find a node with
                the given phandle encoded in either property.
      
      	- By default, when auto-generating phandles, dtc will encode
                it into both properties for maximum compatibility.  A new -H
                option allows either only old-style or only new-style
                properties to be generated.
      
      	- If phandle properties are explicitly supplied in the dts
      	  file, dtc will not auto-generate ones in the alternate format.
      
      	- If both properties are supplied, dtc will check that they
                have the same value.
      
      	- Some existing testcases are updated to use a mix of old and
                new-style phandles, partially testing the changes.
      
      	- A new phandle_format test further tests the libfdt support,
                and the -H option.
      
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      
      This was extracted from the DTC commit:
      d75b33af676d0beac8398651a7f09037555a550b Mon Sep 17 00:00:00 2001
      
      Signed-off-by: default avatarGerald Van Baren <vanbaren@cideas.com>
      05a22ba0
  2. Jul 11, 2011
  3. Jul 07, 2011
  4. Jul 04, 2011
Loading