<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/drivers/pci/controller, branch dev-5.0</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-5.0</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-5.0'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2019-04-05T20:34:25+00:00</updated>
<entry>
<title>PCI: mediatek: Fix memory mapped IO range size computation</title>
<updated>2019-04-05T20:34:25+00:00</updated>
<author>
<name>Honghui Zhang</name>
<email>honghui.zhang@mediatek.com</email>
</author>
<published>2019-02-01T05:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=8a0f1351bac10979dabaca300df736346046574e'/>
<id>urn:sha1:8a0f1351bac10979dabaca300df736346046574e</id>
<content type='text'>
[ Upstream commit c61df57343bf05743f8abbb31eec9a6f05820dd1 ]

Mediatek's HW assigns a MMIO address range (typically starts from
0x20000000 to 0x2fffffff for both mt2712 and mt7622) for PCI usage.

This MMIO address space represents the address space that can
be allocated to PCI devices through Base Address Registers.

Even though the full MMIO address range is available to be allocated, it
should be enabled by the PCIE_AHB_TRANS_BASE register in the host
controller and the size that is enabled is determined by AHB2PCIE_SIZE
bits in this register.

Owing to a bug in the MMIO window size computation, current code does
not enable the full size of the available MMIO address range in the
PCI host controller; if the PCI devices BARs requested size exceeds the
size enabled through the PCIE_AHB_TRANS_BASE register the requests
targeting the disabled address address space will be blocked by the root
complex causing a system error.

Existing code has never run into a system error in production because
even half of the enabled MMIO range (128MB) is big enough for typical
devices BAR requests (4MB) but the full MMIO address range should
be enabled regardless.

Fix the MMIO window size computation by using resource_size(mem) instead
of mem-&gt;end - mem-&gt;start.

Since the MMIO window size for both MT2712 and MT7622 is 0x10000000,
this change will update the parameter passed to fls() from 0xfffffff to
0x10000000 and calculate the whole memory mapped IO range size
correctly.

Detected through coccinelle semantic patch (and related warning):

scripts/coccinelle/api/resource_size.cocci:

pcie-mediatek.c:720:13-16: WARNING: Suspicious code. resource_size is maybe missing with mem

Signed-off-by: Honghui Zhang &lt;honghui.zhang@mediatek.com&gt;
[lorenzo.pieralisi@arm.com: rewrote the commit log]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: pci-bridge-emul: Extend pci_bridge_emul_init() with flags</title>
<updated>2019-03-23T19:11:27+00:00</updated>
<author>
<name>Thomas Petazzoni</name>
<email>thomas.petazzoni@bootlin.com</email>
</author>
<published>2019-02-20T09:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=2b9ef0bedaac2acc648a03bb519e4609661da6dc'/>
<id>urn:sha1:2b9ef0bedaac2acc648a03bb519e4609661da6dc</id>
<content type='text'>
commit 33776d059630e5045ea9ccf756c74de8f9cc86de upstream.

Depending on the capabilities of the PCI controller/platform, the
PCI-to-PCI bridge emulation behavior might need to be different. For
example, on platforms that use the pci-mvebu code, we currently don't
support prefetchable memory BARs, so the corresponding fields in the
PCI-to-PCI bridge configuration space should be read-only.

To implement this, extend pci_bridge_emul_init() to take a "flags"
argument, with currently one flag supported:

PCI_BRIDGE_EMUL_NO_PREFETCHABLE_BAR

that will make the prefetchable memory base and limit registers
read-only.

The pci-mvebu and pci-aardvark drivers are updated accordingly.

Fixes: 1f08673eef123 ("PCI: mvebu: Convert to PCI emulated bridge config space")
Reported-by: Luís Mendes &lt;luis.p.mendes@gmail.com&gt;
Reported-by: Leigh Brown &lt;leigh@solinno.co.uk&gt;
Tested-by: Leigh Brown &lt;leigh@solinno.co.uk&gt;
Tested-by: Luis Mendes &lt;luis.p.mendes@gmail.com&gt;
Signed-off-by: Thomas Petazzoni &lt;thomas.petazzoni@bootlin.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Cc: stable@vger.kernel.org
Cc: Luís Mendes &lt;luis.p.mendes@gmail.com&gt;
Cc: Leigh Brown &lt;leigh@solinno.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI: dwc: skip MSI init if MSIs have been explicitly disabled</title>
<updated>2019-03-23T19:11:27+00:00</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-02-27T16:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=0d5bc50f524afb84a882cb5f507c4aeeab08aa8a'/>
<id>urn:sha1:0d5bc50f524afb84a882cb5f507c4aeeab08aa8a</id>
<content type='text'>
commit 3afc8299f39a27b60e1519a28e18878ce878e7dd upstream.

