diff mbox series

[v4,05/10] PCI: brcmstb: Use pcie_link_speed[] to decode link speed

Message ID 1581937984-40353-6-git-send-email-yangyicong@hisilicon.com
State New
Headers show
Series Improve link speed presentation process | expand

Commit Message

Yicong Yang Feb. 17, 2020, 11:12 a.m. UTC
pcie_link_speed[] is used to decode link speed from link
capability register. Use it in brcm_pcie_setup() to display
the link speed rather than using the offset.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
 drivers/pci/controller/pcie-brcmstb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index d20aabc..a390a29 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -824,7 +824,7 @@  static int brcm_pcie_setup(struct brcm_pcie *pcie)
 	cls = FIELD_GET(PCI_EXP_LNKSTA_CLS, lnksta);
 	nlw = FIELD_GET(PCI_EXP_LNKSTA_NLW, lnksta);
 	dev_info(dev, "link up, %s x%u %s\n",
-		 PCIE_SPEED2STR(cls + PCI_SPEED_133MHz_PCIX_533),
+		 PCIE_SPEED2STR(pcie_link_speed[cls]),
 		 nlw, ssc_good ? "(SSC)" : "(!SSC)");
 	/* PCIe->SCB endian mode for BAR */