31 Oct, 2008

1 commit

  • Currently, the numa_node of OF-devices will be overwritten during
    device_register, which simply sets the node to -1. On cell machines,
    this means that devices can't find their IOMMU, which is referenced
    through the device's numa node.

    Set the numa node for OF devices with no parent, and use the
    lower-level device_initialize and device_add functions, so that the
    node is preserved.

    We can remove the call to set_dev_node in of_device_alloc, as it
    will be overwritten during register.

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Paul Mackerras

    Jeremy Kerr
     

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
     

16 May, 2008

1 commit

  • Commit 140b932f8cb6cced10b96860651a198b1b89cbb9 ("Create modalias file
    in sysfs for of_platform bus") needs this to avoid breaking the sparc
    builds.

    Just move the code and add whitespace around some binary operators.

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

    Stephen Rothwell
     

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
     

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
     

20 Jul, 2007

2 commits

  • 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