1. 05 Jul, 2010 14 commits
    • Grant Likely's avatar
      of: Merge of_device_alloc() and of_device_make_bus_id() · 94c09319
      Grant Likely authored
      This patch merges the common routines of_device_alloc() and
      of_device_make_bus_id() from powerpc and microblaze.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Grant Likely <grant.likely@secretlab.ca>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      CC: devicetree-discuss@lists.ozlabs.org
      94c09319
    • Grant Likely's avatar
      of/device: Merge of_platform_bus_probe() · 5fd200f3
      Grant Likely authored
      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: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Grant Likely <grant.likely@secretlab.ca>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      5fd200f3
    • Grant Likely's avatar
      of: Modify of_device_get_modalias to be passed struct device · 34a1c1e8
      Grant Likely authored
      Now that the of_node pointer is part of struct device,
      of_device_get_modalias could be used on any struct device
      that has the device node pointer set.  This patch changes
      of_device_get_modalias to accept a struct device instead
      of a struct of_device.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      34a1c1e8
    • Grant Likely's avatar
      of/device: merge of_device_uevent · dd27dcda
      Grant Likely authored
      Merge common code between powerpc and microblaze
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      dd27dcda
    • Grant Likely's avatar
      of: Use full node name in resource structures · d3571c3a
      Grant Likely authored
      Resource names appear in human readable output, so when extracting IRQ
      and address resources from a device tree node, use the full node name
      to give proper context in places like /proc/iomem.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linuxppc-dev@ozlabs.org
      d3571c3a
    • Grant Likely's avatar
      of/address: restrict 'no-ranges' kludge to powerpc · 3930f294
      Grant Likely authored
      Certain Apple machines don't use the ranges property correctly, but the
      workaround should not be applied on other architectures.  This patch
      disables the workaround for non-powerpc architectures.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      3930f294
    • Grant Likely's avatar
      of/address: little-endian fixes · 154063a9
      Grant Likely authored
      Fix some endian issues in the OF address translation code.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      154063a9
    • Grant Likely's avatar
      of/address: Merge all of the bus translation code · dbbdee94
      Grant Likely authored
      Microblaze and PowerPC share a large chunk of code for translating
      OF device tree data into usable addresses.  Differences between the two
      consist of cosmetic differences, and the addition of dma-ranges support
      code to powerpc but not microblaze.  This patch moves the powerpc
      version into common code and applies many of the cosmetic (non-functional)
      changes from the microblaze version.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      dbbdee94
    • Grant Likely's avatar
      of/address: merge of_address_to_resource() · 1f5bef30
      Grant Likely authored
      Merge common code between PowerPC and Microblaze.  This patch also
      moves the prototype of pci_address_to_pio() out of pci-bridge.h and
      into prom.h because the only user of pci_address_to_pio() is
      of_address_to_resource().
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      1f5bef30
    • Grant Likely's avatar
      of/address: merge of_iomap() · 6b884a8d
      Grant Likely authored
      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: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      6b884a8d
    • Rob Herring's avatar
      of/irq: little endian fixes · a7c194b0
      Rob Herring authored
      Fix some endian issues in the irq mapping OF code.
      Signed-off-by: default avatarRob Herring <r.herring@freescale.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Wolfram Sang <w.sang@pengutronix.de>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      a7c194b0
    • Grant Likely's avatar
      of/irq: merge irq mapping code · 7dc2e113
      Grant Likely authored
      Merge common irq mapping code between PowerPC and Microblaze.
      
      This patch merges of_irq_find_parent(), of_irq_map_raw() and
      of_irq_map_one().  The functions are dependent on one another, so all
      three are merged in a single patch.  Other than cosmetic difference
      (ie. DBG() vs. pr_debug()), the implementations are identical.
      
      of_irq_to_resource() is also merged, but in this case the
      implementations are different.  This patch drops the microblaze version
      and uses the powerpc implementation unchanged.  The microblaze version
      essentially open-coded irq_of_parse_and_map() which it does not need
      to do.  Therefore the powerpc version is safe to adopt.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      7dc2e113
    • Grant Likely's avatar
      of/powerpc: Move Powermac irq quirk code into powermac pic driver code · b83da291
      Grant Likely authored
      The code that figures out what is wrong with the powermac irq device
      tree data belongs with the rest of the powermac irq code.  This patch
      moves it out of prom_parse.c and into powermac/pic.c so that it is only
      compiled in when actually needed.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b83da291
    • Grant Likely's avatar
      of/microblaze: strip out of_irq_workarounds code · b6295c8b
      Grant Likely authored
      Microblaze doesn't have any legacy workaround in the device tree irq
      mapping data.  All of the of_irq_workarounds stuff can be dropped
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b6295c8b
  2. 28 Jun, 2010 3 commits
    • Grant Likely's avatar
      of/irq: Move irq_of_parse_and_map() to common code · e3873444
      Grant Likely authored
      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: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      e3873444
    • Grant Likely's avatar
      of: kill struct of_device · b505ff5e
      Grant Likely authored
      Now that the device tree node pointer has been moved out of struct
      of_device and into the common struct device, there isn't anything
      unique about of_device anymore.  In fact, there isn't much need
      for a separate of_bus when all busses have access to OF style
      probing.
      
      arch/powerpc and arch/microblaze are moving away from using the of_bus
      and using the regular platform bus instead for mmio devices.  This
      patch makes of_device the same as platform_device as a stepping stone
      in migrating of_platform_drivers over to the platform bus.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b505ff5e
    • Grant Likely's avatar
      sparc/of: Move of_device fields into struct pdev_archdata · 1636f8ac
      Grant Likely authored
      This patch moves SPARC architecture specific data members out of
      struct of_device and into the pdev_archdata structure.  The reason
      for this change is to unify the struct of_device definition amongst
      all the architectures.  It also remvoes the .sysdata, .slot, .portid
      and .clock_freq properties because they aren't actually used by
      anything.
      
      A subsequent patch will replace struct of_device entirely with struct
      platform_device and the of_platform support code will share common
      routines with the platform bus (but the bus instances themselves can
      remain separate).
      
      This patch also adds 'struct resources *resource' and num_resources
      to match the fields defined in struct platform_device.  After this
      change, 'struct platform_device' can be used as a drop-in replacement
      for 'struct of_platform'.
      
      This change is in preparation for merging the of_platform_bus_type
      with the platform_bus_type.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      1636f8ac
  3. 15 Jun, 2010 5 commits
  4. 14 Jun, 2010 1 commit
  5. 12 Jun, 2010 1 commit
  6. 11 Jun, 2010 16 commits