13 Dec, 2011

1 commit

  • Add some runtime test cases for the library of device tree parsing functions.

    v2: - Add testcase for phandle with 0 args
    - Don't run testcases if testcase data isn't present in device tree

    Signed-off-by: Grant Likely

    Grant Likely
     

08 Jun, 2011

1 commit

  • powerpc has two different ways of matching PCI devices to their
    corresponding OF node (if any) for historical reasons. The ppc64 one
    does a scan looking for matching bus/dev/fn, while the ppc32 one does a
    scan looking only for matching dev/fn on each level in order to be
    agnostic to busses being renumbered (which Linux does on some
    platforms).

    This removes both and instead moves the matching code to the PCI core
    itself. It's the most logical place to do it: when a pci_dev is created,
    we know the parent and thus can do a single level scan for the matching
    device_node (if any).

    The benefit is that all archs now get the matching for free. There's one
    hook the arch might want to provide to match a PHB bus to its device
    node. A default weak implementation is provided that looks for the
    parent device device node, but it's not entirely reliable on powerpc for
    various reasons so powerpc provides its own.

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Michal Simek
    Acked-by: Jesse Barnes

    Benjamin Herrenschmidt
     

24 Feb, 2011

1 commit

  • x86_of_pci_init() does two things:

    - it provides a generic irq enable and disable function. enable queries
    the device tree for the interrupt information, calls ->xlate on the
    irq host and updates the pci->irq information for the device.

    - it walks through PCI bus(es) in the device tree and adds its children
    (device) nodes to appropriate pci_dev nodes in kernel. So the dtb
    node information is available at probe time of the PCI device.

    Adding a PCI bus based on the information in the device tree is
    currently not supported. Right now direct access via ioports is used.

    Signed-off-by: Sebastian Andrzej Siewior
    Tested-by: Dirk Brandewie
    Acked-by: Grant Likely
    Cc: sodaville@linutronix.de
    Cc: devicetree-discuss@lists.ozlabs.org
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     

05 Feb, 2011

1 commit


30 Dec, 2010

1 commit

  • 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
     

01 Nov, 2010