Since 7c5925afbc58 (PCI: dwc: Move MSI IRQs allocation to IRQ domains
hierarchical API) the MSI init claims one of the controller IRQs as a
chained IRQ line for the MSI controller. On some designs, like the i.MX6,
this line is shared with a PCIe legacy IRQ. When the line is claimed for
the MSI domain, any device trying to use this legacy IRQs will fail to
request this IRQ line.

As MSI and legacy IRQs are already mutually exclusive on the DWC core,
as the core won't forward any legacy IRQs once any MSI has been enabled,
users wishing to use legacy IRQs already need to explictly disable MSI
support (usually via the pci=nomsi kernel commandline option). To avoid
any issues with MSI conflicting with legacy IRQs, just skip all of the
DWC MSI initalization, including the IRQ line claim, when MSI is disabled.

Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API")
Tested-by: Tim Harvey &lt;tharvey@gateworks.com&gt;
Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Gustavo Pimentel &lt;gustavo.pimentel@synopsys.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI: qcom: Don't deassert reset GPIO during probe</title>
<updated>2019-03-23T19:11:27+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2019-01-25T23:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=63a9e7ce6624ef0385a1c65bdae0708d3abb7f47'/>
<id>urn:sha1:63a9e7ce6624ef0385a1c65bdae0708d3abb7f47</id>
<content type='text'>
commit 02b485e31d98265189b91f3e69c43df2ed50610c upstream.

Acquiring the reset GPIO low means that reset is being deasserted, this
is followed almost immediately with qcom_pcie_host_init() asserting it,
initializing it and then finally deasserting it again, for the link to
come up.

Some PCIe devices requires a minimum time between the initial deassert
and subsequent reset cycles. In a platform that boots with the reset
GPIO asserted this requirement is being violated by this deassert/assert
pulse.

Acquire the reset GPIO high to prevent this situation by matching the
state to the subsequent asserted state.

Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Stanimir Varbanov &lt;svarbanov@mm-sol.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'pci-v5.0-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci</title>
<updated>2019-02-01T07:06:17+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-02-01T07:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=44e56f325b7d63e8a53008956ce7b28e4272a599'/>
<id>urn:sha1:44e56f325b7d63e8a53008956ce7b28e4272a599</id>
<content type='text'>
Pull PCI fixes from Bjorn Helgaas:

 - Revert armada8k GPIO reset change that broke Macchiatobin booting
   (Baruch Siach)

 - Use actual size config reads on ARM cns3xxx (Koen Vandeputte)

 - Fix ARM cns3xxx config write alignment issue (Koen Vandeputte)

 - Fix imx6 PHY device link error checking (Leonard Crestez)

 - Fix imx6 probe failure on chips without separate PCI power domain
   (Leonard Crestez)

* tag 'pci-v5.0-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  Revert "PCI: armada8k: Add support for gpio controlled reset signal"
  ARM: cns3xxx: Use actual size reads for PCIe
  ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment
  PCI: imx: Fix checking pd_pcie_phy device link addition
  PCI: imx: Fix probe failure without power domain
