Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: mediatek: Use PCI_NUM_INTX

Switch from using custom INTX_NUM macro to the generic PCI_NUM_INTX definition
for the number of INTx interrupts.

Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
[bhelgaas: use subject/changelog from similar patches]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Honghui Zhang and committed by
Bjorn Helgaas
d84c246b 43e6409d

+2 -3
+2 -3
drivers/pci/host/pcie-mediatek.c
··· 77 77 #define PCIE_INT_MASK 0x420 78 78 #define INTX_MASK GENMASK(19, 16) 79 79 #define INTX_SHIFT 16 80 - #define INTX_NUM 4 81 80 #define PCIE_INT_STATUS 0x424 82 81 #define MSI_STATUS BIT(23) 83 82 #define PCIE_IMSI_STATUS 0x42c ··· 575 576 return -ENODEV; 576 577 } 577 578 578 - port->irq_domain = irq_domain_add_linear(pcie_intc_node, INTX_NUM, 579 + port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 579 580 &intx_domain_ops, port); 580 581 if (!port->irq_domain) { 581 582 dev_err(dev, "failed to get INTx IRQ domain\n"); ··· 604 605 u32 bit = INTX_SHIFT; 605 606 606 607 while ((status = readl(port->base + PCIE_INT_STATUS)) & INTX_MASK) { 607 - for_each_set_bit_from(bit, &status, INTX_NUM + INTX_SHIFT) { 608 + for_each_set_bit_from(bit, &status, PCI_NUM_INTX + INTX_SHIFT) { 608 609 /* Clear the INTx */ 609 610 writel(1 << bit, port->base + PCIE_INT_STATUS); 610 611 virq = irq_find_mapping(port->irq_domain,