#include <linux/of_irq.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/msi.h>
#include <linux/acpi_iort.h>
#include "fsl-mc-private.h"
#ifdef GENERIC_MSI_DOMAIN_OPS
static irq_hw_number_t fsl_mc_domain_calc_hwirq(struct fsl_mc_device *dev,
struct msi_desc *desc)
{
return (irq_hw_number_t)(desc->msi_index + (dev->icid * 10000));
}
static void fsl_mc_msi_set_desc(msi_alloc_info_t *arg,
struct msi_desc *desc)
{
arg->desc = desc;
arg->hwirq = fsl_mc_domain_calc_hwirq(to_fsl_mc_device(desc->dev),
desc);
}
#else
#define fsl_mc_msi_set_desc …
#endif
static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info)
{ … }
static void __fsl_mc_msi_write_msg(struct fsl_mc_device *mc_bus_dev,
struct fsl_mc_device_irq *mc_dev_irq,
struct msi_desc *msi_desc)
{ … }
static void fsl_mc_msi_write_msg(struct irq_data *irq_data,
struct msi_msg *msg)
{ … }
static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info)
{ … }
struct irq_domain *fsl_mc_msi_create_irq_domain(struct fwnode_handle *fwnode,
struct msi_domain_info *info,
struct irq_domain *parent)
{ … }
struct irq_domain *fsl_mc_find_msi_domain(struct device *dev)
{ … }
int fsl_mc_msi_domain_alloc_irqs(struct device *dev, unsigned int irq_count)
{ … }
void fsl_mc_msi_domain_free_irqs(struct device *dev)
{ … }