Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437AbdH3NYn (ORCPT ); Wed, 30 Aug 2017 09:24:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:53262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751326AbdH3NYm (ORCPT ); Wed, 30 Aug 2017 09:24:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 921DD20C10 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Wed, 30 Aug 2017 08:24:39 -0500 From: Bjorn Helgaas To: honghui.zhang@mediatek.com Cc: bhelgaas@google.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, ryder.lee@mediatek.com, youlin.pei@mediatek.com, hongkun.cao@mediatek.com, sean.wang@mediatek.com, xinping.qian@mediatek.com, yt.shen@mediatek.com, yong.wu@mediatek.com Subject: Re: [PATCH] PCI: mediatek: take use of PCI_NUM_INTX Message-ID: <20170830132439.GA15438@bhelgaas-glaptop.roam.corp.google.com> References: <1504055954-31545-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504055954-31545-1-git-send-email-honghui.zhang@mediatek.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2006 Lines: 53 On Wed, Aug 30, 2017 at 09:19:14AM +0800, honghui.zhang@mediatek.com wrote: > From: Honghui Zhang > > Switch from using a custom NUM_INTX macro to the generic PCI_NUM_INTX > definition for the number of INTx interrupts. > > Signed-off-by: Honghui Zhang I rebased pci/host-mediatek on top of pci/irq-intx (which adds PCI_NUM_INTX) and applied this for v4.14, thanks! > --- > drivers/pci/host/pcie-mediatek.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c > index c567996..5c0ce9b 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"); > @@ -594,7 +593,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, > -- > 2.6.4 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel