All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
@ 2019-12-30  0:52 Marcel Ziswiler
  2020-01-02 12:38   ` Thierry Reding
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Ziswiler @ 2019-12-30  0:52 UTC (permalink / raw)
  To: linux-tegra, linux-kernel
  Cc: Manikanta Maddireddy, Thierry Reding, Marcel Ziswiler,
	Andrew Murray, Bjorn Helgaas, Jonathan Hunter, Lorenzo Pieralisi,
	Thierry Reding, linux-pci

Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the tegra20
SoC struct where it erroneously got added by commit adb2653b3d2e
("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct").
This fixes the AFI_PEX2_CTRL reg offset being uninitialised
subsequently failing to bring up the third PCIe port.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>

---

 drivers/pci/controller/pci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
index 090b632965e2..ac93f5a0398e 100644
--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc tegra20_pcie = {
 	.num_ports = 2,
 	.ports = tegra20_pcie_ports,
 	.msi_base_shift = 0,
-	.afi_pex2_ctrl = 0x128,
 	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
 	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
 	.pads_refclk_cfg0 = 0xfa5cfa5c,
@@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc tegra30_pcie = {
 	.num_ports = 3,
 	.ports = tegra30_pcie_ports,
 	.msi_base_shift = 8,
+	.afi_pex2_ctrl = 0x128,
 	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
 	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
 	.pads_refclk_cfg0 = 0xfa5cfa5c,
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
  2019-12-30  0:52 [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30 Marcel Ziswiler
@ 2020-01-02 12:38   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2020-01-02 12:38 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: linux-tegra, linux-kernel, Manikanta Maddireddy, Andrew Murray,
	Bjorn Helgaas, Jonathan Hunter, Lorenzo Pieralisi,
	Thierry Reding, linux-pci

[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]

On Mon, Dec 30, 2019 at 01:52:09AM +0100, Marcel Ziswiler wrote:
> Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the tegra20
> SoC struct where it erroneously got added by commit adb2653b3d2e
> ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct").
> This fixes the AFI_PEX2_CTRL reg offset being uninitialised
> subsequently failing to bring up the third PCIe port.
> 
> Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
> 
> ---
> 
>  drivers/pci/controller/pci-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi Marcel,

the recipient list looks somewhat odd. Mailing lists typically go into
the Cc: line and subsystem maintainers into the To: line. That way you
increase chances of people's filters catching important emails.

You may also want to fix up the subject line to use the more standard
"PCI: tegra: " prefix. Also, maybe capitalize "fix" -> "Fix" to match
standard formatting rules for commit messages. In the subject and the
commit message, also, please spell "tegra20" and "tegra30" as "Tegra20"
and "Tegra30", which can help when searching logs.

With the above fixed, this looks good, so:

Acked-by: Thierry Reding <treding@nvidia.com>

> 
> diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> index 090b632965e2..ac93f5a0398e 100644
> --- a/drivers/pci/controller/pci-tegra.c
> +++ b/drivers/pci/controller/pci-tegra.c
> @@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc tegra20_pcie = {
>  	.num_ports = 2,
>  	.ports = tegra20_pcie_ports,
>  	.msi_base_shift = 0,
> -	.afi_pex2_ctrl = 0x128,
>  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
>  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
>  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> @@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc tegra30_pcie = {
>  	.num_ports = 3,
>  	.ports = tegra30_pcie_ports,
>  	.msi_base_shift = 8,
> +	.afi_pex2_ctrl = 0x128,
>  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
>  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
>  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> -- 
> 2.24.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
@ 2020-01-02 12:38   ` Thierry Reding
  0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2020-01-02 12:38 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: linux-tegra, linux-kernel, Manikanta Maddireddy, Andrew Murray,
	Bjorn Helgaas, Jonathan Hunter, Lorenzo Pieralisi,
	Thierry Reding, linux-pci

[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]

On Mon, Dec 30, 2019 at 01:52:09AM +0100, Marcel Ziswiler wrote:
> Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the tegra20
> SoC struct where it erroneously got added by commit adb2653b3d2e
> ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct").
> This fixes the AFI_PEX2_CTRL reg offset being uninitialised
> subsequently failing to bring up the third PCIe port.
> 
> Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
> 
> ---
> 
>  drivers/pci/controller/pci-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hi Marcel,

the recipient list looks somewhat odd. Mailing lists typically go into
the Cc: line and subsystem maintainers into the To: line. That way you
increase chances of people's filters catching important emails.

You may also want to fix up the subject line to use the more standard
"PCI: tegra: " prefix. Also, maybe capitalize "fix" -> "Fix" to match
standard formatting rules for commit messages. In the subject and the
commit message, also, please spell "tegra20" and "tegra30" as "Tegra20"
and "Tegra30", which can help when searching logs.

With the above fixed, this looks good, so:

Acked-by: Thierry Reding <treding@nvidia.com>

