<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/pci/controller/pcie-brcmstb.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-03-10T17:56:10Z</updated>
<entry>
<title>PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling</title>
<updated>2024-03-10T17:56:10Z</updated>
<author>
<name>Jonathan Bell</name>
<email>jonathan@raspberrypi.com</email>
</author>
<published>2024-02-17T13:37:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=039741a8d7c9a01c1bc84a5ac5aa770a5e138a30'/>
<id>urn:sha1:039741a8d7c9a01c1bc84a5ac5aa770a5e138a30</id>
<content type='text'>
The MDIO_WT_DONE() macro tests bit 31, which is always 0 (== done) as
readw_poll_timeout_atomic() does a 16-bit read. Replace with the readl
variant.

[kwilczynski: commit log]
Fixes: ca5dcc76314d ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()")
Link: https://lore.kernel.org/linux-pci/20240217133722.14391-1-wahrenst@gmx.net
Signed-off-by: Jonathan Bell &lt;jonathan@raspberrypi.com&gt;
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Acked-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device</title>
<updated>2024-01-11T11:53:00Z</updated>
<author>
<name>Jim Quinlan</name>
<email>james.quinlan@broadcom.com</email>
</author>
<published>2023-11-13T18:56:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e2596dcf1e9dfd5904d50f796c19b03c94a3b8b4'/>
<id>urn:sha1:e2596dcf1e9dfd5904d50f796c19b03c94a3b8b4</id>
<content type='text'>
The Broadcom STB/CM PCIe HW core, which is also used in RPi SOCs, must be
deliberately set by the PCIe RC HW into one of three mutually exclusive
modes:

"safe" -- No CLKREQ# expected or required, refclk is always provided.  This
    mode should work for all devices but is not be capable of any refclk
    power savings.

"no-l1ss" -- CLKREQ# is expected to be driven by the downstream device for
    CPM and ASPM L0s and L1.  Provides Clock Power Management, L0s, and L1,
    but cannot provide L1 substate (L1SS) power savings. If the downstream
    device connected to the RC is L1SS capable AND the OS enables L1SS, all
    PCIe traffic may abruptly halt, potentially hanging the system.

"default" -- Bidirectional CLKREQ# between the RC and downstream device.
    Provides ASPM L0s, L1, and L1SS, but not compliant to provide Clock
    Power Management; specifically, may not be able to meet the T_CLRon max
    timing of 400ns as specified in "Dynamic Clock Control", section
    3.2.5.2.2 of the PCIe Express Mini CEM 2.1 specification.  This
    situation is atypical and should happen only with older devices.

Previously, this driver always set the mode to "no-l1ss", as almost all
STB/CM boards operate in this mode.  But now there is interest in
activating L1SS power savings from STB/CM customers, which requires "aspm"
mode.  In addition, a bug was filed for RPi4 CM platform because most
devices did not work in "no-l1ss" mode.

Note that the mode is specified by the DT property "brcm,clkreq-mode".  If
this property is omitted, then "default" mode is chosen.

Note: Since L1 substates are now possible, a modification was made
regarding an internal bus timeout: During long periods of the PCIe RC HW
being in an L1SS sleep state, there may be a timeout on an internal bus
access, even though there may not be any PCIe access involved.  Such a
timeout will cause a subsequent CPU abort.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217276
Link: https://lore.kernel.org/linux-pci/20231113185607.1756-3-james.quinlan@broadcom.com
Tested-by: Cyril Brulebois &lt;cyril@debamax.com&gt;
Tested-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Signed-off-by: Jim Quinlan &lt;james.quinlan@broadcom.com&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Remove stale comment</title>
<updated>2023-08-24T15:33:59Z</updated>
<author>
<name>Jim Quinlan</name>
<email>james.quinlan@broadcom.com</email>
</author>
<published>2023-06-23T14:40:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6dac1507a654f897ae98d7ec1a12b712c3ec4d47'/>
<id>urn:sha1:6dac1507a654f897ae98d7ec1a12b712c3ec4d47</id>
<content type='text'>
A comment says that Multi-MSI is not supported by the driver.
A past commit [1] added this feature, so the comment is
incorrect and is removed.

[1] commit 198acab1772f22f2 ("PCI: brcmstb: Enable Multi-MSI")

Link: https://lore.kernel.org/r/20230623144100.34196-6-james.quinlan@broadcom.com
Signed-off-by: Jim Quinlan &lt;james.quinlan@broadcom.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Assert PERST# on BCM2711</title>
<updated>2023-08-24T15:33:58Z</updated>
<author>
<name>Jim Quinlan</name>
<email>james.quinlan@broadcom.com</email>
</author>
<published>2023-06-23T14:40:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8eb8c2735306526929141052c82bd118a7a2119b'/>
<id>urn:sha1:8eb8c2735306526929141052c82bd118a7a2119b</id>
<content type='text'>
The current PCIe driver assumes PERST# is asserted when probe() is invoked.
Some older versions of the 2711/RPi bootloader left PERST# unasserted, as
the Raspian OS does assert PERST# on probe().  For this reason, we assert
PERST# for BCM2711 SOCs (i.e. RPi).