</content>
</entry>
<entry>
<title>Revert "PCI: armada8k: Add support for gpio controlled reset signal"</title>
<updated>2019-01-31T21:07:29+00:00</updated>
<author>
<name>Baruch Siach</name>
<email>baruch@tkos.co.il</email>
</author>
<published>2019-01-31T21:00:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=f14bcc0add3abecceca1a3fe538c4ec9566893f3'/>
<id>urn:sha1:f14bcc0add3abecceca1a3fe538c4ec9566893f3</id>
<content type='text'>
Revert commit 3d71746c42 ("PCI: armada8k: Add support for gpio controlled
reset signal").

That commit breaks boot on Macchiatobin board when a Mellanox NIC is
present in the PCIe slot.

It turns out that full reset cycle requires first comphy serdes
initialization. Reset signal toggle without comphy initialization makes
access to PCI configuration registers stall indefinitely. U-Boot toggles
the Macchiatobin PCIe reset line already at boot, after initializing the
comphy serdes.

So while commit 3d71746c42 ("PCI: armada8k: Add support for gpio controlled
reset signal") enables PCIe on platforms that U-Boot does not touch the
reset line (like Clearfog GT-8K), it breaks PCIe (and boot) on the
Macchiatobin board.

Revert commit 3d71746c42 ("PCI: armada8k: Add support for gpio controlled
reset signal") entirely to fix the Macchiatobin regression.

Reported-by: Sven Auhagen &lt;sven.auhagen@voleatech.de&gt;
Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;</content>
</entry>
<entry>
<title>PCI: imx: Fix checking pd_pcie_phy device link addition</title>
<updated>2019-01-31T21:01:01+00:00</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-01-31T20:59:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a4ace4fa20072dfe60ab48ba227e50bc2d69c246'/>
<id>urn:sha1:a4ace4fa20072dfe60ab48ba227e50bc2d69c246</id>
<content type='text'>
The check on the device_link_add() return value is wrong;
this leads to erroneous code execution, so fix it.

Fixes: 3f7cceeab895 ("PCI: imx: Add multi-pd support")
Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;</content>
</entry>
<entry>
<title>PCI: imx: Fix probe failure without power domain</title>
<updated>2019-01-31T20:59:50+00:00</updated>
<author>
<name>Leonard Crestez</name>
<email>leonard.crestez@nxp.com</email>
</author>
<published>2019-01-31T20:59:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a6093ad7fc4962099d2d723bcca72f8175b58c82'/>
<id>urn:sha1:a6093ad7fc4962099d2d723bcca72f8175b58c82</id>
<content type='text'>
On chips without a separate power domain for PCI (such as 6q/6qp) the
imx6_pcie_attach_pd() function incorrectly returns an error.

Fix by returning 0 if dev_pm_domain_attach_by_name() does not find
anything.

Fixes: 3f7cceeab895 ("PCI: imx: Add multi-pd support")
Reported-by: Lukas F.Hartmann &lt;lukas@mntmn.com&gt;
Signed-off-by: Leonard Crestez &lt;leonard.crestez@nxp.com&gt;
[lorenzo.pieralisi@arm.com: updated commit log]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;</content>
</entry>
<entry>
<title>Merge tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping</title>
<updated>2019-01-12T18:52:40+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-01-12T18:52:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=66c56cfa64d9dbb9efa8a06c1aece77e8d57ea19'/>
<id>urn:sha1:66c56cfa64d9dbb9efa8a06c1aece77e8d57ea19</id>
<content type='text'>
Pull dma_zalloc_coherent() removal from Christoph Hellwig:
 "We've always had a weird situation around dma_zalloc_coherent. To
  safely support mapping the allocations to userspace major
  architectures like x86 and arm have always zeroed allocations from
  dma_alloc_coherent, but a couple other architectures were missing that
  zeroing either always or in corner cases.

  Then later we grew anothe dma_zalloc_coherent interface to explicitly
  request zeroing, but that just added __GFP_ZERO to the allocation
  flags, which for some allocators that didn't end up using the page
  allocator ended up being a no-op and still not zeroing the
  allocations.

  So for this merge window I fixed up all remaining architectures to
  zero the memory in dma_alloc_coherent, and made dma_zalloc_coherent a
  no-op wrapper around dma_alloc_coherent, which fixes all of the above
  issues.

  dma_zalloc_coherent is now pointless and can go away, and Luis helped
  me writing a cocchinelle script and patch series to kill it, which I
  think we should apply now just after -rc1 to finally settle these
  issue"

* tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: remove dma_zalloc_coherent()
  cross-tree: phase out dma_zalloc_coherent() on headers
  cross-tree: phase out dma_zalloc_coherent()
</content>
</entry>
<entry>
<title>PCI: amlogic: Fix build failure due to missing gpio header</title>
<updated>2019-01-08T15:01:44+00:00</updated>
<author>
<name>Corentin Labbe</name>
<email>clabbe@baylibre.com</email>
</author>
<published>2019-01-07T17:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=a3869d43c9800cf39496615361c83635fa3e7c82'/>
<id>urn:sha1:a3869d43c9800cf39496615361c83635fa3e7c82</id>
<content type='text'>
Building the driver when GPIOLIB=n is not selected is causing the following
compilation failure:

  drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_assert_reset':
  drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
    gpiod_set_value_cansleep(mp-&gt;reset_gpio, 0);
    ^~~~~~~~~~~~~~~~~~~~~~~~
    gpio_set_value_cansleep
  drivers/pci/controller/dwc/pci-meson.c: In function 'meson_pcie_probe':
  drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
    mp-&gt;reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
		     ^~~~~~~~~~~~~~
		     devm_gpio_free
  drivers/pci/controller/dwc/pci-meson.c:540:48: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
    mp-&gt;reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
						  ^~~~~~~~~~~~~
						  GPIOF_INIT_LOW

Add the missing linux/gpio/consumer.h header to fix it.

Fixes: 9c0ef6d34fdb ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver")
Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
[lorenzo.pieralisi@arm.com: commit log]
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
