<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/pci/controller/pcie-rockchip-ep.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-06-21T12:40:34Z</updated>
<entry>
<title>PCI: rockchip-ep: Remove wrong mask on subsys_vendor_id</title>
<updated>2024-06-21T12:40:34Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2024-04-03T14:45:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5ee6b17dc56101d46c53cb30e3fc60ceaad3d16d'/>
<id>urn:sha1:5ee6b17dc56101d46c53cb30e3fc60ceaad3d16d</id>
<content type='text'>
commit 2dba285caba53f309d6060fca911b43d63f41697 upstream.

Remove wrong mask on subsys_vendor_id. Both the Vendor ID and Subsystem
Vendor ID are u16 variables and are written to a u32 register of the
controller. The Subsystem Vendor ID was always 0 because the u16 value
was masked incorrectly with GENMASK(31,16) resulting in all lower 16
bits being set to 0 prior to the shift.

Remove both masks as they are unnecessary and set the register correctly
i.e., the lower 16-bits are the Vendor ID and the upper 16-bits are the
Subsystem Vendor ID.

This is documented in the RK3399 TRM section 17.6.7.1.17

[kwilczynski: removed unnecesary newline]
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Link: https://lore.kernel.org/linux-pci/20240403144508.489835-1-rick.wertenbroek@gmail.com
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: rockchip-ep: Use INTX instead of legacy</title>
<updated>2023-12-19T08:36:42Z</updated>
<author>
<name>Damien Le Moal</name>
<email>dlemoal@kernel.org</email>
</author>
<published>2023-11-22T06:04:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5815c2d17a74927c627f5c759bd9d772ac4c3981'/>
<id>urn:sha1:5815c2d17a74927c627f5c759bd9d772ac4c3981</id>
<content type='text'>
Rename the function rockchip_pcie_ep_send_legacy_irq() of the rockchip
endpoint driver to rockchip_pcie_ep_send_intx_irq(). Uses of the term
"legacy" are also replaced with "INTX" in comments.

Link: https://lore.kernel.org/r/20231122060406.14695-15-dlemoal@kernel.org
Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions</title>
<updated>2023-12-18T10:55:56Z</updated>
<author>
<name>Damien Le Moal</name>
<email>dlemoal@kernel.org</email>
</author>
<published>2023-11-22T06:03:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74955cb8ccc38539f8c029336e07e6b43b6a942e'/>
<id>urn:sha1:74955cb8ccc38539f8c029336e07e6b43b6a942e</id>
<content type='text'>
linux/pci.h defines the IRQ flags PCI_IRQ_INTX, PCI_IRQ_MSI and
PCI_IRQ_MSIX. Let's use these flags directly instead of the endpoint
definitions provided by enum pci_epc_irq_type. This removes the need
for defining this enum type completely.

Link: https://lore.kernel.org/r/20231122060406.14695-3-dlemoal@kernel.org
Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Serge Semin &lt;fancer.lancer@gmail.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
</content>
</entry>
<entry>
<title>PCI: rockchip: Set address alignment for endpoint mode</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Damien Le Moal</name>
<email>dlemoal@kernel.org</email>
</author>
<published>2023-04-18T07:46:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7e6689b34a815bd379dfdbe9855d36f395ef056c'/>
<id>urn:sha1:7e6689b34a815bd379dfdbe9855d36f395ef056c</id>
<content type='text'>
The address translation unit of the rockchip EP controller does not use
the lower 8 bits of a PCIe-space address to map local memory. Thus we
must set the align feature field to 256 to let the user know about this
constraint.

Link: https://lore.kernel.org/r/20230418074700.1083505-12-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Signed-off-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Don't advertise MSI-X in PCIe capabilities</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a52587e0bee14cbeeadf48a24013828cb04b8df8'/>
<id>urn:sha1:a52587e0bee14cbeeadf48a24013828cb04b8df8</id>
<content type='text'>
The RK3399 PCIe endpoint controller cannot generate MSI-X IRQs.
This is documented in the RK3399 technical reference manual (TRM)
section 17.5.9 "Interrupt Support".