Link: https://lore.kernel.org/r/20230623144100.34196-5-james.quinlan@broadcom.com
Signed-off-by: Jim Quinlan &lt;james.quinlan@broadcom.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Convert to platform remove callback returning void</title>
<updated>2023-06-24T14:11:01Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-21T19:31:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b169c576ad0cd341badb866d0808ae32c7bf8c2c'/>
<id>urn:sha1:b169c576ad0cd341badb866d0808ae32c7bf8c2c</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Link: https://lore.kernel.org/linux-pci/20230321193208.366561-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits</title>
<updated>2022-11-11T10:42:05Z</updated>
<author>
<name>Jim Quinlan</name>
<email>jim2101024@gmail.com</email>
</author>
<published>2022-10-11T18:42:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=602fb860945fd6dce7989fcd3727d5fe4282f785'/>
<id>urn:sha1:602fb860945fd6dce7989fcd3727d5fe4282f785</id>
<content type='text'>
Set RCB_MPS mode bit so that data for PCIe read requests up to the size of
the Maximum Payload Size (MPS) are returned in one completion, and data for
PCIe read requests greater than the MPS are split at the specified Read
Completion Boundary setting.

Set RCB_64B so that the Read Compeletion Boundary is 64B.

Link: https://lore.kernel.org/r/20221011184211.18128-6-jim2101024@gmail.com
Signed-off-by: Jim Quinlan &lt;jim2101024@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Drop needless 'inline' annotations</title>
<updated>2022-11-11T10:41:18Z</updated>
<author>
<name>Jim Quinlan</name>
<email>jim2101024@gmail.com</email>
</author>
<published>2022-10-11T18:42:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=137b57413f569d558c1054e2a181313574eb9a87'/>
<id>urn:sha1:137b57413f569d558c1054e2a181313574eb9a87</id>
<content type='text'>
A number of inline functions are called rarely and/or are not
time-critical.  Take out the "inline" and let the compiler do its work.

Link: https://lore.kernel.org/r/20221011184211.18128-5-jim2101024@gmail.com
Signed-off-by: Jim Quinlan &lt;jim2101024@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()</title>
<updated>2022-11-11T10:40:47Z</updated>
<author>
<name>Jim Quinlan</name>
<email>jim2101024@gmail.com</email>
</author>
<published>2022-10-11T18:42:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ca5dcc76314d1fa6d7307fd3b95039b08d2f2b97'/>
<id>urn:sha1:ca5dcc76314d1fa6d7307fd3b95039b08d2f2b97</id>
<content type='text'>
It would be nice to replace the PCIe link-up loop as well but
there are too many uses of this that do not poll (and the
read_poll_timeout uses "timeout==0" to loop forever).

Link: https://lore.kernel.org/r/20221011184211.18128-4-jim2101024@gmail.com
Signed-off-by: Jim Quinlan &lt;jim2101024@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Wait for 100ms following PERST# deassert</title>
<updated>2022-11-11T10:40:47Z</updated>
<author>
<name>Jim Quinlan</name>
<email>jim2101024@gmail.com</email>
</author>
<published>2022-10-11T18:42:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ae140ad827b359bc4fa7c7985691c4c1e3ca8f4'/>
<id>urn:sha1:3ae140ad827b359bc4fa7c7985691c4c1e3ca8f4</id>
<content type='text'>
Be prudent and give some time for power and clocks to become stable.  As
described in the PCIe CEM specification sections 2.2 and 2.2.1; as well as
PCIe r5.0, 6.6.1.

Link: https://lore.kernel.org/r/20221011184211.18128-3-jim2101024@gmail.com
Signed-off-by: Jim Quinlan &lt;jim2101024@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: brcmstb: Enable Multi-MSI</title>
<updated>2022-11-11T10:40:47Z</updated>
<author>
<name>Jim Quinlan</name>
<email>jim2101024@gmail.com</email>
</author>
<published>2022-10-11T18:42:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=198acab1772f22f2e91f68a2fc1331e91dad780a'/>
<id>urn:sha1:198acab1772f22f2e91f68a2fc1331e91dad780a</id>
<content type='text'>
We always wanted to enable Multi-MSI but didn't have a test device until
recently.  In addition, there are some devices out there that will ask for
multiple MSI but refuse to work if they are only granted one.

Link: https://lore.kernel.org/r/20221011184211.18128-2-jim2101024@gmail.com
Signed-off-by: Jim Quinlan &lt;jim2101024@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
</content>
</entry>
</feed>
