20 Aug, 2008

1 commit

  • Recent of_platform changes made of_bus_type_init() overwrite the bus
    type's .dev_attrs list, meaning that the "name" attribute that ibmebus
    devices previously had is no longer present. This is a user-visible
    regression which breaks the userspace eHCA support, since the eHCA
    userspace driver relies on the name attribute to check for valid
    adapters.

    This fixes it by providing the "name" attribute in the generic OF
    device code instead. Tested on POWER.

    Signed-off-by: Joachim Fenkes
    Signed-off-by: Paul Mackerras

    Joachim Fenkes
     

26 Jul, 2008

4 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
     
  • SPI has a similar problem as I2C in that it needs to determine an
    appropriate modalias value for each device node. This patch adapts
    the of_i2c of_find_i2c_driver() function to be usable by of_spi also.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
    powerpc: Wireup new syscalls
    Move update_mmu_cache() declaration from tlbflush.h to pgtable.h
    powerpc/pseries: Remove kmalloc call in handling writes to lparcfg
    powerpc/pseries: Update arch vector to indicate support for CMO
    ibmvfc: Add support for collaborative memory overcommit
    ibmvscsi: driver enablement for CMO
    ibmveth: enable driver for CMO
    ibmveth: Automatically enable larger rx buffer pools for larger mtu
    powerpc/pseries: Verify CMO memory entitlement updates with virtual I/O
    powerpc/pseries: vio bus support for CMO
    powerpc/pseries: iommu enablement for CMO
    powerpc/pseries: Add CMO paging statistics
    powerpc/pseries: Add collaborative memory manager
    powerpc/pseries: Utilities to set firmware page state
    powerpc/pseries: Enable CMO feature during platform setup
    powerpc/pseries: Split retrieval of processor entitlement data into a helper routine
    powerpc/pseries: Add memory entitlement capabilities to /proc/ppc64/lparcfg
    powerpc/pseries: Split processor entitlement retrieval and gathering to helper routines
    powerpc/pseries: Remove extraneous error reporting for hcall failures in lparcfg
    powerpc: Fix compile error with binutils 2.15
    ...

    Fixed up conflict in arch/powerpc/platforms/52xx/Kconfig manually.

    Linus Torvalds
     
  • 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
     

22 Jul, 2008

1 commit

  • If an I2C device node does not specify an interrupt, the .irq member of the
    board_info struct was set to -1. This caused crashes on following
    irq_dispose_mappings. Leave it NO_IRQ as returned from irq_of_parse_and_map.
    (Suggesting -1 as 'i2c-no-irq' used to be a bug in linux/i2c.h.)

    Signed-off-by: Wolfram Sang
    Acked-by: Sean MacLennan
    Signed-off-by: Grant Likely

    Wolfram Sang
     

13 Jul, 2008

1 commit


09 Jun, 2008

1 commit


07 Jun, 2008

1 commit

  • Change the name of the device from "rtc-ds1374" to just "ds1374", to match
    what all other RTC drivers do. I seem to remember that this name was
    chosen to avoid possible confusion with an older ds1374 driver, but that
    driver was removed 3 months ago.

    Signed-off-by: Jean Delvare
    Signed-off-by: Alessandro Zummo
    Acked-by: Kumar Gala
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     

23 May, 2008

1 commit

  • Since the "gpiolib: dynamic gpio number allocation" patch was recently
    merged into Linus' tree (commit 8d0aab2f16c4fa170f32e7a74a52cd0122bbafef),
    we can use dynamic GPIO base allocation now.

    This, in turn, removes number of gpios per chip constraint.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Paul Mackerras

    Anton Vorontsov
     

16 May, 2008

2 commits


15 May, 2008

1 commit

  • Update function of_find_property() to return NULL if the device_node
    passed to it is also NULL. Otherwise, passing NULL will cause a null
    pointer dereference.

    Without this, the legacy_serial driver will crash if there's no
    'chosen' node in the device tree.

    Signed-off-by: Timur Tabi
    Signed-off-by: Paul Mackerras

    Timur Tabi
     

