mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Marc Gonzalez <marc.w.gonzalez@free.fr>,
	Stanimir Varbanov <svarbanov@mm-sol.com>,
	Bjorn Helgaas <bhelgaas@google.com>
Cc: Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	PCI <linux-pci@vger.kernel.org>,
	MSM <linux-arm-msm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>
Subject: Re: [PATCH v2] PCI: qcom: Use default config space read function
Date: Wed, 13 Mar 2019 18:29:40 +0000	[thread overview]
Message-ID: <3c76613e-e60d-94b8-dd6f-b8f4e1928263@linaro.org> (raw)
In-Reply-To: <7d3d788a-d6a3-a70b-adab-6c65771cacc4@free.fr>

Hi Marc,

On 13/03/2019 11:45, Marc Gonzalez wrote:
> We don't need to fudge the device class in qcom_pcie_rd_own_conf()
> because dw_pcie_setup_rc() already does the right thing:
> 
> 	/* Program correct class for RC */
> 	dw_pcie_wr_own_conf(pp, PCI_CLASS_DEVICE, 2, PCI_CLASS_BRIDGE_PCI);
> 
> Signed-off-by: Marc Gonzalez <marc.w.gonzalez@free.fr>
> ---
> Changes from v1 to v2: Completely drop qcom_pcie_rd_own_conf
> Srinivas, could you test this patch on apq/ipq8064?
> ---
>   drivers/pci/controller/dwc/pcie-qcom.c | 17 -----------------
>   1 file changed, 17 deletions(-)
> 
I tried this patch on IFC6410 board which has APQ8064, and the pci does 
not work anymore after applying this patch.

non-working output of 'lspci -vvv' 
https://paste.ubuntu.com/p/ndmdsW4zkJ/ and bootlog 
ahttps://paste.ubuntu.com/p/CqVzGymnq8/

working without patch : https://paste.ubuntu.com/p/TJm4hgjGW4/

I have not debugged it any further other than just testing the patch.
Let me know if you need any more dumps for more debug.

Thanks,
srini

> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 3de5510fd3d5..d0c5c7616b3e 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1131,25 +1131,8 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
>   	return ret;
>   }
>   
> -static int qcom_pcie_rd_own_conf(struct pcie_port *pp, int where, int size,
> -				 u32 *val)
> -{
> -	struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> -
> -	/* the device class is not reported correctly from the register */
> -	if (where == PCI_CLASS_REVISION && size == 4) {
> -		*val = readl(pci->dbi_base + PCI_CLASS_REVISION);
> -		*val &= 0xff;	/* keep revision id */
> -		*val |= PCI_CLASS_BRIDGE_PCI << 16;
> -		return PCIBIOS_SUCCESSFUL;
> -	}
> -
> -	return dw_pcie_read(pci->dbi_base + where, size, val);
> -}
> -
>   static const struct dw_pcie_host_ops qcom_pcie_dw_ops = {
>   	.host_init = qcom_pcie_host_init,
> -	.rd_own_conf = qcom_pcie_rd_own_conf,
>   };
>   
>   /* Qcom IP rev.: 2.1.0	Synopsys IP rev.: 4.01a */
> 

  parent reply	other threads:[~2019-03-13 18:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:56 [RFC PATCH v1] PCI: qcom: Use quirk to override incorrect device class Marc Gonzalez
2019-03-12 12:42 ` Stanimir Varbanov
2019-03-12 17:18   ` Marc Gonzalez
2019-03-12 17:34     ` Marc Gonzalez
2019-03-13 11:45       ` [PATCH v2] PCI: qcom: Use default config space read function Marc Gonzalez
2019-03-13 13:13         ` Marc Gonzalez
2019-03-13 18:29         ` Srinivas Kandagatla [this message]
2019-03-13 20:39           ` Marc Gonzalez
2019-03-13 21:52             ` Srinivas Kandagatla
2019-03-13 22:26               ` Marc Gonzalez
2019-03-14 11:10                 ` Srinivas Kandagatla
2019-03-14 13:18                   ` Marc Gonzalez
2019-03-18 14:28                     ` [PATCH v3] " Marc Gonzalez
2019-03-18 14:39                       ` Srinivas Kandagatla
2019-03-18 16:35                       ` Stanimir Varbanov
2019-03-18 17:14                         ` [PATCH v4] " Marc Gonzalez
2019-03-25 12:11                           ` Marc Gonzalez
2019-03-25 13:32                             ` Stanimir Varbanov
2019-03-25 15:42                               ` [PATCH v5] " Marc Gonzalez
2019-03-29 13:48                                 ` Marc Gonzalez
2019-03-29 15:55                                 ` Stanimir Varbanov
2019-03-29 16:38                                 ` Lorenzo Pieralisi
2019-04-30 14:06       ` [RFC PATCH v1] PCI: qcom: Use quirk to override incorrect device class Lorenzo Pieralisi
2019-05-02  9:42         ` 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=3c76613e-e60d-94b8-dd6f-b8f4e1928263@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=svarbanov@mm-sol.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

all inboxes | Powered by JetHome®