01 Nov, 2011

1 commit


22 Jun, 2011

3 commits


24 Mar, 2011

1 commit


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
     

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
     

24 Jul, 2010

5 commits

  • This list used was by only two platforms with all other platforms defining an
    own list of valid bus id's to pass to of_platform_bus_probe. This patch:

    i) copies the default list to the two platforms that depended on it (powerpc)
    ii) remove the usage of of_default_bus_ids in of_platform_bus_probe
    iii) removes the definition of the list from all architectures that defined it

    Passing a NULL 'matches' parameter to of_platform_bus_probe is still valid; the
    function returns no error in that case as the NULL value is equivalent to an
    empty list.

    Signed-off-by: Jonas Bonn
    [grant.likely@secretlab.ca: added __initdata annotations, warn on and return error on missing match table, and fix whitespace errors]
    Signed-off-by: Grant Likely

    Jonas Bonn
     
  • of_device is currently just an #define alias to platform_device until it
    gets removed entirely. This patch removes references to it from the
    include directories and the core drivers/of code.

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

    Grant Likely
     
  • Only thing left in it is of_instantiate_rtc() which can be moved to
    asm/prom.h on PowerPC and is unused in microblaze.

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

    Grant Likely
     
  • Both of_bus_type and of_platform_bus_type are just #define aliases
    for the platform bus. This patch removes all references to them and
    switches to the of_register_platform_driver()/of_unregister_platform_driver()
    API for registering.

    Subsequent patches will convert each user of of_register_platform_driver()
    into plain platform_drivers without the of_platform_driver shim. At which
    point the of_register_platform_driver()/of_unregister_platform_driver()
    functions can be removed.

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

    Grant Likely
     
  • of_platform_bus was being used in the same manner as the platform_bus.
    The only difference being that of_platform_bus devices are generated
    from data in the device tree, and platform_bus devices are usually
    statically allocated in platform code. Having them separate causes
    the problem of device drivers having to be registered twice if it
    was possible for the same device to appear on either bus.

    This patch removes of_platform_bus_type and registers all of_platform
    bus devices and drivers on the platform bus instead. A previous patch
    made the of_device structure an alias for the platform_device structure,
    and a shim is used to adapt of_platform_drivers to the platform bus.

    After all of of_platform_bus drivers are converted to be normal platform
    drivers, the shim code can be removed.

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

    Grant Likely
     

06 Jul, 2010

2 commits

  • This patch merges the common routines of_device_alloc() and
    of_device_make_bus_id() from powerpc and microblaze.

    Signed-off-by: Grant Likely
    CC: Michal Simek
    CC: Grant Likely
    CC: Benjamin Herrenschmidt
    CC: Stephen Rothwell
    CC: microblaze-uclinux@itee.uq.edu.au
    CC: linuxppc-dev@ozlabs.org
    CC: devicetree-discuss@lists.ozlabs.org

    Grant Likely
     
  • Merge common code between PowerPC and microblaze. This patch merges
    the code that scans the tree and registers devices. The functions
    merged are of_platform_bus_probe(), of_platform_bus_create(), and
    of_platform_device_create().

    This patch also move the of_default_bus_ids[] table out of a Microblaze
    header file and makes it non-static. The device ids table isn't merged
    because powerpc and microblaze use different default data.

    Signed-off-by: Grant Likely
    CC: Michal Simek
    CC: Grant Likely
    CC: Benjamin Herrenschmidt
    CC: Stephen Rothwell
    CC: microblaze-uclinux@itee.uq.edu.au
    CC: linuxppc-dev@ozlabs.org

    Grant Likely
     

22 May, 2010

1 commit

  • .name, .match_table and .owner are duplicated in both of_platform_driver
    and device_driver. This patch is a removes the extra copies from struct
    of_platform_driver and converts all users to the device_driver members.

    This patch is a pretty mechanical change. The usage model doesn't change
    and if any drivers have been missed, or if anything has been fixed up
    incorrectly, then it will fail with a compile time error, and the fixup
    will be trivial. This patch looks big and scary because it touches so
    many files, but it should be pretty safe.

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

    Grant Likely
     

29 Apr, 2010

1 commit


03 May, 2009

1 commit

  • Some drivers using of_register_platform_driver() wrapper break on sparc
    because the wrapper isn't in the header file. This patch moves it from
    Microblaze and PowerPC implementations and makes it common code.

    Fixes this sparc64 allmodconfig build error (at least):

    drivers/leds/leds-gpio.c: In function `gpio_led_init':
    drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver'
    drivers/leds/leds-gpio.c: In function `gpio_led_exit':
    drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver'

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller
    Cc: Michal Simek
    Cc: Benjamin Herrenschmidt
    Cc: Stephen Rothwell
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grant Likely
     

05 Dec, 2008

1 commit


18 Oct, 2007

1 commit


22 Jul, 2007

2 commits


20 Jul, 2007

2 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
     
  • Move common stuff from asm-powerpc/of_platform.h to here and
    move the common bits from asm-sparc*/of_device.h here as well.

    Create asm-sparc*/of_platform.h and move appropriate parts of
    of_device.h to them.

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

    Stephen Rothwell