From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: mhi@lists.linux.dev
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Loic Poulain <loic.poulain@linaro.org>
Subject: Re: [PATCH] bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR
Date: Sun, 6 Oct 2024 23:43:43 +0530 [thread overview]
Message-ID: <20241006181343.bng5gkwvmofefomv@thinkpad> (raw)
In-Reply-To: <20241004023351.6946-1-manivannan.sadhasivam@linaro.org>
On Fri, Oct 04, 2024 at 08:03:51AM +0530, Manivannan Sadhasivam wrote:
> Use of both pcim_iomap_regions() and pcim_iomap_table() APIs are
> deprecated. Hence, switch to pcim_iomap_region() API which handles both the
> request and map of the MHI BAR region.
>
> Cc: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Applied to mhi-next!
- Mani
> ---
>
> Compile tested only.
>
> drivers/bus/mhi/host/pci_generic.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
> index 9938bb034c1c..07645ce2119a 100644
> --- a/drivers/bus/mhi/host/pci_generic.c
> +++ b/drivers/bus/mhi/host/pci_generic.c
> @@ -917,12 +917,12 @@ static int mhi_pci_claim(struct mhi_controller *mhi_cntrl,
> return err;
> }
>
> - err = pcim_iomap_regions(pdev, 1 << bar_num, pci_name(pdev));
> - if (err) {
> + mhi_cntrl->regs = pcim_iomap_region(pdev, 1 << bar_num, pci_name(pdev));
> + if (IS_ERR(mhi_cntrl->regs)) {
> + err = PTR_ERR(mhi_cntrl->regs);
> dev_err(&pdev->dev, "failed to map pci region: %d\n", err);
> return err;
> }
> - mhi_cntrl->regs = pcim_iomap_table(pdev)[bar_num];
> mhi_cntrl->reg_len = pci_resource_len(pdev, bar_num);
>
> err = dma_set_mask_and_coherent(&pdev->dev, dma_mask);
> --
> 2.25.1
>
--
மணிவண்ணன் சதாசிவம்
prev parent reply other threads:[~2024-10-06 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 2:33 [PATCH] bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR Manivannan Sadhasivam
2024-10-04 17:50 ` Mayank Rana
2024-10-06 18:13 ` Manivannan Sadhasivam [this message]
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=20241006181343.bng5gkwvmofefomv@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=mhi@lists.linux.dev \
/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