MSI-X capability should therefore not be advertised. Remove the
MSI-X capability by editing the capability linked-list. The
previous entry is the MSI capability, therefore get the next
entry from the MSI-X capability entry and set it as next entry
for the MSI capability. This in effect removes MSI-X from the list.

Linked list before : MSI cap -&gt; MSI-X cap -&gt; PCIe Device cap -&gt; ...
Linked list now : MSI cap -&gt; PCIe Device cap -&gt; ...

Link: https://lore.kernel.org/r/20230418074700.1083505-11-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Use u32 variable to access 32-bit registers</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8962b2cb39119cbda4fc69a1f83957824f102f81'/>
<id>urn:sha1:8962b2cb39119cbda4fc69a1f83957824f102f81</id>
<content type='text'>
Previously u16 variables were used to access 32-bit registers, this
resulted in not all of the data being read from the registers. Also
the left shift of more than 16-bits would result in moving data out
of the variable. Use u32 variables to access 32-bit registers

Link: https://lore.kernel.org/r/20230418074700.1083505-10-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Fix window mapping and address translation for endpoint</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dc73ed0f1b8bddd7f2bf70d123e68ffc99ad71ce'/>
<id>urn:sha1:dc73ed0f1b8bddd7f2bf70d123e68ffc99ad71ce</id>
<content type='text'>
The RK3399 PCI endpoint core has 33 windows for PCIe space, now in the
driver up to 32 fixed size (1M) windows are used and pages are allocated
and mapped accordingly. The driver first used a single window and allocated
space inside which caused translation issues (between CPU space and PCI
space) because a window can only have a single translation at a given
time, which if multiple pages are allocated inside will cause conflicts.
Now each window is a single region of 1M which will always guarantee that
the translation is not in conflict.

Set the translation register addresses for physical function. As documented
in the technical reference manual (TRM) section 17.5.5 "PCIe Address
Translation" and section 17.6.8 "Address Translation Registers Description"

Link: https://lore.kernel.org/r/20230418074700.1083505-9-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=166e89d99dd85a856343cca51eee781b793801f2'/>
<id>urn:sha1:166e89d99dd85a856343cca51eee781b793801f2</id>
<content type='text'>
Fix legacy IRQ generation for RK3399 PCIe endpoint core according to
the technical reference manual (TRM). Assert and deassert legacy
interrupt (INTx) through the legacy interrupt control register
("PCIE_CLIENT_LEGACY_INT_CTRL") instead of manually generating a PCIe
message. The generation of the legacy interrupt was tested and validated
with the PCIe endpoint test driver.

Link: https://lore.kernel.org/r/20230418074700.1083505-8-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Assert PCI Configuration Enable bit after probe</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f397fd4ac1fa3afcabd8cee030f953ccaed2a364'/>
<id>urn:sha1:f397fd4ac1fa3afcabd8cee030f953ccaed2a364</id>
<content type='text'>
Assert PCI Configuration Enable bit after probe. When this bit is left to
0 in the endpoint mode, the RK3399 PCIe endpoint core will generate
configuration request retry status (CRS) messages back to the root complex.
Assert this bit after probe to allow the RK3399 PCIe endpoint core to reply
to configuration requests from the root complex.
This is documented in section 17.5.8.1.2 of the RK3399 TRM.

Link: https://lore.kernel.org/r/20230418074700.1083505-4-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>PCI: rockchip: Write PCI Device ID to correct register</title>
<updated>2023-06-22T07:36:51Z</updated>
<author>
<name>Rick Wertenbroek</name>
<email>rick.wertenbroek@gmail.com</email>
</author>
<published>2023-04-18T07:46:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1f1c42ece18de365c976a060f3c8eb481b038e3a'/>
<id>urn:sha1:1f1c42ece18de365c976a060f3c8eb481b038e3a</id>
<content type='text'>
Write PCI Device ID (DID) to the correct register. The Device ID was not
updated through the correct register. Device ID was written to a read-only
register and therefore did not work. The Device ID is now set through the
correct register. This is documented in the RK3399 TRM section 17.6.6.1.1

Link: https://lore.kernel.org/r/20230418074700.1083505-3-rick.wertenbroek@gmail.com
Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
Tested-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Signed-off-by: Rick Wertenbroek &lt;rick.wertenbroek@gmail.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
</feed>
