public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: ChunyouTang <tangchunyou@163.com>
To: manivannan.sadhasivam@linaro.org, fancer.lancer@gmail.com,
	vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	tangchunyou@163.com
Subject: [PATCH] dma/dw-edma: chip regs base should add the offset
Date: Wed, 16 Oct 2024 16:17:25 +0800	[thread overview]
Message-ID: <20241016081725.4810-1-tangchunyou@163.com> (raw)

From: tangchunyou <tangchunyou@163.com>

1. the regs base in the bar havd en offset rg.off
	.rg.bar		= BAR0,
	.rg.off		= 0x00001000,	/* 4 Kbytes */
	.rg.sz		= 0x00002000,	/* 8 Kbytes */

2. add the rg.off to obtain the real regs base.

Signed-off-by: tangchunyou <tangchunyou@163.com>
---
 drivers/dma/dw-edma/dw-edma-pcie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index 1c6043751dc9..2918b64708f9 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -234,6 +234,8 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
 	if (!chip->reg_base)
 		return -ENOMEM;
 
+	chip->reg_base += vsec_data.rg.off;
+
 	for (i = 0; i < chip->ll_wr_cnt; i++) {
 		struct dw_edma_region *ll_region = &chip->ll_region_wr[i];
 		struct dw_edma_region *dt_region = &chip->dt_region_wr[i];
-- 
2.25.1


             reply	other threads:[~2024-10-16  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16  8:17 ChunyouTang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-14 13:48 [PATCH] dma/dw-edma: chip regs base should add the offset ChunyouTang
2024-10-15  5:36 ` Manivannan Sadhasivam

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=20241016081725.4810-1-tangchunyou@163.com \
    --to=tangchunyou@163.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=vkoul@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