linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] SH7786 PCIe support fixes
@ 2017-12-04 15:08 Thomas Petazzoni
  2017-12-04 15:09 ` [PATCH 1/8] arch/sh: add sh7786_mm_sel() function Thomas Petazzoni
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2017-12-04 15:08 UTC (permalink / raw)
  To: Yoshinori Sato, Rich Felker, Bjorn Helgaas, Lorenzo Pieralisi
  Cc: linux-sh, linux-pci, Geert Uytterhoeven, Thomas Petazzoni

Hello,

The following patches fix a number of issues I encountered while
making PCIe work on a SH7786 platform (both a SH7786 SH4-AP board
running little-endian with a basic E1000E NIC on PCIe, and a custom
SH7786 board running big-endian with a custom IP in an FPGA accessed
over PCIe).

A quick summary of the issues:

 - Some PCI MEM resources were used even if they conflict with RAM

 - The addresses of the PCI MEM and IO regions did not match the
   SH7786 datasheet (the first MEM region and the IO region were
   inverted), causing the device MEM BARs to be unusable.

 - The PCI -> SuperHyway mapping was not correct in some memory
   configurations:

   - With 64 MB or 128 MB and the RAM starting at 0x0800_0000, there
     is an offset of 0x0800_0000 between PCI and memory addresses that
     the DMA mapping API should observe.

   - With 256 MB of RAM starting at 0x0800_0000, we have a region that
     is not aligned on its size, to its must be expanded to 512 MB
     with a base address of 0.

The commit logs have much more details about the fixes.

Best regards,

Thomas Petazzoni

Thomas Petazzoni (8):
  arch/sh: add sh7786_mm_sel() function
  arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset
  arch/sh: pci: don't use disabled resources
  arch/sh: pcie-sh7786: mark unavailable PCI resource as disabled
  arch/sh: pcie-sh7786: exclude unusable PCI MEM areas
  arch/sh: pcie-sh7786: adjust PCI MEM and IO regions
  arch/sh: pcie-sh7786: adjust the memory mapping
  arch/sh: pcie-sh7786: handle non-zero DMA offset

 arch/sh/drivers/pci/pci.c            |  5 +++
 arch/sh/drivers/pci/pcie-sh7786.c    | 78 +++++++++++++++++++++++++-----------
 arch/sh/include/cpu-sh4/cpu/sh7786.h |  7 ++++
 arch/sh/kernel/dma-nommu.c           |  7 +++-
 arch/sh/mm/consistent.c              |  4 +-
 5 files changed, 74 insertions(+), 27 deletions(-)

-- 
2.13.6


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-02-26 13:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 15:08 [PATCH 0/8] SH7786 PCIe support fixes Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 1/8] arch/sh: add sh7786_mm_sel() function Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 2/8] arch/sh: make the DMA mapping operations observe dev->dma_pfn_offset Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 3/8] arch/sh: pci: don't use disabled resources Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 4/8] arch/sh: pcie-sh7786: mark unavailable PCI resource as disabled Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 5/8] arch/sh: pcie-sh7786: exclude unusable PCI MEM areas Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 6/8] arch/sh: pcie-sh7786: adjust PCI MEM and IO regions Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 7/8] arch/sh: pcie-sh7786: adjust the memory mapping Thomas Petazzoni
2017-12-04 15:09 ` [PATCH 8/8] arch/sh: pcie-sh7786: handle non-zero DMA offset Thomas Petazzoni
2018-01-07 15:06 ` [PATCH 0/8] SH7786 PCIe support fixes Thomas Petazzoni
2018-01-08 22:12   ` Bjorn Helgaas
2018-01-08 22:27     ` Thomas Petazzoni
2018-02-26 13:32   ` Thomas Petazzoni
2018-02-19 16:22 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).