From: Bjorn Helgaas <bhelgaas@google.com>
To: Minghuan Lian <Minghuan.Lian@freescale.com>
Cc: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Zang Roy-R61911 <r61911@freescale.com>,
Hu Mingkai-B21284 <B21284@freescale.com>,
Scott Wood <scottwood@freescale.com>,
Yoder Stuart-B08248 <stuart.yoder@freescale.com>,
Arnd Bergmann <arnd@arndb.de>, Mohit Kumar <mohit.kumar@st.com>,
Jingoo Han <jg1.han@samsung.com>
Subject: Re: [PATCH v3 2/3] PCI: designware: Add get_msi_data() to pcie_host_ops
Date: Tue, 23 Sep 2014 17:14:19 -0600 [thread overview]
Message-ID: <20140923231419.GA27357@google.com> (raw)
In-Reply-To: <1411482540-31297-4-git-send-email-Minghuan.Lian@freescale.com>
[+cc Mohit, Jingoo]
On Tue, Sep 23, 2014 at 10:28:59PM +0800, Minghuan Lian wrote:
> The patch adds get_msi_data() for some platforms to return their
> special MSI message data.
>
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
> ---
> Change log:
> v3: no change
> v2: no change just derived from v1
>
> drivers/pci/host/pcie-designware.c | 7 ++++++-
> drivers/pci/host/pcie-designware.h | 1 +
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 1c09f814..c28ca05 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -366,7 +366,12 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
> else
> msg.address_lo = virt_to_phys((void *)pp->msi_data);
> msg.address_hi = 0x0;
> - msg.data = pos;
> +
> + if (pp->ops->get_msi_data)
> + msg.data = pp->ops->get_msi_data(pp, pos);
> + else
> + msg.data = pos;
> +
> write_msi_msg(irq, &msg);
>
> return 0;
> diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
> index 904e40a..c625675 100644
> --- a/drivers/pci/host/pcie-designware.h
> +++ b/drivers/pci/host/pcie-designware.h
> @@ -71,6 +71,7 @@ struct pcie_host_ops {
> void (*msi_set_irq)(struct pcie_port *pp, int irq);
> void (*msi_clear_irq)(struct pcie_port *pp, int irq);
> u32 (*get_msi_addr)(struct pcie_port *pp);
> + u32 (*get_msi_data)(struct pcie_port *pp, int pos);
> void (*scan_bus)(struct pcie_port *pp);
> int (*msi_host_init)(struct pcie_port *pp, struct msi_chip *chip);
> };
> --
> 1.9.1
>
WARNING: multiple messages have this Message-ID (diff)
From: bhelgaas@google.com (Bjorn Helgaas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/3] PCI: designware: Add get_msi_data() to pcie_host_ops
Date: Tue, 23 Sep 2014 17:14:19 -0600 [thread overview]
Message-ID: <20140923231419.GA27357@google.com> (raw)
In-Reply-To: <1411482540-31297-4-git-send-email-Minghuan.Lian@freescale.com>
[+cc Mohit, Jingoo]
On Tue, Sep 23, 2014 at 10:28:59PM +0800, Minghuan Lian wrote:
> The patch adds get_msi_data() for some platforms to return their
> special MSI message data.
>
> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
> ---
> Change log:
> v3: no change
> v2: no change just derived from v1
>
> drivers/pci/host/pcie-designware.c | 7 ++++++-
> drivers/pci/host/pcie-designware.h | 1 +
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 1c09f814..c28ca05 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -366,7 +366,12 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
> else
> msg.address_lo = virt_to_phys((void *)pp->msi_data);
> msg.address_hi = 0x0;
> - msg.data = pos;
> +
> + if (pp->ops->get_msi_data)
> + msg.data = pp->ops->get_msi_data(pp, pos);
> + else
> + msg.data = pos;
> +
> write_msi_msg(irq, &msg);
>
> return 0;
> diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
> index 904e40a..c625675 100644
> --- a/drivers/pci/host/pcie-designware.h
> +++ b/drivers/pci/host/pcie-designware.h
> @@ -71,6 +71,7 @@ struct pcie_host_ops {
> void (*msi_set_irq)(struct pcie_port *pp, int irq);
> void (*msi_clear_irq)(struct pcie_port *pp, int irq);
> u32 (*get_msi_addr)(struct pcie_port *pp);
> + u32 (*get_msi_data)(struct pcie_port *pp, int pos);
> void (*scan_bus)(struct pcie_port *pp);
> int (*msi_host_init)(struct pcie_port *pp, struct msi_chip *chip);
> };
> --
> 1.9.1
>
next prev parent reply other threads:[~2014-09-23 23:14 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 14:28 [PATCH] PCI: designware: Fix configuration base address Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 14:28 ` [PATCH] PCI: designware: Fix IO resource end address calculation Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 13:26 ` Bjorn Helgaas
2014-09-24 13:26 ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 1/3] PCI: designware: Rename get_msi_data to get_msi_addr Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 22:45 ` Bjorn Helgaas
2014-09-23 22:45 ` Bjorn Helgaas
2014-09-24 4:12 ` Mohit KUMAR DCG
2014-09-24 4:12 ` Mohit KUMAR DCG
2014-09-24 13:27 ` Bjorn Helgaas
2014-09-24 13:27 ` Bjorn Helgaas
2014-09-23 14:28 ` [PATCH v3 2/3] PCI: designware: Add get_msi_data() to pcie_host_ops Minghuan Lian
2014-09-23 14:28 ` Minghuan Lian
2014-09-23 23:14 ` Bjorn Helgaas [this message]
2014-09-23 23:14 ` Bjorn Helgaas
2014-09-24 4:22 ` Mohit KUMAR DCG
2014-09-24 4:22 ` Mohit KUMAR DCG
2014-09-23 14:29 ` [PATCH v3 3/3] PCI: Layerscape: Add Layerscape PCIe driver Minghuan Lian
2014-09-23 14:29 ` Minghuan Lian
2014-09-23 21:25 ` Scott Wood
2014-09-23 21:25 ` Scott Wood
2014-09-24 2:17 ` Lian Minghuan-B31939
2014-09-24 2:17 ` Lian Minghuan-B31939
2014-09-23 22:53 ` [PATCH] PCI: designware: Fix configuration base address Bjorn Helgaas
2014-09-23 22:53 ` Bjorn Helgaas
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 4:14 ` Mohit KUMAR DCG
2014-09-24 13:25 ` Bjorn Helgaas
2014-09-24 13:25 ` 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=20140923231419.GA27357@google.com \
--to=bhelgaas@google.com \
--cc=B21284@freescale.com \
--cc=Minghuan.Lian@freescale.com \
--cc=arnd@arndb.de \
--cc=jg1.han@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=mohit.kumar@st.com \
--cc=r61911@freescale.com \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.