diff mbox series

[PATCHv2,3/4] PCI: layerscape: initialize the number of viewport

Message ID 20181107100854.28389-4-Zhiqiang.Hou@nxp.com
State Superseded
Delegated to: Lorenzo Pieralisi
Headers show
Series PCI: dwc: add prefetchable memory range support | expand

Commit Message

Z.Q. Hou Nov. 7, 2018, 10:09 a.m. UTC
From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

FSL implements 6 viewports on Layerscape series SoCs PCIe
controllers.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
---
V2:
 - Reworded the subject and commit description.

 drivers/pci/controller/dwc/pci-layerscape.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Lorenzo Pieralisi Nov. 22, 2018, 11:16 a.m. UTC | #1
On Wed, Nov 07, 2018 at 10:09:16AM +0000, Z.q. Hou wrote:
> From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> 
> FSL implements 6 viewports on Layerscape series SoCs PCIe
> controllers.
> 
> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> ---
> V2:
>  - Reworded the subject and commit description.
> 
>  drivers/pci/controller/dwc/pci-layerscape.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> index 3724d3ef7008..69f3f1a5a782 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> @@ -280,6 +280,9 @@ static int __init ls_add_pcie_port(struct ls_pcie *pcie)
>  
>  	pp->ops = pcie->drvdata->ops;
>  
> +	/* FSL implements 6 windows */
> +	pci->num_viewport = 6;

There is a DT property to configure this value, I am not sure it was the
right thing to do to add it but since it is there use it.

I will not consider this patch for merging.

Lorenzo

>  	ret = dw_pcie_host_init(pp);
>  	if (ret) {
>  		dev_err(dev, "failed to initialize host\n");
> -- 
> 2.17.1
>
Z.Q. Hou Nov. 23, 2018, 6:01 a.m. UTC | #2
Hi Lorenzo,

Thanks a lot for your comments!

> -----Original Message-----
> From: Lorenzo Pieralisi [mailto:lorenzo.pieralisi@arm.com]
> Sent: 2018年11月22日 19:17
> To: Z.q. Hou <zhiqiang.hou@nxp.com>
> Cc: linux-pci@vger.kernel.org; linux-kernel@vger.kernel.org;
> bhelgaas@google.com; jingoohan1@gmail.com;
> gustavo.pimentel@synopsys.com; Roy Zang <roy.zang@nxp.com>; Mingkai Hu
> <mingkai.hu@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>
> Subject: Re: [PATCHv2 3/4] PCI: layerscape: initialize the number of viewport
> 
> On Wed, Nov 07, 2018 at 10:09:16AM +0000, Z.q. Hou wrote:
> > From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> >
> > FSL implements 6 viewports on Layerscape series SoCs PCIe controllers.
> >
> > Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
> > ---
> > V2:
> >  - Reworded the subject and commit description.
> >
> >  drivers/pci/controller/dwc/pci-layerscape.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-layerscape.c
> > b/drivers/pci/controller/dwc/pci-layerscape.c
> > index 3724d3ef7008..69f3f1a5a782 100644
> > --- a/drivers/pci/controller/dwc/pci-layerscape.c
> > +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> > @@ -280,6 +280,9 @@ static int __init ls_add_pcie_port(struct ls_pcie
> > *pcie)
> >
> >  	pp->ops = pcie->drvdata->ops;
> >
> > +	/* FSL implements 6 windows */
> > +	pci->num_viewport = 6;
> 
> There is a DT property to configure this value, I am not sure it was the right
> thing to do to add it but since it is there use it.
> 
> I will not consider this patch for merging.

I will submit a separate patch to add the num_viewport to Layerscape PCIe's DT nodes, and please also merge this patch, so the new kernel can compatible with old DTB.

> 
> Lorenzo
> 
> >  	ret = dw_pcie_host_init(pp);
> >  	if (ret) {
> >  		dev_err(dev, "failed to initialize host\n");
> > --
> > 2.17.1
> >

Thanks,
Zhiqiang
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
index 3724d3ef7008..69f3f1a5a782 100644
--- a/drivers/pci/controller/dwc/pci-layerscape.c
+++ b/drivers/pci/controller/dwc/pci-layerscape.c
@@ -280,6 +280,9 @@  static int __init ls_add_pcie_port(struct ls_pcie *pcie)
 
 	pp->ops = pcie->drvdata->ops;
 
+	/* FSL implements 6 windows */
+	pci->num_viewport = 6;
+
 	ret = dw_pcie_host_init(pp);
 	if (ret) {
 		dev_err(dev, "failed to initialize host\n");