> 
> diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> index 090b632965e2..ac93f5a0398e 100644
> --- a/drivers/pci/controller/pci-tegra.c
> +++ b/drivers/pci/controller/pci-tegra.c
> @@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc tegra20_pcie = {
>  	.num_ports = 2,
>  	.ports = tegra20_pcie_ports,
>  	.msi_base_shift = 0,
> -	.afi_pex2_ctrl = 0x128,
>  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
>  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
>  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> @@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc tegra30_pcie = {
>  	.num_ports = 3,
>  	.ports = tegra30_pcie_ports,
>  	.msi_base_shift = 8,
> +	.afi_pex2_ctrl = 0x128,
>  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
>  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
>  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> -- 
> 2.24.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
  2020-01-02 12:38   ` Thierry Reding
  (?)
@ 2020-01-03 15:01   ` Andrew Murray
  2020-01-07  8:13     ` Marcel Ziswiler
  -1 siblings, 1 reply; 6+ messages in thread
From: Andrew Murray @ 2020-01-03 15:01 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Marcel Ziswiler, linux-tegra, linux-kernel, Manikanta Maddireddy,
	Bjorn Helgaas, Jonathan Hunter, Lorenzo Pieralisi,
	Thierry Reding, linux-pci

On Thu, Jan 02, 2020 at 01:38:22PM +0100, Thierry Reding wrote:
> On Mon, Dec 30, 2019 at 01:52:09AM +0100, Marcel Ziswiler wrote:
> > Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the tegra20
> > SoC struct where it erroneously got added by commit adb2653b3d2e
> > ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct").
> > This fixes the AFI_PEX2_CTRL reg offset being uninitialised
> > subsequently failing to bring up the third PCIe port.
> > 
> > Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
> > 
> > ---
> > 
> >  drivers/pci/controller/pci-tegra.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi Marcel,
> 
> the recipient list looks somewhat odd. Mailing lists typically go into
> the Cc: line and subsystem maintainers into the To: line. That way you
> increase chances of people's filters catching important emails.
> 
> You may also want to fix up the subject line to use the more standard
> "PCI: tegra: " prefix. Also, maybe capitalize "fix" -> "Fix" to match
> standard formatting rules for commit messages. In the subject and the
> commit message, also, please spell "tegra20" and "tegra30" as "Tegra20"
> and "Tegra30", which can help when searching logs.
> 
> With the above fixed, this looks good, so:
> 
> Acked-by: Thierry Reding <treding@nvidia.com>

Also can you please add the following tag:

Fixes: adb2653b3d2e ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct")

Thanks,

Andrew Murray

> 
> > 
> > diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c
> > index 090b632965e2..ac93f5a0398e 100644
> > --- a/drivers/pci/controller/pci-tegra.c
> > +++ b/drivers/pci/controller/pci-tegra.c
> > @@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc tegra20_pcie = {
> >  	.num_ports = 2,
> >  	.ports = tegra20_pcie_ports,
> >  	.msi_base_shift = 0,
> > -	.afi_pex2_ctrl = 0x128,
> >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
> >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
> >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > @@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc tegra30_pcie = {
> >  	.num_ports = 3,
> >  	.ports = tegra30_pcie_ports,
> >  	.msi_base_shift = 8,
> > +	.afi_pex2_ctrl = 0x128,
> >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
> >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
> >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > -- 
> > 2.24.1
> > 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
  2020-01-02 12:38   ` Thierry Reding
  (?)
  (?)
@ 2020-01-07  8:11   ` Marcel Ziswiler
  -1 siblings, 0 replies; 6+ messages in thread
From: Marcel Ziswiler @ 2020-01-07  8:11 UTC (permalink / raw)
  To: Thierry Reding
  Cc: linux-tegra, linux-kernel, Manikanta Maddireddy, Andrew Murray,
	Bjorn Helgaas, Jonathan Hunter, Lorenzo Pieralisi,
	Thierry Reding, linux-pci

Hi Thierry

On Thu, 2020-01-02 at 13:38 +0100, Thierry Reding wrote:
> On Mon, Dec 30, 2019 at 01:52:09AM +0100, Marcel Ziswiler wrote:
> > Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the
> > tegra20
> > SoC struct where it erroneously got added by commit adb2653b3d2e
> > ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct").
> > This fixes the AFI_PEX2_CTRL reg offset being uninitialised
> > subsequently failing to bring up the third PCIe port.
> > 
> > Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
> > 
> > ---
> > 
> >  drivers/pci/controller/pci-tegra.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Hi Marcel,
> 
> the recipient list looks somewhat odd. Mailing lists typically go
> into
> the Cc: line and subsystem maintainers into the To: line. That way
> you
> increase chances of people's filters catching important emails.

I'm using U-Boot's patman with the same LKML configuration since years
and nobody ever complained. I adjusted this now, thanks!

> You may also want to fix up the subject line to use the more standard
> "PCI: tegra: " prefix. Also, maybe capitalize "fix" -> "Fix" to match
> standard formatting rules for commit messages. In the subject and the
> commit message, also, please spell "tegra20" and "tegra30" as
> "Tegra20"
> and "Tegra30", which can help when searching logs.

While this whole capitalisation is utterly stupid and I remember in the
old days we kinda agreed to just lower case (don't know when/why this
suddenly changed) but this anyway should not matter if doing proper
case insensitive searching (;-p). Anyway, I will also adhere to this in
a v2, thanks!

> With the above fixed, this looks good, so:
> 
> Acked-by: Thierry Reding <treding@nvidia.com>

Thanks, Thierry.

Cheers

Marcel

> > diff --git a/drivers/pci/controller/pci-tegra.c
> > b/drivers/pci/controller/pci-tegra.c
> > index 090b632965e2..ac93f5a0398e 100644
> > --- a/drivers/pci/controller/pci-tegra.c
> > +++ b/drivers/pci/controller/pci-tegra.c
> > @@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc
> > tegra20_pcie = {
> >  	.num_ports = 2,
> >  	.ports = tegra20_pcie_ports,
> >  	.msi_base_shift = 0,
> > -	.afi_pex2_ctrl = 0x128,
> >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
> >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
> >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > @@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc
> > tegra30_pcie = {
> >  	.num_ports = 3,
> >  	.ports = tegra30_pcie_ports,
> >  	.msi_base_shift = 8,
> > +	.afi_pex2_ctrl = 0x128,
> >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
> >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
> >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > -- 
> > 2.24.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30
  2020-01-03 15:01   ` Andrew Murray
@ 2020-01-07  8:13     ` Marcel Ziswiler
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Ziswiler @ 2020-01-07  8:13 UTC (permalink / raw)
  To: Andrew Murray, Thierry Reding
  Cc: linux-tegra, linux-kernel, Manikanta Maddireddy, Bjorn Helgaas,
	Jonathan Hunter, Lorenzo Pieralisi, Thierry Reding, linux-pci

Hi Andrew

On Fri, 2020-01-03 at 15:01 +0000, Andrew Murray wrote:
> On Thu, Jan 02, 2020 at 01:38:22PM +0100, Thierry Reding wrote:
> > On Mon, Dec 30, 2019 at 01:52:09AM +0100, Marcel Ziswiler wrote:
> > > Fix AFI_PEX2_CTRL reg offset for tegra30 by moving it from the
> > > tegra20
> > > SoC struct where it erroneously got added by commit adb2653b3d2e
> > > ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC
> > > struct").
> > > This fixes the AFI_PEX2_CTRL reg offset being uninitialised
> > > subsequently failing to bring up the third PCIe port.
> > > 
> > > Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
> > > 
> > > ---
> > > 
> > >  drivers/pci/controller/pci-tegra.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Hi Marcel,
> > 
> > the recipient list looks somewhat odd. Mailing lists typically go
> > into
> > the Cc: line and subsystem maintainers into the To: line. That way
> > you
> > increase chances of people's filters catching important emails.
> > 
> > You may also want to fix up the subject line to use the more
> > standard
> > "PCI: tegra: " prefix. Also, maybe capitalize "fix" -> "Fix" to
> > match
> > standard formatting rules for commit messages. In the subject and
> > the
> > commit message, also, please spell "tegra20" and "tegra30" as
> > "Tegra20"
> > and "Tegra30", which can help when searching logs.
> > 
> > With the above fixed, this looks good, so:
> > 
> > Acked-by: Thierry Reding <treding@nvidia.com>
> 
> Also can you please add the following tag:
> 
> Fixes: adb2653b3d2e ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as
> part of SoC struct")

Yeah, sorry. I kinda knew there was a standard way to do this but I was
so happy when I finally found this sucker (;-p). Will adhere to this in
a v2.

> Thanks,
> 
> Andrew Murray

Thanks, Andrew.

Cheers

Marcel

> > > diff --git a/drivers/pci/controller/pci-tegra.c
> > > b/drivers/pci/controller/pci-tegra.c
> > > index 090b632965e2..ac93f5a0398e 100644
> > > --- a/drivers/pci/controller/pci-tegra.c
> > > +++ b/drivers/pci/controller/pci-tegra.c
> > > @@ -2499,7 +2499,6 @@ static const struct tegra_pcie_soc
> > > tegra20_pcie = {
> > >  	.num_ports = 2,
> > >  	.ports = tegra20_pcie_ports,
> > >  	.msi_base_shift = 0,
> > > -	.afi_pex2_ctrl = 0x128,
> > >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA20,
> > >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_DIV10,
> > >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > > @@ -2528,6 +2527,7 @@ static const struct tegra_pcie_soc
> > > tegra30_pcie = {
> > >  	.num_ports = 3,
> > >  	.ports = tegra30_pcie_ports,
> > >  	.msi_base_shift = 8,
> > > +	.afi_pex2_ctrl = 0x128,
> > >  	.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
> > >  	.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
> > >  	.pads_refclk_cfg0 = 0xfa5cfa5c,
> > > -- 
> > > 2.24.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-07  8:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30  0:52 [PATCH v1] pci: tegra: fix afi_pex2_ctrl reg offset for tegra30 Marcel Ziswiler
2020-01-02 12:38 ` Thierry Reding
2020-01-02 12:38   ` Thierry Reding
2020-01-03 15:01   ` Andrew Murray
2020-01-07  8:13     ` Marcel Ziswiler
2020-01-07  8:11   ` Marcel Ziswiler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.