Skip to contentSkip to conversation

pci: tegra: fix afi_pex2_ctrl reg offset for tegra30

PATCH Superseded Marcel Ziswiler 3 participants 5 messages Dec 30, 2019 – Jan 7, 2020

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: tegra: fix afi_pex2_ctrl reg offset for tegra30

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.

---

 drivers/pci/controller/pci-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/pci-tegra.c +1 -1
index 090b632965e2..ac93f5a0398e 100644
@@ -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,
Signature · 1 line
2.24.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Marcel Ziswiler

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.

Quoted 6 lines

---

 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:

Quoted 24 lines
drivers/pci/controller/pci-tegra.c +1 -1
index 090b632965e2..ac93f5a0398e 100644
@@ -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,
Signature · 1 line
2.24.1
#2 lore raw
Quoted 26 lines · Thierry Reding
Quoted 6 lines · Marcel Ziswiler

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.

Quoted 6 lines

---

 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.

Quoted 3 lines

With the above fixed, this looks good, so:

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

Quoted 25 lines
Quoted 25 lines
drivers/pci/controller/pci-tegra.c +1 -1
index 090b632965e2..ac93f5a0398e 100644
@@ -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,
Signature · 1 line
2.24.1
#3 lore raw

Hi Andrew

Quoted 35 lines · Andrew Murray
Quoted 34 lines · Thierry Reding
Quoted 8 lines · Marcel Ziswiler

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.

Quoted 6 lines

---

 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.

Quoted 8 lines
Quoted 3 lines

With the above fixed, this looks good, so:

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.

Quoted 3 lines

Thanks,

Andrew Murray

Thanks, Andrew.

Cheers

Marcel

Quoted 25 lines
Quoted 25 lines
Quoted 25 lines
drivers/pci/controller/pci-tegra.c +0 -1
index 090b632965e2..ac93f5a0398e 100644
@@ -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,
drivers/pci/controller/pci-tegra.c +1 -0
 	.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,

Signature · 1 line
2.24.1
#4 lore raw
In reply to Thierry Reding

Hi Thierry

Quoted 15 lines · Thierry Reding
Quoted 7 lines · Marcel Ziswiler

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.

Quoted 6 lines

---

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

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!

Quoted 6 lines

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!

Quoted 3 lines

With the above fixed, this looks good, so:

Thanks, Thierry.

Cheers

Marcel

Quoted 25 lines
Quoted 25 lines
drivers/pci/controller/pci-tegra.c +0 -1
index 090b632965e2..ac93f5a0398e 100644
@@ -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,
drivers/pci/controller/pci-tegra.c +1 -0
 	.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,

Signature · 1 line
2.24.1