Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Stanimir Varbanov via iommu <iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
To: Marc Gonzalez <marc.w.gonzalez-GANU6spQydw@public.gmane.org>,
	Bjorn Andersson
	<bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Jeffrey Hugo <jhugo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	MSM <linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Douglas Anderson
	<dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Evan Green <evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Manu Gautam <mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	iommu
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Srinivas Kandagatla
	<srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	PCI <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
Subject: Re: [PATCH v1 1/3] PCI: qcom: Setup PCIE20_PARF_BDF_TRANSLATE_N
Date: Tue, 2 Apr 2019 11:08:00 +0300	[thread overview]
Message-ID: <58b4db00-a0fa-5058-99ee-c11c8e2fa529@mm-sol.com> (raw)
In-Reply-To: <958ae127-3aa2-6824-c875-e3012644ed3d-GANU6spQydw@public.gmane.org>

Hi Marc,

Thank you for the work on that!

On 3/28/19 7:01 PM, Marc Gonzalez wrote:
> Initialize PCIE20_PARF_BDF_TRANSLATE_N for ops_2_3_2.
> 
> Signed-off-by: Marc Gonzalez <marc.w.gonzalez-GANU6spQydw@public.gmane.org>
> ---
>  drivers/pci/controller/dwc/pcie-qcom.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 0ed235d560e3..5e5522a427b8 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -54,6 +54,7 @@
>  #define PCIE20_PARF_LTSSM			0x1B0
>  #define PCIE20_PARF_SID_OFFSET			0x234
>  #define PCIE20_PARF_BDF_TRANSLATE_CFG		0x24C
> +#define PCIE20_PARF_BDF_TRANSLATE_N		0x250
>  
>  #define PCIE20_ELBI_SYS_CTRL			0x04
>  #define PCIE20_ELBI_SYS_CTRL_LT_ENABLE		BIT(0)
> @@ -602,6 +603,9 @@ static int qcom_pcie_init_2_3_2(struct qcom_pcie *pcie)
>  	val |= BIT(31);
>  	writel(val, pcie->parf + PCIE20_PARF_AXI_MSTR_WR_ADDR_HALT_V2);
>  
> +	val = PCI_DEVID(1, 0);
> +	writel(val, pcie->parf + PCIE20_PARF_BDF_TRANSLATE_N);

I wonder, shouldn't this register manipulation happen in common code
e.g. pcie-designware-host.c and of course the manipulation should be
conditional because not all platforms might have iommu.

Also, could we have more generic iommu-map description like the one for
sdm845 at [1] ?

-- 
regards,
Stan

  parent reply	other threads:[~2019-04-02  8:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 16:59 [PATCH v1 0/3] PCIe and AR8151 on APQ8098/MSM8998 Marc Gonzalez
     [not found] ` <5eedbe6d-f440-1a77-8a7e-81a920e3a0e7-GANU6spQydw@public.gmane.org>
2019-03-28 17:01   ` [PATCH v1 1/3] PCI: qcom: Setup PCIE20_PARF_BDF_TRANSLATE_N Marc Gonzalez
     [not found]     ` <958ae127-3aa2-6824-c875-e3012644ed3d-GANU6spQydw@public.gmane.org>
2019-04-02  8:08       ` Stanimir Varbanov via iommu [this message]
     [not found]         ` <58b4db00-a0fa-5058-99ee-c11c8e2fa529-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2019-04-02 10:44           ` Marc Gonzalez
2019-03-28 17:05   ` [PATCH v1 2/3] arm64: dts: qcom: msm8998: Add PCIe SMMU node Marc Gonzalez
     [not found]     ` <82ab78ee-4a38-4eee-f064-272b6f964f17-GANU6spQydw@public.gmane.org>
2019-03-29 10:51       ` Marc Gonzalez
     [not found]         ` <e7c8137a-2408-a71a-f722-199a86a75d13-GANU6spQydw@public.gmane.org>
2019-03-29 18:29           ` Robin Murphy
     [not found]             ` <5aa56120-b686-194b-36d6-8177b5749a19-5wv7dgnIgG8@public.gmane.org>
2019-03-29 19:42               ` Jeffrey Hugo
2019-03-30 14:18               ` Vivek Gautam
     [not found]                 ` <CAFp+6iHOwW5jJmdVWo-E7154xk2jpR4ZLRoXEJdPwu8_ZJg14Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-02 13:54                   ` Robin Murphy
     [not found]                     ` <e6d2200d-f6b9-3c27-f166-537742b32bfe-5wv7dgnIgG8@public.gmane.org>
2019-04-03  9:26                       ` Vivek Gautam
2019-03-28 17:06   ` [PATCH v1 3/3] arm64: dts: qcom: msm8998: Add PCIe PHY and RC nodes Marc Gonzalez
     [not found]     ` <186f7ca2-84e2-a37e-79e6-f1fec8e25374-GANU6spQydw@public.gmane.org>
2019-04-04 10:01       ` Marc Gonzalez
2019-04-10 15:32       ` Stanimir Varbanov via iommu
2019-04-10 15:32         ` Stanimir Varbanov
     [not found]         ` <3f32cfb9-6528-9f5e-85db-cee89fdcfc5d-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2019-04-11  8:44           ` Marc Gonzalez
2019-04-11  8:44             ` Marc Gonzalez
     [not found]             ` <8ee2ca1b-2a0d-0c98-f770-a47b5b529295-GANU6spQydw@public.gmane.org>
2019-04-11  9:09               ` Stanimir Varbanov via iommu
2019-04-11  9:09                 ` Stanimir Varbanov
     [not found]                 ` <8ada0472-0692-2f03-b52f-c1702bb0c33d-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2019-04-11  9:38                   ` Marc Gonzalez
2019-04-11  9:38                     ` Marc Gonzalez
2019-06-11 15:55 ` [PATCH v1 0/3] PCIe and AR8151 on APQ8098/MSM8998 Lorenzo Pieralisi
2019-06-11 16:30   ` Marc Gonzalez

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=58b4db00-a0fa-5058-99ee-c11c8e2fa529@mm-sol.com \
    --to=iommu-cuntk1mwbs9qetfly7kem3xjstq8ys+chz5vsktnxna@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=bjorn.andersson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=evgreen-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=jhugo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marc.w.gonzalez-GANU6spQydw@public.gmane.org \
    --cc=mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
    --cc=srinivas.kandagatla-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.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