1 commit

  • There are two identical implementations of of_get_mac_address(), one
    each in arch/powerpc/kernel/prom_parse.c and
    arch/microblaze/kernel/prom_parse.c. Move this function to a new
    common file of_net.{c,h} and adjust all the callers to include the new
    header.

    Signed-off-by: David Daney
    [grant.likely@secretlab.ca: protect header with #ifdef]
    Signed-off-by: Grant Likely

    David Daney
     

11 Oct, 2010

1 commit


06 Jul, 2010

5 commits

  • Microblaze and PPC both use PROC_DEVICETREE, and OLPC will as well.. put
    the Kconfig option into fs/ rather than in arch/*/Kconfig.

    Signed-off-by: Andres Salomon
    [grant.likely@secretlab.ca: changed depends to PROC_FS && !SPARC]
    [grant.likely@secretlab.ca: moved to drivers/of/Kconfig]
    Signed-off-by: Grant Likely

    Andres Salomon
     
  • All of the options in drivers/of/Kconfig depend on CONFIG_OF. Putting
    all of them inside a menu block simplifies the dependency statements.
    It also creates a logical group for adding user selectable OF options.

    This patch also changes (PPC_OF || MICROBLAZE) statements to (!SPARC)
    so that those options are available to other architectures (and in
    fact the !SPARC conditions should probably be re-evalutated since the
    code is more generic now)

    This patch also moves the definition of CONFIG_DTC from arch/* to
    drivers/of/Kconfig

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Signed-off-by: Stephen Rothwell
    Signed-off-by: Grant Likely

    Stephen Rothwell
     
  • This patch cleans up the i2c OF support code to make it selectable by
    all architectures and allow for automatic registration of i2c devices.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • Merge common code between Microblaze and PowerPC. This patch creates
    new of_address.h and address.c files to containing address translation
    and mapping routines. First routine to be moved it of_iomap()

    Signed-off-by: Grant Likely
    Acked-by: Benjamin Herrenschmidt
    CC: Michal Simek
    CC: Stephen Rothwell

    Grant Likely
     

29 Jun, 2010

1 commit

  • Merge common code between PowerPC and Microblaze. SPARC implements
    irq_of_parse_and_map(), but the implementation is different, so it
    does not use this code.

    Signed-off-by: Grant Likely
    Acked-by: Benjamin Herrenschmidt
    Cc: Michal Simek
    Cc: "David S. Miller"
    Cc: Stephen Rothwell
    Cc: Jeremy Kerr

    Grant Likely
     

09 Feb, 2010

1 commit


24 Nov, 2009

1 commit


15 Jun, 2009

1 commit


21 May, 2009

1 commit


27 Apr, 2009

1 commit

  • Add support for parsing the device tree for PHY devices on an MDIO bus.
    Currently many of the PowerPC ethernet drivers are open coding a solution
    for reading data out of the device tree to find the correct PHY device.
    This patch implements a set of common routines to:

    a) let MDIO bus drivers register phy_devices described in the tree, and
    b) let MAC drivers find the correct phy_device via the tree.

    Signed-off-by: Grant Likely
    Acked-by: Andy Fleming
    Signed-off-by: David S. Miller

    Grant Likely
     

26 Jul, 2008

2 commits

  • This patch adds support for populating an SPI bus based on data in the
    OF device tree. This is useful for powerpc platforms which use the
    device tree instead of discrete code for describing platform layout.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • This patch adds functionality to the gpio-lib subsystem to make it
    possible to enable the gpio-lib code even if the architecture code didn't
    request to get it built in.

    The archtitecture code does still need to implement the gpiolib accessor
    functions in its asm/gpio.h file. This patch adds the implementations for
    x86 and PPC.

    With these changes it is possible to run generic GPIO expansion cards on
    every architecture that implements the trivial wrapper functions. Support
    for more architectures can easily be added.

    Signed-off-by: Michael Buesch
    Cc: Benjamin Herrenschmidt
    Cc: Stephen Rothwell
    Cc: David Brownell
    Cc: Russell King
    Cc: Haavard Skinnemoen
    Cc: Jesper Nilsson
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Jean Delvare
    Cc: Samuel Ortiz
    Cc: Kumar Gala
    Cc: Sam Ravnborg
    Cc: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Buesch
     

20 Apr, 2008

1 commit

  • Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for
    the i2c API". If i2c-core is compiled as a module, the helper needs
    to be compiled as a module, as well. Rename i2c.c to of_i2c.c to
    avoid name space conflict.

    [paulus@samba.org: Changed dependency from OF to PPC_OF to avoid
    sparc{32,64} allmodconfig breakage.]

    Signed-off-by: Jochen Friedrich
    Signed-off-by: Paul Mackerras

    Jochen Friedrich
     

17 Apr, 2008

2 commits

  • This implements various helpers to support OF bindings for the i2c
    API.

    Signed-off-by: Jochen Friedrich
    Acked-by: David S. Miller
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Jochen Friedrich
     
  • This implements various helpers to support OF bindings for the GPIO
    LIB API.

    Previously this was PowerPC specific, but it seems this code isn't
    arch-dependent anyhow, so let's place it into of/.

    SPARC will not see this addition yet, real hardware seem to not use
    GPIOs at all. But this might change:

    http://www.leox.org/docs/faq_MLleon.html

    "16-bit I/O port" sounds promising. :-)

    Signed-off-by: Anton Vorontsov
    Acked-by: Grant Likely
    Signed-off-by: Paul Mackerras

    Anton Vorontsov
     

20 Jul, 2007

1 commit

  • This moves all the common parts for the Sparc, Sparc64 and PowerPC
    of_device.c files into drivers/of/device.c.

    Apart from the simple move, Sparc gains of_match_node() and a call to
    of_node_put in of_release_dev(). PowerPC gains better recovery if
    device_create_file() fails in of_device_register().

    Signed-off-by: Stephen Rothwell
    Acked-by: Paul Mackerras
    Acked-by: David S. Miller

    Stephen Rothwell