linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] PCI: get DMA configuration from parent device
@ 2014-12-17 18:02 Murali Karicheri
  2014-12-17 18:02 ` [RFC PATCH 1/2] common: dma-mapping: introduce dma_get_parent_cfg() helper Murali Karicheri
  2014-12-17 18:02 ` [RFC PATCH 2/2] PCI: get device dma configuration from parent Murali Karicheri
  0 siblings, 2 replies; 9+ messages in thread
From: Murali Karicheri @ 2014-12-17 18:02 UTC (permalink / raw)
  To: gregkh, vinod.koul, dmaengine, bhelgaas, linux-pci, linux-kernel,
	arnd, linux-arm-kernel
  Cc: Murali Karicheri

Keystone PCI devices requires the dma_pfn_offset to be set correctly
so that the PCI devices get the right DMA mask to function. This
patch adds a helper function to get this configuration from the root
bridge's parent device. The probe.c code now calls this helper to set
the default dma configuration if the parent device is dma capable.

Typically, dma-ranges are defined in the DT node of the SoC and gets
updated in the root bridge's parent device structure. My original
patch for this was at [1] which was NACK-ed and this is an attempt
to implement a better solution. This may have side effects that I am
unware of. So sending as a RFC patch to get feedback before sending
the formal patch. Please review and provide me the comment so that
I can incorporate the same.

[1] http://www.gossamer-threads.com/lists/linux/kernel/2024591

Murali Karicheri (2):
  common: dma-mapping: introduce dma_get_parent_cfg() helper
  PCI: get device dma configuration from parent

 drivers/base/dma-mapping.c  |   18 ++++++++++++++++++
 drivers/pci/probe.c         |   20 +++++++++++++++++---
 include/linux/dma-mapping.h |    3 +++
 3 files changed, 38 insertions(+), 3 deletions(-)

-- 
1.7.9.5


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

end of thread, other threads:[~2014-12-21 10:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 18:02 [RFC PATCH 0/2] PCI: get DMA configuration from parent device Murali Karicheri
2014-12-17 18:02 ` [RFC PATCH 1/2] common: dma-mapping: introduce dma_get_parent_cfg() helper Murali Karicheri
2014-12-17 21:56   ` Arnd Bergmann
2014-12-17 23:24     ` Murali Karicheri
2014-12-18  0:09       ` Arnd Bergmann
2014-12-18 17:20         ` Catalin Marinas
2014-12-21 10:42           ` Will Deacon
2014-12-18 19:02         ` Murali Karicheri
2014-12-17 18:02 ` [RFC PATCH 2/2] PCI: get device dma configuration from parent Murali Karicheri

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).