1. 04 12月, 2006 7 次提交
    • B
      [POWERPC] Refactor 64 bits DMA operations · 12d04eef
      Benjamin Herrenschmidt 提交于
      This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
      is untouched for now.
      
      We use the new dev_archdata structure to add the dma operations pointer
      and associated data to struct device. While at it, we also add the OF node
      pointer and numa node. In the future, we might want to look into merging
      that with pci_dn as well.
      
      The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
      by a set of generic iommu and direct DMA ops (non PCI specific) that can be
      used by bus types. The toplevel implementation is now inline.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      12d04eef
    • B
      [POWERPC] Souped-up of_platform_device support · 7eebde70
      Benjamin Herrenschmidt 提交于
      This patch first splits of_device.c and of_platform.c, the later containing
      the bits relative to of_platform_device's. On the "breaks" side of things,
      drivers uisng of_platform_device(s) need to include asm/of_platform.h now
      and of_(un)register_driver is now of_(un)register_platform_driver.
      
      In addition to a few utility functions to locate of_platform_device(s),
      the main new addition is of_platform_bus_probe() which allows the platform
      code to trigger an automatic creation of of_platform_devices for a whole
      tree of devices.
      
      The function acts based on the type of the various "parent" devices encountered
      from a provided root, using either a default known list of bus types that can be
      "probed" or a passed-in list. It will only register devices on busses matching
      that list, which mean that typically, it will not register PCI devices, as
      expected (since they will be picked up by the PCI layer).
      
      This will be used by Cell platforms using 4xx-type IOs in the Axon bridge
      and can be used by any embedded-type device as well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7eebde70
    • B
      [POWERPC] Improve MPIC driver auto-configuration from DT · a959ff56
      Benjamin Herrenschmidt 提交于
      This patch applies on top of the MPIC DCR support. It makes the MPIC
      driver capable of a lot more auto-configuration based on the device-tree,
      for example, it can retreive it's own physical address if not passed as
      an argument, find out if it's DCR or MMIO mapped, and set the BIG_ENDIAN
      flag automatically in the presence of a "big-endian" property in the
      device-tree node.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a959ff56
    • B
      [POWERPC] Support for DCR based MPIC · fbf0274e
      Benjamin Herrenschmidt 提交于
      This patch implements support for DCR based MPIC implementations. Such
      implementations have the MPIC_USES_DCR flag set and don't use the phys_addr
      argument of mpic_alloc (they require a valid dcr mapping in the device node)
      
      This version of the patch can use a little bif of cleanup still (I can
      probably consolidate rb->dbase/doff, at least once I'm sure on how the
      hardware is actually supposed to work vs. possible simulator issues) and
      it should be possible to build a DCR-only version of the driver. I need
      to cleanup a bit the CONFIG_* handling for that and probably introduce
      CONFIG_MPIC_MMIO and CONFIG_MPIC_DCR.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fbf0274e
    • B
      [POWERPC] Generic DCR infrastructure · 4c75a6f4
      Benjamin Herrenschmidt 提交于
      This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that
      can be used by drivers to transparently address either native DCRs or
      memory mapped DCRs. The implementation for memory mapped DCRs is done
      after the binding being currently worked on for SLOF and the Axon
      chipset. This patch enables it for the cell native platform
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4c75a6f4
    • B
      [POWERPC] Remove ppc_md.pci_map_irq & ppc_swizzle for ARCH=powerpc · 69108cf0
      Benjamin Herrenschmidt 提交于
      These were inherited from ARCH=ppc, but are not needed since parsing of interrupts
      should be done via the of_* functions (who can do swizzling). If we ever need to
      do non-standard swizzling on bridges without a device-node, then we might add
      back a slightly different version of ppc_md.pci_swizzle but for now, that is not
      the case.
      
      I removed the couple of calls for these in 83xx. If that breaks something, then
      there is a problem with the device-tree on these.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      69108cf0
    • B
      [POWERPC] Make pci_read_irq_line the default · f90bb153
      Benjamin Herrenschmidt 提交于
      This patch reworks the way IRQs are fixed up on PCI for arch powerpc.
      
      It makes pci_read_irq_line() called by default in the PCI code for
      devices that are probed, and add an optional per-device fixup in
      ppc_md for platforms that really need to correct what they obtain
      from pci_read_irq_line().
      
      It also removes ppc_md.irq_bus_setup which was only used by pSeries
      and should not be needed anymore.
      
      I've also removed the pSeries s7a workaround as it can't work with
      the current interrupt code anyway. I'm trying to get one of these
      machines working so I can test a proper fix for that problem.
      
      I also haven't updated the old-style fixup code from 85xx_cds.c
      because it's actually buggy :) It assigns pci_dev->irq hard coded
      numbers which is no good with the new IRQ mapping code. It should
      at least use irq_create_mapping(NULL, hard_coded_number); and possibly
      also set_irq_type() to set them as level low.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f90bb153
  2. 03 12月, 2006 33 次提交