Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24832b4d authored by Minghuan Lian's avatar Minghuan Lian Committed by Bjorn Helgaas
Browse files

PCI: designware: Add get_msi_data() to pcie_host_ops



Add a struct pcie_host_ops .get_msi_data() method for platforms to return
their special MSI message data.

Signed-off-by: default avatarMinghuan Lian <Minghuan.Lian@freescale.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarMohit KUMAR <mohit.kumar@st.com>
parent 450e344e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -366,7 +366,12 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
	else
		msg.address_lo = virt_to_phys((void *)pp->msi_data);
	msg.address_hi = 0x0;

	if (pp->ops->get_msi_data)
		msg.data = pp->ops->get_msi_data(pp, pos);
	else
		msg.data = pos;

	write_msi_msg(irq, &msg);

	return 0;
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ struct pcie_host_ops {
	void (*msi_set_irq)(struct pcie_port *pp, int irq);
	void (*msi_clear_irq)(struct pcie_port *pp, int irq);
	u32 (*get_msi_addr)(struct pcie_port *pp);
	u32 (*get_msi_data)(struct pcie_port *pp, int pos);
	void (*scan_bus)(struct pcie_port *pp);
	int (*msi_host_init)(struct pcie_port *pp, struct msi_chip *chip);
};