1. 18 2月, 2019 5 次提交
  2. 24 12月, 2018 1 次提交
  3. 22 12月, 2018 1 次提交
  4. 21 1月, 2018 2 次提交
  5. 15 1月, 2018 1 次提交
  6. 10 1月, 2018 1 次提交
  7. 04 12月, 2017 1 次提交
  8. 23 8月, 2017 1 次提交
  9. 25 9月, 2016 1 次提交
    • S
      powerpc/fsl_pci: Size upper inbound window based on RAM size · 63f1de88
      Scott Wood 提交于
      This allows PCI devices that can only address (e.g.) 36 or 40 bit DMA to
      use direct DMA, at the cost of not being able to DMA to non-RAM addresses
      (this doesn't affect MSIs as there is a separate dedicated window for
      that) which we wouldn't have been able to do anyway if the RAM size didn't
      trigger the creation of the second inbound window.
      
      It also fixes an off-by-one error that set dma_direct_ops on PCI devices
      whose dma mask could address all the space below the DMA offset
      (previously 40 bits), but not the window that starts at the DMA offset.
      Signed-off-by: NScott Wood <oss@buserror.net>
      Cc: Tillmann Heidsieck <theidsieck@leenox.de>
      Tested-by: NTillmann Heidsieck <theidsieck@leenox.de>
      63f1de88
  10. 16 5月, 2016 1 次提交
    • C
      powerpc/fsl-pci: Add a workaround for PCI 5 errata · a8165d42
      chenhui zhao 提交于
      Issue:
      As a master, the PCI IP block can combine a memory write to the last PCI
      double word (4 bytes) of a cacheline with a 4 byte memory write to the
      first PCI double word of the subsequent cacheline. This affects 32-bit
      PCI target devices that blindly assert STOP on memory-write transactions,
      without detecting that the data beat being transferred is the last data
      beat of the transaction. It can cause a hang. PCI-X operation is not
      affected by this erratum.
      
      Workaround:
      Setting the bit MDS in the PCI Bus Function Register will disable the
      combining of crossing cacheline boundary requests into one burst
      transaction. Therefore, it can prevent the errata scenario from
      occurring.
      
      This errata exists in MPC8543, MPC8543E, MPC8545, MPC8545E, MPC8547,
      MPC8547E, MPC8548 and MPC8548E. Refer to PCI 5 in MPC8548 errata
      document.
      Signed-off-by: NZhao Chenhui <chenhui.zhao@freescale.com>
      Signed-off-by: NZhiqiang Hou <Zhiqiang.Hou@freescale.com>
      [scottwood: whitespace fix]
      Signed-off-by: NScott Wood <oss@buserror.net>
      a8165d42
  11. 01 3月, 2016 1 次提交
  12. 23 12月, 2015 1 次提交
  13. 11 12月, 2015 1 次提交
    • S
      EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device · 666db563
      Scott Wood 提交于
      Originally the mpc85xx-pci-edac driver bound directly to the PCI
      controller node.
      
      Commit
      
        905e75c4 ("powerpc/fsl-pci: Unify pci/pcie initialization code")
      
      turned the PCI controller code into a platform device. Since we can't
      have two drivers binding to the same device, the EDAC code was changed
      to be called into as a library-style submodule. However, this doesn't
      work if the EDAC driver is built as a module.
      
      Commit
      
        8d8fcba6d1ea ("EDAC: Rip out the edac_subsys reference counting")
      
      exposed another problem with this approach -- mpc85xx_pci_err_probe()
      was being called in the same early boot phase that the PCI controller
      is initialized, rather than in the device_initcall phase that the EDAC
      layer expects. This caused a crash on boot.
      
      To fix this, the PCI controller code now creates a child platform device
      specifically for EDAC, which the mpc85xx-pci-edac driver binds to.
      Reported-by: NMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Daniel Axtens <dja@axtens.net>
      Cc: Doug Thompson <dougthompson@xmission.com>
      Cc: Jia Hongtao <B38951@freescale.com>
      Cc: Jiri Kosina <jkosina@suse.com>
      Cc: Kim Phillips <kim.phillips@freescale.com>
      Cc: linux-edac <linux-edac@vger.kernel.org>
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: Masanari Iida <standby24x7@gmail.com>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Rob Herring <robh@kernel.org>
      Link: http://lkml.kernel.org/r/1449774432-18593-1-git-send-email-scottwood@freescale.comSigned-off-by: NBorislav Petkov <bp@suse.de>
      666db563
  14. 06 11月, 2015 1 次提交
    • A
      uaccess: reimplement probe_kernel_address() using probe_kernel_read() · 0ab32b6f
      Andrew Morton 提交于
      probe_kernel_address() is basically the same as the (later added)
      probe_kernel_read().
      
      The return value on EFAULT is a bit different: probe_kernel_address()
      returns number-of-bytes-not-copied whereas probe_kernel_read() returns
      -EFAULT.  All callers have been checked, none cared.
      
      probe_kernel_read() can be overridden by the architecture whereas
      probe_kernel_address() cannot.  parisc, blackfin and um do this, to insert
      additional checking.  Hence this patch possibly fixes obscure bugs,
      although there are only two probe_kernel_address() callsites outside
      arch/.
      
      My first attempt involved removing probe_kernel_address() entirely and
      converting all callsites to use probe_kernel_read() directly, but that got
      tiresome.
      
      This patch shrinks mm/slab_common.o by 218 bytes.  For a single
      probe_kernel_address() callsite.
      
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0ab32b6f
  15. 17 10月, 2015 2 次提交
  16. 07 8月, 2015 1 次提交
  17. 11 4月, 2015 1 次提交
    • D
      powerpc: fsl_pci, swiotlb: Move controller ops from ppc_md to controller_ops · 97884e00
      Daniel Axtens 提交于
      Move the installation of DMA operations out of swiotlb's subsys
      initcall, and into the generic PCI controller operations struct.
      
      These ops are installed conditionally, based on the ppc_swiotlb_enable
      global. The global can be set in two places:
       - swiotlb_detect_4g, which is always called at the arch initcall level
       - setup_pci_atmu, which is called as part of the fsl_add_bridge and
      fsl_pci_syscore_do_resume.
      
      fsl_pci_syscore_do_resume is called late enough that any changes as a
      result of that call will have no effect.
      
      As such, if we test the global and set the operations as part of
      fsl_add_bridge, after the call to setup_pci_atmu, we can be confident
      that it will cover all the PCI implementations affected by the changes
      to dma-swiotlb.c.
      Signed-off-by: NDaniel Axtens <dja@axtens.net>
      Acked-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      97884e00
  18. 31 1月, 2015 1 次提交
  19. 30 1月, 2015 1 次提交
  20. 19 11月, 2014 1 次提交
    • M
      powerpc: Remove more traces of bootmem · e39f223f
      Michael Ellerman 提交于
      Although we are now selecting NO_BOOTMEM, we still have some traces of
      bootmem lying around. That is because even with NO_BOOTMEM there is
      still a shim that converts bootmem calls into memblock calls, but
      ultimately we want to remove all traces of bootmem.
      
      Most of the patch is conversions from alloc_bootmem() to
      memblock_virt_alloc(). In general a call such as:
      
        p = (struct foo *)alloc_bootmem(x);
      
      Becomes:
      
        p = memblock_virt_alloc(x, 0);
      
      We don't need the cast because memblock_virt_alloc() returns a void *.
      The alignment value of zero tells memblock to use the default alignment,
      which is SMP_CACHE_BYTES, the same value alloc_bootmem() uses.
      
      We remove a number of NULL checks on the result of
      memblock_virt_alloc(). That is because memblock_virt_alloc() will panic
      if it can't allocate, in exactly the same way as alloc_bootmem(), so the
      NULL checks are and always have been redundant.
      
      The memory returned by memblock_virt_alloc() is already zeroed, so we
      remove several memsets of the result of memblock_virt_alloc().
      
      Finally we convert a few uses of __alloc_bootmem(x, y, MAX_DMA_ADDRESS)
      to just plain memblock_virt_alloc(). We don't use memblock_alloc_base()
      because MAX_DMA_ADDRESS is ~0ul on powerpc, so limiting the allocation
      to that is pointless, 16XB ought to be enough for anyone.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e39f223f
  21. 10 11月, 2014 1 次提交
  22. 04 9月, 2014 1 次提交
    • A
      powerpc: fsl_pci: Add forced PCI Agent enumeration · 00406e87
      Aaron Sierra 提交于
      The following commit prevents the MPC8548E on the XPedite5200 PrPMC
      module from enumerating its PCI/PCI-X bus:
      
          powerpc/fsl-pci: use 'Header Type' to identify PCIE mode
      
      The previous patch prevents any Freescale PCI-X bridge from enumerating
      the bus, if it is hardware strapped into Agent mode.
      
      In PCI-X, the Host is responsible for driving the PCI-X initialization
      pattern to devices on the bus, so that they know whether to operate in
      conventional PCI or PCI-X mode as well as what the bus timing will be.
      For a PCI-X PrPMC, the pattern is driven by the mezzanine carrier it is
      installed onto. Therefore, PrPMCs are PCI-X Agents, but one per system
      may still enumerate the bus.
      
      This patch causes the device node of any PCI/PCI-X bridge strapped into
      Agent mode to be checked for the fsl,pci-agent-force-enum property. If
      the property is present in the node, the bridge will be allowed to
      enumerate the bus.
      
      Cc: Minghuan Lian <Minghuan.Lian@freescale.com>
      Signed-off-by: NAaron Sierra <asierra@xes-inc.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      00406e87
  23. 30 7月, 2014 1 次提交
  24. 23 5月, 2014 1 次提交
  25. 20 3月, 2014 2 次提交
    • W
      fsl/pci: The new pci suspend/resume implementation · 48b16180
      Wang Dongsheng 提交于
      If we do nothing in suspend/resume, some platform PCIe ip-block
      can't guarantee the link back to L0 state from sleep, then, when
      we read the EP device will hang. Only we send pme turnoff message
      in pci controller suspend, and send pme exit message in resume, the
      link state will be normal.
      
      When we send pme turnoff message in pci controller suspend, the
      links will into l2/l3 ready, then, host cannot communicate with
      ep device, but pci-driver will call back EP device to save them
      state. So we need to change platform_driver->suspend/resume to
      syscore->suspend/resume.
      
      So the new suspend/resume implementation, send pme turnoff message
      in suspend, and send pme exit message in resume. And add a PME handler,
      to response PME & message interrupt.
      
      Change platform_driver->suspend/resume to syscore->suspend/resume.
      pci-driver will call back EP device, to save EP state in
      pci_pm_suspend_noirq, so we need to keep the link, until
      pci_pm_suspend_noirq finish.
      Signed-off-by: NWang Dongsheng <dongsheng.wang@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      48b16180
    • M
      powerpc/pci: Fix IMMRBAR address · a424b97b
      Minghuan Lian 提交于
      For PEXCSRBAR, bit 3-0 indicate prefetchable and address type.
      So when getting base address, these bits should be masked,
      otherwise we may get incorrect base address.
      Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      a424b97b
  26. 11 1月, 2014 1 次提交
  27. 08 1月, 2014 1 次提交
  28. 09 12月, 2013 1 次提交
  29. 29 10月, 2013 1 次提交
    • C
      powerpc/pci: Change the DECLARE_PCI_FIXUP_{HEADER => EARLY} macro of pci quirk · bbd234b1
      Chunhe Lan 提交于
      Freescale platform has class code = 0x0b2000, when it boots. This makes
      kernel PCI bus code to setup these devices resulting into the following
      notice information when trying to enable them:
      
      pci 0000:00:00.0: ignoring class 0x0b2000 (doesn't match header type 01)
      
      The above information is outputted by judging value of dev->class before
      pci_setup_device() function, and the DECLARE_PCI_FIXUP_HEADER quirk runs
      after pci_setup_device() function. But the DECLARE_PCI_FIXUP_EARLY quirk
      runs before judging value of dev->class and pci_setup_device() function.
      So we use the DECLARE_PCI_FIXUP_EARLY macro to fix this issue.
      Signed-off-by: NChunhe Lan <Chunhe.Lan@freescale.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      bbd234b1
  30. 24 9月, 2013 1 次提交
  31. 08 8月, 2013 3 次提交