<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/pci/controller/pcie-microchip-host.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>2023-08-29T16:03:56Z</updated>
<entry>
<title>Merge branch 'pci/controller/remove-void-cast'</title>
<updated>2023-08-29T16:03:56Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2023-08-29T16:03:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6cef12635821c3d12b6b038b6e5e926917a3dca3'/>
<id>urn:sha1:6cef12635821c3d12b6b038b6e5e926917a3dca3</id>
<content type='text'>
- Add stubs for devm action functions that call clk_disable_unprepare() to
  avoid casts between incompatible function types (Krzysztof Wilczyński)

* pci/controller/remove-void-cast:
  PCI: microchip: Remove cast between incompatible function type
  PCI: keembay: Remove cast between incompatible function type
  PCI: meson: Remove cast between incompatible function type
</content>
</entry>
<entry>
<title>PCI: microchip: Re-partition code between probe() and init()</title>
<updated>2023-08-08T10:58:21Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:14:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bac406c34fbc906f09479af72cb6a908a5d1db1d'/>
<id>urn:sha1:bac406c34fbc906f09479af72cb6a908a5d1db1d</id>
<content type='text'>
Continuing to use pci_host_common_probe() for the PCIe Root Complex on
PolarFire SoC is leading to an extremely large _init() function and some
unnatural code flow. Re-partition the code so that some tasks are done
in a _probe() routine, which calls pci_host_common_probe() and then use
a much smaller _init() function, mainly to enable interrupts after
address translation tables are set up.

Link: https://lore.kernel.org/r/20230728131401.1615724-8-daire.mcnamara@microchip.com
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Gather MSI information from hardware config registers</title>
<updated>2023-08-08T10:58:21Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:14:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1abb722888fda4a03e211db9b361281f903375e1'/>
<id>urn:sha1:1abb722888fda4a03e211db9b361281f903375e1</id>
<content type='text'>
The PCIe Root Complex on PolarFire SoC is configured at bitstream creation
time using Libero. Key MSI-related parameters include the number of
MSIs (1/2/4/8/16/32) and the MSI address. In the device driver, extract
this information from hardware registers at init time, and use it to configure
MSI system, including configuring MSI capability structure correctly in
configuration space.

Link: https://lore.kernel.org/r/20230728131401.1615724-7-daire.mcnamara@microchip.com
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Clean up initialisation of interrupts</title>
<updated>2023-08-08T10:58:21Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:13:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4f0b91247f78ccd702f2da5a17d4524101adfc7d'/>
<id>urn:sha1:4f0b91247f78ccd702f2da5a17d4524101adfc7d</id>
<content type='text'>
Refactor interrupt handling in _init() function into
disable_interrupts(), init_interrupts(), clear_sec_errors() and clear
ded_errors() because current code is unwieldy and prone to bugs.

Disable interrupts as soon as possible and only enable interrupts after
address translation is setup to prevent spurious axi2pcie and pcie2axi
translation errors being reported.

Link: https://lore.kernel.org/r/20230728131401.1615724-6-daire.mcnamara@microchip.com
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Enable event handlers to access bridge and control pointers</title>
<updated>2023-08-08T10:58:21Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:13:58Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d1d6a0c9e79c595b3961d5b62594e058d811d6cb'/>
<id>urn:sha1:d1d6a0c9e79c595b3961d5b62594e058d811d6cb</id>
<content type='text'>
Minor re-organisation so that event handlers can access both a pointer
to the bridge area of the PCIe Root Port and the control area of the PCIe
Root Port.

Link: https://lore.kernel.org/r/20230728131401.1615724-5-daire.mcnamara@microchip.com
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Align register, offset, and mask names with HW docs</title>
<updated>2023-08-08T10:58:21Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:13:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4d6bf4c49578b9d29bc0f22fc0e7193087619aed'/>
<id>urn:sha1:4d6bf4c49578b9d29bc0f22fc0e7193087619aed</id>
<content type='text'>
Minor code re-organisation so that macros representing registers ascend in
numerical order and use the same names as their hardware documentation.
Removed registers not used by the driver.

Link: https://lore.kernel.org/r/20230728131401.1615724-4-daire.mcnamara@microchip.com
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Enable building driver as a module</title>
<updated>2023-08-08T10:55:55Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:13:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2e245bc8a2abf61e0adbac99c9f89fa537f67ecd'/>
<id>urn:sha1:2e245bc8a2abf61e0adbac99c9f89fa537f67ecd</id>
<content type='text'>
Enable building driver as a module. The expected use case is the
driver is built as a module, is installed when needed, and cannot be
removed once installed since it is not possible to clean-up
the irq_chip data structures on removal, as described in:

https://lore.kernel.org/linux-pci/87y1wgbah8.wl-maz@kernel.org/

