From: "Jürgen Beisert" <jbe@pengutronix.de>
To: Richard Zhu <richard.zhuhongxing@gmail.com>
Cc: marex@denx.de, hrhaan@gmail.com, shawn.guo@linaro.org,
jgarzik@pobox.com, tj@kernel.org, linux-ide@vger.kernel.org,
Richard Zhu <r65037@freescale.com>
Subject: Re: [PATCH] pci: imx: enable pcie msi support
Date: Mon, 9 Dec 2013 12:00:53 +0100 [thread overview]
Message-ID: <201312091200.53928.jbe@pengutronix.de> (raw)
In-Reply-To: <1386581119-2962-2-git-send-email-richard.zhuhongxing@gmail.com>
Hi Richard,
On Monday 09 December 2013 10:25:19 Richard Zhu wrote:
> [...]
> +static int dw_msi_check_device(struct msi_chip *chip, struct pci_dev *pdev,
> + int nvec, int type)
> +{
> + struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
> + u32 val;
> +
> + if (pp->quirks & DW_PCIE_QUIRK_MSI_SELF_EN) {
> + if ((type == PCI_CAP_ID_MSI) || (type == PCI_CAP_ID_MSIX)) {
> + /* Set MSI enable of RC here */
> + val = readl(pp->dbi_base + 0x50);
> + if ((val & (PCI_MSI_FLAGS_ENABLE << 16)) == 0) {
> + val |= PCI_MSI_FLAGS_ENABLE << 16;
> + writel(val, pp->dbi_base + 0x50);
> + }
> + }
> + }
> +
> + return 0;
> +}
Maybe I'm wrong: but does setting this bit not already happen in function
msi_set_enable() in 'drivers/pci/msi.c' (just to a 16 bit register, so there's
no bit shift required)?
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-12-09 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 9:25 [discussion] pci: imx: enable pcie msi support Richard Zhu
2013-12-09 9:25 ` [PATCH] " Richard Zhu
2013-12-09 11:00 ` Jürgen Beisert [this message]
2013-12-16 5:44 ` Hong-Xing.Zhu
2013-12-09 11:16 ` Marek Vasut
2013-12-12 18:57 ` Harro Haan
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=201312091200.53928.jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=hrhaan@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=marex@denx.de \
--cc=r65037@freescale.com \
--cc=richard.zhuhongxing@gmail.com \
--cc=shawn.guo@linaro.org \
--cc=tj@kernel.org \
/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