14 May, 2008

1 commit

  • Create /sys/bus/of_platform/devices/*/modalias file to allow autoloading
    of modules. Modalias files are already present for many other bus types.
    This adds also a newline to the devspec files.

    Also create a devspec file for mac-io devices. They were created as a
    side effect. Use correct buffer size for mac-io modalias buffer.

    Tested on iBook1 and Efika.

    Signed-off-by: Olaf Hering
    Signed-off-by: Paul Mackerras

    Olaf Hering
     

24 Apr, 2008

1 commit


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
     

07 Apr, 2008

1 commit

  • IEEE 1275 defined a standard "status" property to indicate the operational
    status of a device. The property has four possible values: okay, disabled,
    fail, fail-xxx. The absence of this property means the operational status
    of the device is unknown or okay.

    This adds a function called of_device_is_available that checks the state
    of the status property of a device. If the property is absent or set to
    either "okay" or "ok", it returns 1. Otherwise it returns 0.

    Signed-off-by: Josh Boyer
    Signed-off-by: Paul Mackerras

    Josh Boyer
     

06 Feb, 2008

2 commits

  • Although of_platform_device's can have a shutdown routine, at the moment
    the bus code doesn't actually call it. So add the required glue to
    hook the shutdown routine.

    Signed-off-by: Michael Ellerman
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     
  • Iterating through a device node's parents is simple enough, but dealing
    with the refcounts properly is a little ugly, and replicating that logic
    is asking for someone to get it wrong or forget it all together, eg:

    while (dn != NULL) {
    /* loop body */
    tmp = of_get_parent(dn);
    of_node_put(dn);
    dn = tmp;
    }

    So add of_get_next_parent(), inspired by of_get_next_child(). The
    contract is that it returns the parent and drops the reference on the
    current node, this makes the loop look like:

    while (dn != NULL) {
    /* loop body */
    dn = of_get_next_parent(dn);
    }

    Signed-off-by: Michael Ellerman
    Acked-by: David S. Miller
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     

17 Jan, 2008

1 commit

  • Similar to of_find_compatible_node(), of_find_matching_node() and
    for_each_matching_node() allow you to iterate over the device tree
    looking for specific nodes, except that they take of_device_id
    tables instead of strings.

    This also moves of_match_node() from driver/of/device.c to
    driver/of/base.c to colocate it with the of_find_matching_node which
    depends on it.

    Signed-off-by: Grant Likely
    Signed-off-by: Paul Mackerras

    Grant Likely
     

18 Oct, 2007

1 commit


20 Jul, 2007

9 commits

  • and populate it with the common parts from PowerPC and Sparc[64].

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

    Stephen Rothwell
     
  • This just moves the common stuff from the arch of_device.h files to
    linux/of_device.h.

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

    Stephen Rothwell
     
  • 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
     
  • This consolidates the routines of_find_node_by_path, of_find_node_by_name,
    of_find_node_by_type and of_find_compatible_device. Again, the comparison
    of strings are done differently by Sparc and PowerPC and also these add
    read_locks around the iterations.

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

    Stephen Rothwell
     
  • This adds a read_lock around the child/next accesses on Sparc.

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

    Stephen Rothwell
     
  • This requires creating dummy of_node_{get,put} routines for sparc and
    sparc64. It also adds a read_lock around the parent accesses.

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

    Stephen Rothwell
     
  • The only change here is that a readlock is taken while the property list
    is being traversed on Sparc where it was not taken previously.

    Also, Sparc uses strcasecmp to compare property names while PowerPC
    uses strcmp.

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

    Stephen Rothwell
     
  • The only difference here is that Sparc uses strncmp to match compatibility
    names while PowerPC uses strncasecmp.

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

    Stephen Rothwell
     
  • This creates drivers/of/base.c (depending on CONFIG_OF) and puts
    the first trivially common bits from the prom.c files into it.

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

    Stephen Rothwell