25 May, 2011

1 commit


11 May, 2011

1 commit


20 Apr, 2011

1 commit


31 Mar, 2011

1 commit


24 Mar, 2011

4 commits


17 Mar, 2011

1 commit

  • * 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
    tty: serial: altera_jtaguart: Add device tree support
    tty: serial: altera_uart: Add devicetree support
    dt: eliminate of_platform_driver shim code
    dt: Eliminate of_platform_{,un}register_driver
    dt/serial: Eliminate users of of_platform_{,un}register_driver
    dt/usb: Eliminate users of of_platform_{,un}register_driver
    dt/video: Eliminate users of of_platform_{,un}register_driver
    dt/net: Eliminate users of of_platform_{,un}register_driver
    dt/sound: Eliminate users of of_platform_{,un}register_driver
    dt/spi: Eliminate users of of_platform_{,un}register_driver
    dt: uartlite: merge platform and of_platform driver bindings
    dt: xilinx_hwicap: merge platform and of_platform driver bindings
    ipmi: convert OF driver to platform driver
    leds/leds-gpio: merge platform_driver with of_platform_driver
    dt/sparc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: Eliminate users of of_platform_{,un}register_driver
    dt/powerpc: move of_bus_type infrastructure to ibmebus
    drivercore/dt: add a match table pointer to struct device
    dt: Typo fix.
    altera_ps2: Add devicetree support
    ...

    Linus Torvalds
     

16 Mar, 2011

1 commit

  • …el/git/tip/linux-2.6-tip

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (27 commits)
    x86: Clean up apic.c and apic.h
    x86: Remove superflous goal definition of tsc_sync
    x86: dt: Correct local apic documentation in device tree bindings
    x86: dt: Cleanup local apic setup
    x86: dt: Fix OLPC=y/INTEL_CE=n build
    rtc: cmos: Add OF bindings
    x86: ce4100: Use OF to setup devices
    x86: ioapic: Add OF bindings for IO_APIC
    x86: dtb: Add generic bus probe
    x86: dtb: Add support for PCI devices backed by dtb nodes
    x86: dtb: Add device tree support for HPET
    x86: dtb: Add early parsing of IO_APIC
    x86: dtb: Add irq domain abstraction
    x86: dtb: Add a device tree for CE4100
    x86: Add device tree support
    x86: e820: Remove conditional early mapping in parse_e820_ext
    x86: OLPC: Make OLPC=n build again
    x86: OLPC: Remove extra OLPC_OPENFIRMWARE_DT indirection
    x86: OLPC: Cleanup config maze completely
    x86: OLPC: Hide OLPC_OPENFIRMWARE config switch
    ...

    Fix up conflicts in arch/x86/platform/ce4100/ce4100.c

    Linus Torvalds
     

03 Mar, 2011

1 commit

  • Commit e2f2a93b, "of/promtree: add package-to-path support to pdt"
    changed dp->name from using the 'name' property to using
    package-to-path. This fixed /proc/device-tree creation by eliminating
    conflicts between names (the 'name' property provides names like
    'battery', whereas package-to-path provides names like
    '/foo/bar/battery@0', which we stripped to 'battery@0'). However, it
    also breaks of_device_id table matching.

    The fix that we _really_ wanted was to keep dp->name based upon
    the name property ('battery'), but based dp->full_name upon
    package-to-path ('battery@0'). This patch does just that.

    This changes all users (except SPARC) of promtree to use the full
    result from package-to-path for full_name, rather than stripping the
    directory out. In practice, the strings end up being exactly the
    same; this change saves time, code, and memory.

    SPARC continues to use the existing build_path_component() code.

    v2: combine two patches and revert of_pdt_node_name to original version
    v3: use dp->phandle instead of passing around node
    v4: warn/bail out for non-sparc archs if pkg2path is not set
    v5: split of_pdt_build_full_name into sparc & non-sparc versions
    v6: Pass NULL to pkg2path before buf gets assigned.
    Drop check for pkg2path hook on each and every node.
    v7: Don't BUG() when unable to get the full_path; create a
    known-unique name instead.

    Signed-off-by: Andres Salomon
    Signed-off-by: Grant Likely

    Andres Salomon
     

02 Mar, 2011

1 commit

  • Commit eca393016, "of: Merge of_platform_bus_type with
    platform_bus_type" added a shim to allow of_platform_drivers to get
    registers onto the platform bus so that there was time to migrate the
    existing drivers to the platform_bus_type.

    This patch removes the shim since there are no more users of the old
    interface.

    Signed-off-by: Grant Likely

    Grant Likely
     

28 Feb, 2011

1 commit

  • arch/powerpc/kernel/ibmebus.c is the only remaining user of the
    of_bus_type support code for initializing the bus and registering
    drivers. All others have either been switched to the vanilla platform
    bus or already have their own infrastructure.

    This patch moves the functionality that ibmebus is using out of
    drivers/of/{platform,device}.c and into ibmebus.c where it is actually
    used. Also renames the moved symbols from of_platform_* to
    ibmebus_bus_* to reflect the actual usage.

    This patch is part of moving all of the of_platform_bus_type users
    over to the platform_bus_type.

    Signed-off-by: Grant Likely

    Grant Likely
     

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


16 Jan, 2011

1 commit


