From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-kernel@lists.infradead.org,
Simon Horman <horms@verge.net.au>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: artemi.ivanov@cogentembedded.com, linux-kernel@vger.kernel.org,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Subject: [PATCH 2/2] rcar-pcie: set host bridge's DMA mask
Date: Thu, 29 Dec 2016 23:45:04 +0300 [thread overview]
Message-ID: <1483044304-2085-2-git-send-email-nikita.yoush@cogentembedded.com> (raw)
In-Reply-To: <1483044304-2085-1-git-send-email-nikita.yoush@cogentembedded.com>
This gives platform DMA mapping code a chance to disallow setting device
DMA mask to something that host bridge can't support.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
---
drivers/pci/host/pcie-rcar.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index aca85be..b1edc3c 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -451,6 +451,7 @@ static int rcar_pcie_enable(struct rcar_pcie *pcie)
{
struct device *dev = pcie->dev;
struct pci_bus *bus, *child;
+ struct pci_host_bridge *bridge;
LIST_HEAD(res);
/* Try setting 5 GT/s link speed */
@@ -480,6 +481,10 @@ static int rcar_pcie_enable(struct rcar_pcie *pcie)
list_for_each_entry(child, &bus->children, node)
pcie_bus_configure_settings(child);
+ bridge = pci_find_host_bridge(bus);
+ bridge->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ bridge->dev.dma_mask = &bridge->dev.coherent_dma_mask;
+
pci_bus_add_devices(bus);
return 0;
--
2.1.4
next prev parent reply other threads:[~2016-12-29 20:45 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-29 20:45 [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Nikita Yushchenko
2016-12-29 20:45 ` Nikita Yushchenko [this message]
2016-12-29 21:18 ` Arnd Bergmann
2016-12-30 9:46 ` Sergei Shtylyov
2016-12-30 10:06 ` Sergei Shtylyov
2017-01-03 18:44 ` Will Deacon
2017-01-03 19:00 ` Nikita Yushchenko
2017-01-03 19:01 ` Nikita Yushchenko
2017-01-03 20:13 ` Grygorii Strashko
2017-01-03 20:23 ` Nikita Yushchenko
2017-01-03 23:13 ` Arnd Bergmann
2017-01-04 6:24 ` Nikita Yushchenko
2017-01-04 13:29 ` Arnd Bergmann
2017-01-04 14:30 ` Nikita Yushchenko
2017-01-04 14:46 ` Arnd Bergmann
2017-01-04 15:29 ` Nikita Yushchenko
2017-01-06 11:10 ` Arnd Bergmann
2017-01-06 13:47 ` Nikita Yushchenko
2017-01-09 14:05 ` Arnd Bergmann
2017-01-09 20:34 ` Nikita Yushchenko
2017-01-09 20:57 ` Christoph Hellwig
2017-01-10 6:47 ` NVMe vs DMA addressing limitations Nikita Yushchenko
2017-01-10 7:07 ` Christoph Hellwig
2017-01-10 7:31 ` Nikita Yushchenko
2017-01-10 11:01 ` Arnd Bergmann
2017-01-10 14:48 ` Christoph Hellwig
2017-01-10 15:02 ` Arnd Bergmann
2017-01-12 10:09 ` Sagi Grimberg
2017-01-12 11:56 ` Arnd Bergmann
2017-01-12 13:07 ` Christoph Hellwig
2017-01-10 10:54 ` Arnd Bergmann
2017-01-10 10:47 ` [PATCH 1/2] arm64: dma_mapping: allow PCI host driver to limit DMA mask Arnd Bergmann
2017-01-10 14:44 ` Christoph Hellwig
2017-01-10 15:00 ` Arnd Bergmann
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=1483044304-2085-2-git-send-email-nikita.yoush@cogentembedded.com \
--to=nikita.yoush@cogentembedded.com \
--cc=arnd@arndb.de \
--cc=artemi.ivanov@cogentembedded.com \
--cc=bhelgaas@google.com \
--cc=catalin.marinas@arm.com \
--cc=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=will.deacon@arm.com \
/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).