linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravi Shankar Jonnalagadda <venkata.ravi.jonnalagadda@xilinx.com>
To: <vinod.koul@intel.com>, <robh+dt@kernel.org>,
	<mark.rutland@arm.com>, <michal.simek@xilinx.com>,
	<soren.brinkmann@xilinx.com>, <dan.j.williams@intel.com>,
	<bhelgaas@google.com>, <vjonnal@xilinx.com>,
	<lorenzo.pieralisi@arm.com>, <bharat.kumar.gogada@xilinx.com>,
	<dmaengine@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<rgummal@xilinx.com>
Subject: [PATCH v2 1/5] PCI:xilinx-nwl: Enable Root DMA
Date: Fri, 8 Sep 2017 17:53:03 +0530	[thread overview]
Message-ID: <1504873388-29195-2-git-send-email-vjonnal@xilinx.com> (raw)
In-Reply-To: <1504873388-29195-1-git-send-email-vjonnal@xilinx.com>

Enabling Root DMA interrupts

Adding Root DMA translations to bridge for Register Access

Signed-off-by: Ravi Shankar Jonnalagadda <vjonnal@xilinx.com>
Signed-off-by: RaviKiran Gummaluri <rgummal@xilinx.com>
---
 drivers/pci/host/pcie-xilinx-nwl.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c
index eec641a..5766582 100644
--- a/drivers/pci/host/pcie-xilinx-nwl.c
+++ b/drivers/pci/host/pcie-xilinx-nwl.c
@@ -39,6 +39,11 @@
 #define E_ECAM_CONTROL			0x00000228
 #define E_ECAM_BASE_LO			0x00000230
 #define E_ECAM_BASE_HI			0x00000234
+#define E_DREG_CTRL			0x00000288
+#define E_DREG_BASE_LO			0x00000290
+
+#define DREG_DMA_EN			BIT(0)
+#define DREG_DMA_BASE_LO		0xFD0F0000
 
 /* Ingress - address translations */
 #define I_MSII_CAPABILITIES		0x00000300
@@ -57,6 +62,10 @@
 #define MSGF_MSI_STATUS_HI		0x00000444
 #define MSGF_MSI_MASK_LO		0x00000448
 #define MSGF_MSI_MASK_HI		0x0000044C
+/* Root DMA Interrupt register */
+#define MSGF_DMA_MASK			0x00000464
+
+#define MSGF_INTR_EN			BIT(0)
 
 /* Msg filter mask bits */
 #define CFG_ENABLE_PM_MSG_FWD		BIT(1)
@@ -766,6 +775,12 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie)
 	nwl_bridge_writel(pcie, nwl_bridge_readl(pcie, MSGF_LEG_STATUS) &
 			  MSGF_LEG_SR_MASKALL, MSGF_LEG_STATUS);
 
+	/* Enabling DREG translations */
+	nwl_bridge_writel(pcie, DREG_DMA_EN, E_DREG_CTRL);
+	nwl_bridge_writel(pcie, DREG_DMA_BASE_LO, E_DREG_BASE_LO);
+	/* Enabling Root DMA interrupts */
+	nwl_bridge_writel(pcie, MSGF_INTR_EN, MSGF_DMA_MASK);
+
 	/* Enable all legacy interrupts */
 	nwl_bridge_writel(pcie, MSGF_LEG_SR_MASKALL, MSGF_LEG_MASK);
 
-- 
2.7.4

  reply	other threads:[~2017-09-08 12:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 12:23 [PATCH v2 0/5] dmaengine: ZynqMP PS PCIe DMA driver Ravi Shankar Jonnalagadda
2017-09-08 12:23 ` Ravi Shankar Jonnalagadda [this message]
2017-09-19 19:36   ` [PATCH v2 1/5] PCI:xilinx-nwl: Enable Root DMA Bjorn Helgaas
2017-09-08 12:23 ` [PATCH v2 2/5] PCI:xilinx-nwl: Correcting Styling checks Ravi Shankar Jonnalagadda
2017-09-08 12:23 ` [PATCH v2 3/5] dmaengine: zynqmp_ps_pcie: Adding PS PCIe DMA driver Ravi Shankar Jonnalagadda
2017-09-11  3:43   ` kbuild test robot
2017-09-20  5:49   ` Michal Simek
2017-09-26 17:32   ` Vinod Koul
2017-09-08 12:23 ` [PATCH v2 4/5] dmaengine: zynqmp_ps_pcie: Adding PS PCIe platform " Ravi Shankar Jonnalagadda
2017-09-08 12:23 ` Ravi Shankar Jonnalagadda
2017-09-26 17:34   ` Vinod Koul
2017-09-08 12:23 ` [PATCH v2 5/5] devicetree: zynqmp_ps_pcie: Devicetree binding for Root DMA Ravi Shankar Jonnalagadda
2017-09-13 20:25   ` Rob Herring

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=1504873388-29195-2-git-send-email-vjonnal@xilinx.com \
    --to=venkata.ravi.jonnalagadda@xilinx.com \
    --cc=bharat.kumar.gogada@xilinx.com \
    --cc=bhelgaas@google.com \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=rgummal@xilinx.com \
    --cc=robh+dt@kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=vinod.koul@intel.com \
    --cc=vjonnal@xilinx.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).