From: jim2101024@gmail.com (Jim Quinlan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 11/12] ARM64: add dma remap for BrcmSTB PCIe
Date: Wed, 19 Sep 2018 10:32:06 -0400 [thread overview]
Message-ID: <1537367527-20773-12-git-send-email-jim2101024@gmail.com> (raw)
In-Reply-To: <1537367527-20773-1-git-send-email-jim2101024@gmail.com>
The BrcmSTB PCIe controller needs to remap DMA accesses to it because
of the requirements of its interface with the SOC memory controllers.
Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
---
drivers/pci/controller/Kconfig | 1 +
drivers/pci/controller/pcie-brcmstb.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 8daa621..4394430 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -284,6 +284,7 @@ config PCIE_BRCMSTB
depends on OF && PCI_MSI
depends on SOC_BRCMSTB
default ARCH_BRCMSTB || BMIPS_GENERIC
+ select ARCH_HAS_PHYS_TO_DMA if ARM64
help
Say Y here to enable PCIe host controller support for
Broadcom Settop Box SOCs. A Broadcom SOC will may have
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index a805d87..ae9df8e 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -974,6 +974,18 @@ phys_addr_t brcm_dma_to_phys(struct device *dev, dma_addr_t dev_addr)
return (phys_addr_t)dev_addr;
}
+#if defined(CONFIG_ARM64)
+dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
+{
+ return brcm_phys_to_dma(dev, paddr);
+}
+
+phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dev_addr)
+{
+ return brcm_dma_to_phys(dev, dev_addr);
+}
+#endif
+
static int brcm_pcie_add_controller(struct brcm_pcie *pcie)
{
int i, ret = 0;
--
1.9.0.138.g2de3478
next prev parent reply other threads:[~2018-09-19 14:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1537367527-20773-1-git-send-email-jim2101024@gmail.com>
2018-09-19 14:31 ` [PATCH v5 01/12] soc: bcm: brcmstb: add memory API Jim Quinlan
2018-09-19 14:31 ` [PATCH v5 02/12] dt-bindings: pci: add DT docs for Brcmstb PCIe device Jim Quinlan
2018-09-20 9:06 ` Jonas Gorski
2018-09-21 18:00 ` Jim Quinlan
2018-09-19 14:31 ` [PATCH v5 03/12] PCI: brcmstb: add Broadcom STB PCIe host controller driver Jim Quinlan
2018-09-19 14:31 ` [PATCH v5 04/12] PCI: brcmstb: add dma-range mapping for inbound traffic Jim Quinlan
2018-09-20 2:19 ` Ard Biesheuvel
2018-09-20 20:55 ` Florian Fainelli
2018-09-20 21:04 ` Ard Biesheuvel
2018-09-20 21:31 ` Florian Fainelli
2018-09-20 21:33 ` Ard Biesheuvel
2018-09-20 21:39 ` Florian Fainelli
2018-09-21 17:40 ` Jim Quinlan
2018-09-24 8:25 ` Ard Biesheuvel
2018-09-24 15:01 ` Jim Quinlan
2018-09-26 2:59 ` Florian Fainelli
2018-09-26 7:59 ` Ard Biesheuvel
2018-09-26 10:56 ` Robin Murphy
2018-10-01 18:13 ` Florian Fainelli
2019-06-27 16:55 ` Stefan Wahren
2018-09-19 14:32 ` [PATCH v5 05/12] PCI: brcmstb: add MSI capability Jim Quinlan
2018-09-19 14:32 ` [PATCH v5 10/12] ARM64: declare __phys_to_dma on ARCH_HAS_PHYS_TO_DMA Jim Quinlan
2018-09-19 14:37 ` Christoph Hellwig
2018-09-19 14:32 ` Jim Quinlan [this message]
2018-09-19 14:41 ` [PATCH v5 11/12] ARM64: add dma remap for BrcmSTB PCIe Christoph Hellwig
2018-09-21 18:29 ` Jim Quinlan
2018-09-19 14:32 ` [PATCH v5 12/12] ARM: " Jim Quinlan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1537367527-20773-12-git-send-email-jim2101024@gmail.com \
--to=jim2101024@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).