Skip to content

mfd: rp1: depends on PCI_MSI #6891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

gastmaier
Copy link
Contributor

@gastmaier gastmaier commented Jun 11, 2025

rpi1.c depends on symbol CONFIG_PCI_MSI to define the pci_msi_* methods:

/* PCI specific interfaces */
#ifdef CONFIG_PCI_MSI
struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc);
void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg);
void __pci_read_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
void __pci_write_msi_msg(struct msi_desc *entry, struct msi_msg *msg);
void pci_msi_mask_irq(struct irq_data *data);
void pci_msi_unmask_irq(struct irq_data *data);
struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
					     struct msi_domain_info *info,
					     struct irq_domain *parent);
u32 pci_msi_domain_get_msi_rid(struct irq_domain *domain, struct pci_dev *pdev);
struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev);
#else /* CONFIG_PCI_MSI */
static inline struct irq_domain *pci_msi_get_device_domain(struct pci_dev *pdev)
{
	return NULL;
}
static inline void pci_write_msi_msg(unsigned int irq, struct msi_msg *msg) { }
#endif /* !CONFIG_PCI_MSI */

such as pci_msi_mask_irq:

static void rp1_mask_irq(struct irq_data *irqd)
{
	struct rp1_dev *rp1 = irqd->domain->host_data;
	struct irq_data *pcie_irqd = rp1->pcie_irqds[irqd->hwirq];

	pci_msi_mask_irq(pcie_irqd);
}

But never sets so in the Kconfig:

config MFD_RP1
	tristate "RP1 MFD driver"
	depends on PCI
	select MFD_CORE
        [...]

Therefore, set it.

The motivation is mostly CI, be able to infer dependencies and compile without relying on a particular defconfig.

The driver uses pci_msi methods, only defined when CONFIG_PCI_MSI symbol
is set, and cannot be compiled without. Therefore, it depends on this
symbol.

Signed-off-by: Jorge Marques <[email protected]>
@gastmaier
Copy link
Contributor Author

gastmaier commented Jun 18, 2025

Hi @pelwell , @popcornmix , are there questions or feedback revolving this PR?
Are third-party contributions welcome?

@pelwell
Copy link
Contributor

pelwell commented Jun 18, 2025

Yes, contributions very much are welcome. Sorry for the delay - I don't remember what was happening that day, but this should have been merged then.

@pelwell pelwell merged commit 3f1c347 into raspberrypi:rpi-6.12.y Jun 18, 2025
12 checks passed
@gastmaier gastmaier deleted the rpi-6.12.y-depends-pci-msi branch June 18, 2025 11:10
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jun 18, 2025
See: raspberrypi/linux#6891

kernel: Fix dwc2 thinkos
See: raspberrypi/linux#6906

kernel: dts: cm5/pi5: Disable EEE on rp1
See: raspberrypi/linux#6900

kernel: GPIO Acquire/Release Semantics for 'AI Camera'
See: raspberrypi/linux#6884

kernel: configs: arm64: Enable the UDMABUF driver
See: raspberrypi/linux#6903

kernel: drm/probe-helper: Ensure cmdline mode matches interlace mode
See: raspberrypi/linux#6902

kernel: media: i2c: Tweak default PDAF gain table in imx708 driver
See: raspberrypi/linux#6901

kernel: drivers: media: imx500: Add device id readback control
See: raspberrypi/linux#6897

kernel: overlays: i2c-rtc: Add M41T80 support
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jun 18, 2025
See: raspberrypi/linux#6891

kernel: Fix dwc2 thinkos
See: raspberrypi/linux#6906

kernel: dts: cm5/pi5: Disable EEE on rp1
See: raspberrypi/linux#6900

kernel: GPIO Acquire/Release Semantics for 'AI Camera'
See: raspberrypi/linux#6884

kernel: configs: arm64: Enable the UDMABUF driver
See: raspberrypi/linux#6903

kernel: drm/probe-helper: Ensure cmdline mode matches interlace mode
See: raspberrypi/linux#6902

kernel: media: i2c: Tweak default PDAF gain table in imx708 driver
See: raspberrypi/linux#6901

kernel: drivers: media: imx500: Add device id readback control
See: raspberrypi/linux#6897

kernel: overlays: i2c-rtc: Add M41T80 support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants