diff options
author | Honghui Zhang <honghui.zhang@mediatek.com> | 2017-08-30 09:19:14 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-08-30 08:23:59 -0500 |
commit | d84c246b73603028a8d7b07659b942c754b34631 (patch) | |
tree | e7c3a5dbe764a43cc0ff10bf1dec77205c8052cd /drivers/pci/host/pcie-mediatek.c | |
parent | 43e6409db64ddab535ae08f77923f9081c38226b (diff) | |
download | linux-stable-d84c246b73603028a8d7b07659b942c754b34631.tar.gz linux-stable-d84c246b73603028a8d7b07659b942c754b34631.tar.bz2 linux-stable-d84c246b73603028a8d7b07659b942c754b34631.zip |
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>
Diffstat (limited to 'drivers/pci/host/pcie-mediatek.c')
-rw-r--r-- | drivers/pci/host/pcie-mediatek.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index 0581359493ba..db93efdf1d63 100644 --- a/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c @@ -77,7 +77,6 @@ #define PCIE_INT_MASK 0x420 #define INTX_MASK GENMASK(19, 16) #define INTX_SHIFT 16 -#define INTX_NUM 4 #define PCIE_INT_STATUS 0x424 #define MSI_STATUS BIT(23) #define PCIE_IMSI_STATUS 0x42c @@ -576,7 +575,7 @@ static int mtk_pcie_init_irq_domain(struct mtk_pcie_port *port, return -ENODEV; } - port->irq_domain = irq_domain_add_linear(pcie_intc_node, INTX_NUM, + port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, &intx_domain_ops, port); if (!port->irq_domain) { dev_err(dev, "failed to get INTx IRQ domain\n"); @@ -605,7 +604,7 @@ static irqreturn_t mtk_pcie_intr_handler(int irq, void *data) u32 bit = INTX_SHIFT; while ((status = readl(port->base + PCIE_INT_STATUS)) & INTX_MASK) { - for_each_set_bit_from(bit, &status, INTX_NUM + INTX_SHIFT) { + for_each_set_bit_from(bit, &status, PCI_NUM_INTX + INTX_SHIFT) { /* Clear the INTx */ writel(1 << bit, port->base + PCIE_INT_STATUS); virq = irq_find_mapping(port->irq_domain, |