The driver has .suppress_bind_attrs set to true for the same
reasons (ie prevent unbinding, that would leave the kernel
with stale IRQ configuration that cannot be cleaned up).

Link: https://lore.kernel.org/linux-pci/87y1wgbah8.wl-maz@kernel.org/
Link: https://lore.kernel.org/r/20230728131401.1615724-3-daire.mcnamara@microchip.com
Suggested-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Acked-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Correct the DED and SEC interrupt bit offsets</title>
<updated>2023-08-08T09:22:57Z</updated>
<author>
<name>Daire McNamara</name>
<email>daire.mcnamara@microchip.com</email>
</author>
<published>2023-07-28T13:13:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6d473a5a26136edf55c435a1c433e52910e03926'/>
<id>urn:sha1:6d473a5a26136edf55c435a1c433e52910e03926</id>
<content type='text'>
The SEC and DED interrupt bits are laid out the wrong way round so the SEC
interrupt handler attempts to mask, unmask, and clear the DED interrupt
and vice versa. Correct the bit offsets so that each interrupt handler
operates properly.

Link: https://lore.kernel.org/r/20230728131401.1615724-2-daire.mcnamara@microchip.com
Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver")
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: microchip: Remove cast between incompatible function type</title>
<updated>2023-07-13T18:20:31Z</updated>
<author>
<name>Krzysztof Wilczyński</name>
<email>kwilczynski@kernel.org</email>
</author>
<published>2023-06-29T16:59:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed3cac7c5ac6e7f284100995b80a0a60770c990c'/>
<id>urn:sha1:ed3cac7c5ac6e7f284100995b80a0a60770c990c</id>
<content type='text'>
Rather than casting void(*)(struct clk *) to void (*)(void *), that
forces conversion to an incompatible function type, replace the cast
with a small local stub function with a signature that matches what
the devm_add_action_or_reset() function expects.

The sub function takes a void *, then passes it directly to
clk_disable_unprepare(), which handles the more specific type.

Reported by clang when building with warnings enabled:

  drivers/pci/controller/pcie-microchip-host.c:866:32: warning: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
          devm_add_action_or_reset(dev, (void (*) (void *))clk_disable_unprepare,
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
No functional changes are intended.

Fixes: 6f15a9c9f941 ("PCI: microchip: Add Microchip PolarFire PCIe controller driver")
Link: https://lore.kernel.org/linux-pci/20230629165956.237832-3-kwilczynski@kernel.org
Link: https://lore.kernel.org/linux-pci/20230511-pci-microchip-clk-cast-v1-1-7674f4d4e218@kernel.org
Link: https://lore.kernel.org/linux-pci/20230111125323.1911373-3-daire.mcnamara@microchip.com
Co-developed-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Signed-off-by: Daire McNamara &lt;daire.mcnamara@microchip.com&gt;
Co-developed-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: Simon Horman &lt;horms@kernel.org&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Acked-by: Conor Dooley &lt;conor.dooley@microchip.com&gt;
</content>
</entry>
<entry>
<title>PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules</title>
<updated>2023-02-17T14:47:58Z</updated>
<author>
<name>Nick Alcock</name>
<email>nick.alcock@oracle.com</email>
</author>
<published>2023-02-16T15:24:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f98954b293d0a0f9646117af75c82c1b89191c53'/>
<id>urn:sha1:f98954b293d0a0f9646117af75c82c1b89191c53</id>
<content type='text'>
Since 8b41fc4454e3 ("kbuild: create modules.builtin without
Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations are
used to identify modules. As a consequence, MODULE_LICENSE in non-modules
causes modprobe to misidentify the object file as a module when it is not,
and modprobe might succeed rather than failing with a suitable error
message.

For tristate modules that can be either built-in or loaded at runtime,
modprobe succeeds in both cases:

  # modprobe ext4
  [exit status zero if CONFIG_EXT4_FS=y or =m]

For boolean modules like the Standard Hot Plug Controller driver (shpchp)
that cannot be loaded at runtime, modprobe should always fail like this:

  # modprobe shpchp
  modprobe: FATAL: Module shpchp not found in directory /lib/modules/...
  [exit status non-zero regardless of CONFIG_HOTPLUG_PCI_SHPC]

but prior to this commit, shpchp_core.c contained MODULE_LICENSE, so
"modprobe shpchp" silently succeeded when it should have failed.

Remove MODULE_LICENSE in files that cannot be built as modules.

[bhelgaas: commit log, squash]
Suggested-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Link: https://lore.kernel.org/r/20230216152410.4312-1-nick.alcock@oracle.com/
Signed-off-by: Nick Alcock &lt;nick.alcock@oracle.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Manivannan Sadhasivam &lt;manivannan.sadhasivam@linaro.org&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Cc: Hitomi Hasegawa &lt;hasegawa-hitomi@fujitsu.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
</content>
</entry>
</feed>
