From: Honghui Zhang <honghui.zhang@mediatek.com>
To: bhelgaas@google.com
Cc: 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, hongkun.cao@mediatek.com,
youlin.pei@mediatek.com, yong.wu@mediatek.com,
yt.shen@mediatek.com, sean.wang@mediatek.com,
xinping.qian@mediatek.com
Subject: Re: [PATCH] PCI: mediatek: take use of PCI_NUM_INTX
Date: Wed, 30 Aug 2017 09:44:58 +0800 [thread overview]
Message-ID: <1504057498.10964.13.camel@mhfsdcap03> (raw)
In-Reply-To: <1504055954-31545-1-git-send-email-honghui.zhang@mediatek.com>
On Wed, 2017-08-30 at 09:19 +0800, honghui.zhang@mediatek.com wrote:
> From: Honghui Zhang <honghui.zhang@mediatek.com>
>
> 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 <honghui.zhang@mediatek.com>
> ---
> drivers/pci/host/pcie-mediatek.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
Hi, Bjorn, Ryder,
this patch is based on Paul's v7 version of patch[1]("Move enum
pci_interrupt_pin to linux/pci.h").
[1]http://www.spinics.net/lists/linux-pci/msg63891.html
Thanks.
> 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,
next prev parent reply other threads:[~2017-08-30 1:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 1:19 [PATCH] PCI: mediatek: take use of PCI_NUM_INTX honghui.zhang
2017-08-30 1:44 ` Honghui Zhang [this message]
[not found] ` <1504055954-31545-1-git-send-email-honghui.zhang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-08-30 13:24 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1504057498.10964.13.camel@mhfsdcap03 \
--to=honghui.zhang@mediatek.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=eddie.huang@mediatek.com \
--cc=hongkun.cao@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=xinping.qian@mediatek.com \
--cc=yingjoe.chen@mediatek.com \
--cc=yong.wu@mediatek.com \
--cc=youlin.pei@mediatek.com \
--cc=yt.shen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).