11 May, 2011

1 commit


31 Mar, 2011

1 commit


24 Mar, 2011

1 commit


16 Jan, 2011

1 commit


02 Jan, 2011

1 commit


30 Dec, 2010

5 commits

  • unflatten_device_tree has two dependencies on things that happen
    during boot time. Firstly, it references the initial device tree
    directly. Secondly, it allocates memory using the early boot
    allocator. This patch factors out these dependencies and uses
    the new __unflatten_device_tree function to implement a driver-visible
    fdt_unflatten_tree function, which can be used to unflatten a
    blob after boot time.

    V2:
    - remove extra __va() call
    - make dt_alloc functions return void *. This doesn't fix the general
    strangeness in this code that constantly casts back and forth between
    unsigned long and __be32 *

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • Move unflatten_dt_node to be grouped with non-__init functions.

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • unflatten_dt_node is a helper function that does most of the work to
    convert a device tree blob into tree of device nodes. This code
    now uses a passed-in blob instead of using the single boot-time blob,
    allowing it to be called in more contexts.

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • In preparation for providing run-time handling of device trees, factor
    out some of the basic functions so that they take an arbitrary blob,
    rather than relying on the single boot-time tree.

    V2:
    - functions have of_fdt_* names
    - removed find_flat_dt_string
    - blob argument is first

    Signed-off-by: Stephen Neuendorffer
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     
  • The device tree code is now in two pieces: some which can be used generically
    on any platform which selects CONFIG_OF_FLATTREE, and some early which is used
    at boot time on only a few architectures. This patch segregates the early
    code so that only those architectures which care about it need compile it.
    This also means that some of the requirements in the early code (such as
    a cmd_line variable) that most architectures (e.g. X86) don't provide
    can be ignored.

    Signed-off-by: Stephen Neuendorffer
    [grant.likely@secretlab.ca: remove extra blank line addition]
    [grant.likely@secretlab.ca: fixed incorrect #ifdef CONFIG_EARLY_FLATTREE check]
    [grant.likely@secretlab.ca: Made OF_EARLY_FLATTREE select instead of depend
    on OF_FLATTREE]
    Signed-off-by: Grant Likely

    Stephen Neuendorffer
     

22 Oct, 2010

1 commit

  • This patch refactors the early init parsing of the chosen node so that
    architectures aren't forced to provide an empty implementation of
    early_init_dt_scan_chosen_arch. Instead, if an architecture wants to
    do something different, it can either use a wrapper function around
    early_init_dt_scan_chosen(), or it can replace it altogether.

    This patch was written in preparation to adding device tree support to
    both x86 ad MIPS.

    Signed-off-by: Grant Likely
    Tested-by: David Daney

    Grant Likely
     

25 Jul, 2010

2 commits

  • The flat tree code wasn't fixing the endianness on phandle values when
    unflattening the tree, and the code in drivers/of wasn't always doing a
    be32_to_cpu before trying to dereference the phandle values. This patch
    fixes them.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • With the current string comparison, a device tree compatible of "foo-bar"
    would match as compatible with a driver looking for "foo". This patch
    fixes the function to use the of_compat_cmp() macro so that it does the
    right thing on all platforms (If sparc ever uses this code, it will still
    want the strncasecmp() behaviour).

    Signed-off-by: Stuart Yoder
    Signed-off-by: Grant Likely

    Stuart Yoder
     

15 Jul, 2010

1 commit


29 Apr, 2010

1 commit

  • This patch makes unflatten_device_tree() safe to call from any arch
    setup code with the following changes:
    - Make sure initial_boot_params actually points to a device tree blob
    before unflattening
    - Make sure the initial_boot_params->magic field is correct
    - If CONFIG_OF_FLATTREE is not set, then make unflatten_device_tree()
    an empty static inline function.

    This patch also adds some additional debug output to the top of
    unflatten_device_tree().

    Signed-off-by: Grant Likely

    Grant Likely
     

27 Mar, 2010

1 commit


14 Feb, 2010

1 commit

  • We don't always have lmb available, so make arches provide an
    early_init_dt_alloc_memory_arch() to handle the allocation of
    memory in the fdt code.

    When we don't have lmb.h included, we need asm/page.h for __va.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Grant Likely
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Michal Simek

    Jeremy Kerr
     

09 Feb, 2010

7 commits


29 Jan, 2010

1 commit

  • In struct device_node, the phandle is named 'linux_phandle' for PowerPC
    and MicroBlaze, and 'node' for SPARC. There is no good reason for the
    difference, it is just an artifact of the code diverging over a couple
    of years. This patch renames both to simply .phandle.

    Note: the .node also existed in PowerPC/MicroBlaze, but the only user
    seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't
    look like the assignment between .linux_phandle and .node is
    significantly different enough to warrant the separate code paths
    unless ibm,phandle properties actually appear in Apple device trees.

    I think it is safe to eliminate the old .node property and use
    phandle everywhere.

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller
    Tested-by: Wolfram Sang
    Acked-by: Benjamin Herrenschmidt

    Grant Likely
     

11 Dec, 2009

4 commits


24 Nov, 2009

7 commits