11 Jan, 2011

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
    of/flattree: forward declare struct device_node in of_fdt.h
    ipmi: explicitly include of_address.h and of_irq.h
    sparc: explicitly cast negative phandle checks to s32
    powerpc/405: Fix missing #{address,size}-cells in i2c node
    powerpc/5200: dts: refactor dts files
    powerpc/5200: dts: Change combatible strings on localbus
    powerpc/5200: dts: remove unused properties
    powerpc/5200: dts: rename nodes to prepare for refactoring dts files
    of/flattree: Update dtc to current mainline.
    of/device: Don't register disabled devices
    powerpc/dts: fix syntax bugs in bluestone.dts
    of: Fixes for OF probing on little endian systems
    of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
    of/flattree: Add of_flat_dt_match() helper function
    of_serial: explicitly include of_irq.h
    of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
    of/flattree: Reorder unflatten_dt_node
    of/flattree: Refactor unflatten_dt_node
    of/flattree: Add non-boottime device tree functions
    of/flattree: Add Kconfig for EARLY_FLATTREE
    ...

    Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.

    Linus Torvalds
     

04 Jan, 2011

1 commit

  • Device nodes with the property status="disabled" are not usable and so
    don't register them when parsing the device tree for devices.

    Signed-off-by: Grant Likely
    Cc: Hollis Blanchard
    Cc: Deepak Saxena
    Cc: Scott Wood ,
    Cc: David Gibson
    Cc: Benjamin Herrenschmidt

    Grant Likely
     

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
     

24 Dec, 2010

3 commits

  • If we are registering an i2c device that has a device tree node like
    this real-world example:

    rtc@68 {
    compatible = "dallas,ds1337";
    reg = ;
    };

    of_i2c_register_devices() will try to load a module called ds1337.ko.
    There is no such module, so it will fail. If we look in modules.alias
    we will find entries like these:

    .
    .
    .
    alias i2c:ds1339 rtc_ds1307
    alias i2c:ds1338 rtc_ds1307
    alias i2c:ds1337 rtc_ds1307
    alias i2c:ds1307 rtc_ds1307
    alias i2c:ds1374 rtc_ds1374
    .
    .
    .

    The module we want is really called rtc_ds1307.ko. If we request a
    module called "i2c:ds1337", the userspace module loader will do the
    right thing (unless it is busybox) and load rtc_ds1307.ko. So we add
    the I2C_MODULE_PREFIX to the request_module() string.

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

    David Daney
     
  • In of_mdiobus_register(), the __be32 *addr variable is dereferenced.
    This will not work on little-endian targets. Also since it is
    unsigned, checking for less than zero is redundant.

    Fix these two issues.

    Signed-off-by: David Daney
    [grant.likely@secretlab.ca: removed goto]
    Signed-off-by: Grant Likely

    David Daney
     
  • This patch changes u32 to __be32 for all "ranges", "prop" and "addr" and
    such. Those variables are pointing to the device tree which contains
    integers in big endian format.

    Most functions are doing it right because of_read_number() is doing the
    right thing for them. of_bus_isa_get_flags(), of_bus_pci_get_flags() and
    of_bus_isa_map() were accessing the data directly and were doing it wrong.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Grant Likely

    Sebastian Andrzej Siewior
     

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
     

22 Oct, 2010

3 commits

  • The __init directives should go on the definitions of things, not the
    declaration, also __init is meaningless for inline functions, so
    remove it from prom.h. This allows us to get rid of a useless
    #include, but most of the rest of them are useless too, so kill them
    as well.

    If of_i2c.c needs irq definitions, it should include linux/irq.h
    directly, not assume indirect inclusion via asm/prom.h.

    Signed-off-by: David Daney
    Acked-by: Ralf Baechle
    Signed-off-by: Grant Likely

    David Daney
     
  • 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
     
  • The current code allocates and manages platform_devices created from
    the device tree manually. It also uses an unsafe shortcut for
    allocating the platform_device and the resource table at the same
    time. (which I added in the last rework; sorry).

    This patch refactors the code to use platform_device_alloc() for
    allocating new devices. This reduces the amount of custom code
    implemented by of_platform, eliminates the unsafe alloc trick, and has
    the side benefit of letting the platform_bus code manage freeing the
    device data and resources when the device is freed.

    Signed-off-by: Grant Likely
    Cc: Benjamin Herrenschmidt
    Cc: Greg Kroah-Hartman
    Cc: "David S. Miller"
    Cc: Michal Simek

    Grant Likely
     

13 Oct, 2010

5 commits


11 Oct, 2010

1 commit


09 Oct, 2010

1 commit


06 Aug, 2010

1 commit

  • of_device is just an alias for platform_device, so remove it entirely. Also
    replace to_of_device() with to_platform_device() and update comment blocks.

    This patch was initially generated from the following semantic patch, and then
    edited by hand to pick up the bits that coccinelle didn't catch.

    @@
    @@
    -struct of_device
    +struct platform_device

    Signed-off-by: Grant Likely
    Reviewed-by: David S. Miller

    Grant Likely
     

01 Aug, 2010

1 commit

  • Currently there are some drivers in tree which register both a
    platform_driver and an of_platform_driver with the same name. This is
    a temporary situation until all the relevant of_platform_drivers are
    converted to be normal platform_drivers. Until then, this patch gives
    all the of_platform_drivers an "of:" prefix to protect against bogus
    matches and namespace conflicts.

    Grant Likely