/* U4 PCIe MSIs need to write to the special register in * the bridge that generates interrupts. There should be * theoretically a register at 0xf8005000 where you just write * the MSI number and that triggers the right interrupt, but * unfortunately, this is busted in HW, the bridge endian swaps * the value and hits the wrong nibble in the register. * * So instead we use another register set which is used normally * for converting HT interrupts to MPIC interrupts, which decodes * the interrupt number as part of the low address bits * * This will not work if we ever use more than one legacy MSI in * a block but we never do. For one MSI or multiple MSI-X where * each interrupt address can be specified separately, it works * just fine.
*/ if (of_device_is_compatible(hose->dn, "u4-pcie") ||
of_device_is_compatible(hose->dn, "U4-pcie")) return 0xf8004000 | (hwirq << 4);
staticint u3msi_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
{ unsignedint virq; struct msi_desc *entry; struct msi_msg msg;
u64 addr; int hwirq;
if (type == PCI_CAP_ID_MSIX)
pr_debug("u3msi: MSI-X untested, trying anyway.\n");
/* If we can't find a magic address then MSI ain't gonna work */ if (find_ht_magic_addr(pdev, 0) == 0 &&
find_u4_magic_addr(pdev, 0) == 0) {
pr_debug("u3msi: no magic address found for %s\n",
pci_name(pdev)); return -ENXIO;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.