2024-06-23 08:18:34 -07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
// Copyright (C) 2022 Linutronix GmbH
|
|
|
|
// Copyright (C) 2022 Intel
|
|
|
|
|
|
|
|
#ifndef _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H
|
|
|
|
#define _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H
|
|
|
|
|
|
|
|
#include <linux/bits.h>
|
|
|
|
#include <linux/irqdomain.h>
|
|
|
|
#include <linux/msi.h>
|
|
|
|
|
2024-06-23 08:18:38 -07:00
|
|
|
#ifdef CONFIG_PCI_MSI
|
|
|
|
#define MATCH_PCI_MSI BIT(DOMAIN_BUS_PCI_MSI)
|
|
|
|
#else
|
|
|
|
#define MATCH_PCI_MSI (0)
|
|
|
|
#endif
|
|
|
|
|
2024-06-23 08:18:41 -07:00
|
|
|
#define MATCH_PLATFORM_MSI BIT(DOMAIN_BUS_PLATFORM_MSI)
|
|
|
|
|
2024-06-23 08:18:34 -07:00
|
|
|
int msi_lib_irq_domain_select(struct irq_domain *d, struct irq_fwspec *fwspec,
|
|
|
|
enum irq_domain_bus_token bus_token);
|
|
|
|
|
|
|
|
bool msi_lib_init_dev_msi_info(struct device *dev, struct irq_domain *domain,
|
|
|
|
struct irq_domain *real_parent,
|
|
|
|
struct msi_domain_info *info);
|
|
|
|
|
|
|
|
#endif /* _DRIVERS_IRQCHIP_IRQ_MSI_LIB_H */
|