1. 30 1月, 2015 1 次提交
  2. 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
  3. 10 11月, 2014 1 次提交
  4. 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
  5. 30 7月, 2014 1 次提交
  6. 23 5月, 2014 1 次提交
  7. 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
  8. 11 1月, 2014 1 次提交
  9. 08 1月, 2014 1 次提交
  10. 09 12月, 2013 1 次提交
  11. 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
  12. 24 9月, 2013 1 次提交
  13. 08 8月, 2013 3 次提交
  14. 31 7月, 2013 1 次提交
  15. 25 6月, 2013 1 次提交
  16. 06 5月, 2013 1 次提交
    • B
      powerpc/pci: Support per-aperture memory offset · 3fd47f06
      Benjamin Herrenschmidt 提交于
      The PCI core supports an offset per aperture nowadays but our arch
      code still has a single offset per host bridge representing the
      difference betwen CPU memory addresses and PCI MMIO addresses.
      
      This is a problem as new machines and hypervisor versions are
      coming out where the 64-bit windows will have a different offset
      (basically mapped 1:1) from the 32-bit windows.
      
      This fixes it by using separate offsets. In the long run, we probably
      want to get rid of that intermediary struct pci_controller and have
      those directly stored into the pci_host_bridge as they are parsed
      but this will be a more invasive change.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3fd47f06
  17. 30 4月, 2013 2 次提交
    • M
      powerpc: Fix usage of setup_pci_atmu() · d5bbe659
      Michael Neuling 提交于
      Linux next is currently failing to compile mpc85xx_defconfig with:
        arch/powerpc/sysdev/fsl_pci.c:944:2: error: too many arguments to function 'setup_pci_atmu'
      
      This is caused by (from Kumar's next branch):
        commit 34642bbb
        Author: Kumar Gala <galak@kernel.crashing.org>
        powerpc/fsl-pci: Keep PCI SoC controller registers in pci_controller
      
      Which changed definition of setup_pci_atmu() but didn't update one of
      the callers.  Below fixes this.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Reviewed-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d5bbe659
    • K
      powerpc/fsl-pci: don't unmap the PCI SoC controller registers in setup_pci_atmu · 04aa99cd
      Kevin Hao 提交于
      In patch 34642bbb (powerpc/fsl-pci: Keep PCI SoC controller registers in
      pci_controller) we choose to keep the map of the PCI SoC controller
      registers. But we missed to delete the unmap in setup_pci_atmu
      function. This will cause the following call trace once we access
      the PCI SoC controller registers later.
      
      Unable to handle kernel paging request for data at address 0x8000080080040f14
      Faulting instruction address: 0xc00000000002ea58
      Oops: Kernel access of bad area, sig: 11 [#1]
      SMP NR_CPUS=24 T4240 QDS
      Modules linked in:
      NIP: c00000000002ea58 LR: c00000000002eaf4 CTR: c00000000002eac0
      REGS: c00000017e10b4a0 TRAP: 0300   Not tainted  (3.9.0-rc1-00052-gfa3529f-dirty)
      MSR: 0000000080029000 <CE,EE,ME>  CR: 28adbe22  XER: 00000000
      SOFTE: 0
      DEAR: 8000080080040f14, ESR: 0000000000000000
      TASK = c00000017e100000[1] 'swapper/0' THREAD: c00000017e108000 CPU: 2
      GPR00: 0000000000000000 c00000017e10b720 c0000000009928d8 c00000017e578e00
      GPR04: 0000000000000000 000000000000000c 0000000000000001 c00000017e10bb40
      GPR08: 0000000000000000 8000080080040000 0000000000000000 0000000000000016
      GPR12: 0000000088adbe22 c00000000fffa800 c000000000001ba0 0000000000000000
      GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
      GPR20: 0000000000000000 0000000000000000 0000000000000000 c0000000008a5b70
      GPR24: c0000000008af938 c0000000009a28d8 c0000000009bb5dc c00000017e10bb40
      GPR28: c00000017e32a400 c00000017e10bc00 c00000017e32a400 c00000017e578e00
      NIP [c00000000002ea58] .fsl_pcie_check_link+0x88/0xf0
      LR [c00000000002eaf4] .fsl_indirect_read_config+0x34/0xb0
      Call Trace:
      [c00000017e10b720] [c00000017e10b7a0] 0xc00000017e10b7a0 (unreliable)
      [c00000017e10ba30] [c00000000002eaf4] .fsl_indirect_read_config+0x34/0xb0
      [c00000017e10bad0] [c00000000033aa08] .pci_bus_read_config_byte+0x88/0xd0
      [c00000017e10bb90] [c00000000088d708] .pci_apply_final_quirks+0x9c/0x18c
      [c00000017e10bc40] [c0000000000013dc] .do_one_initcall+0x5c/0x1f0
      [c00000017e10bcf0] [c00000000086ebac] .kernel_init_freeable+0x180/0x26c
      [c00000017e10bdb0] [c000000000001bbc] .kernel_init+0x1c/0x460
      [c00000017e10be30] [c000000000000880] .ret_from_kernel_thread+0x64/0xe4
      Instruction dump:
      38210310 2b800015 4fdde842 7c600026 5463fffe e8010010 7c0803a6 4e800020
      60000000 60000000 e92301d0 7c0004ac <80690f14> 0c030000 4c00012c 38210310
      ---[ end trace 7a8fe0cbccb7d992 ]---
      
      Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      Signed-off-by: NKevin Hao <haokexin@gmail.com>
      Acked-by: NRoy Zang <tie-fei.zang@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      04aa99cd
  18. 10 4月, 2013 2 次提交
  19. 04 4月, 2013 1 次提交
  20. 06 3月, 2013 1 次提交
  21. 16 2月, 2013 1 次提交
    • V
      powerpc/fsl_pci: Store the pci ctlr device ptr in the pci ctlr struct · 52c5affc
      Varun Sethi 提交于
      The pci controller structure has a provision to store the device structure
      pointer of the corresponding platform device. Currently this information is
      not stored during fsl pci controller initialization. This information is
      required while dealing with iommu groups for pci devices connected to the
      fsl pci controller. For the case where the pci devices can't be paritioned,
      they would fall under the same device group as the pci controller.
      
      This patch stores the platform device information in the pci controller
      structure during initialization.
      Signed-off-by: NVarun Sethi <Varun.Sethi@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      52c5affc
  22. 13 2月, 2013 1 次提交
    • T
      powerpc/85xx: fix various PCI node compatible strings · 14bdc913
      Timur Tabi 提交于
      Fix and/or improve the compatible strings of the PCI device tree nodes for
      some Freescale SOCs.  This fixes some issues and improves consistency among
      the SOCs.
      
      Specifically:
      
      1) The P1022 has a v1 PCIe controller, so the compatible property should just
      say "fsl,mpc8548-pcie".  U-Boot does not look for "fsl,p1022-pcie", so it
      wasn't fixing up the node.
      
      2) The P4080 has a v2.1 PCIe controller, so add that version-specific string
      to the device tree.  Update the kernel to also look for that string.
      Currently, the kernel looks for "fsl,p4080-pcie" specifically, but
      eventually that check should be deleted.
      
      3) The P1010 device tree claims compatibility with v2.2 and v2.3, but that's
      redundant.  No other device tree does this.  Remove the v2.2 string.
      
      4) The kernel looks for both "fsl,p1023-pcie" and "fsl,qoriq-pcie-v2.2",
      even though the P1023 device trees has always included both strings.  Remove
      the search for "fsl,p1023-pcie".
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      14bdc913
  23. 04 1月, 2013 1 次提交
    • G
      POWERPC: drivers: remove __dev* attributes. · cad5cef6
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cad5cef6
  24. 25 11月, 2012 1 次提交
  25. 17 11月, 2012 1 次提交
  26. 27 9月, 2012 1 次提交
  27. 19 9月, 2012 1 次提交
  28. 13 9月, 2012 4 次提交
  29. 03 8月, 2012 1 次提交
  30. 11 7月, 2012 1 次提交
    • S
      powerpc/fsl-pci: get PCI init out of board files · 07e4f801
      Scott Wood 提交于
      As an alternative incremental starting point to Jia Hongtao's patchset,
      get the FSL PCI init out of the board files, but do not yet convert to a
      platform driver.
      
      Rather than having each board supply a magic register offset for
      determining the "primary" bus, we look for which PCI host bridge
      contains an ISA node within its subtree.  If there is no ISA node,
      normally that would mean there is no primary bus, but until certain
      bugs are fixed we arbitrarily designate a primary in this case.
      
      Conversion to a platform driver and related improvements can happen
      after this, as the ordering issues are sorted out.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      07e4f801
  31. 10 7月, 2012 1 次提交
  32. 17 6月, 2012 1 次提交