Commit 49d9684a authored by Kleber Sacilotto de Souza's avatar Kleber Sacilotto de Souza Committed by Benjamin Herrenschmidt

powerpc/pseries: Add Gen3 definitions for PCIE link speed

Rev3 of the PCI Express Base Specification defines a Supported Link
Speeds Vector where the bit definitions within this field are:

Bit 0 - 2.5 GT/s
Bit 1 - 5.0 GT/s
Bit 2 - 8.0 GT/s

This vector definition is used by the platform firmware to export the
maximum and current link speeds of the PCI bus via the
"ibm,pcie-link-speed-stats" device-tree property.

This patch updates pseries_root_bridge_prepare() to detect Gen3
speed buses (defined by 0x04).
Signed-off-by: default avatarKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent b020cc6c
...@@ -144,6 +144,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) ...@@ -144,6 +144,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)
case 0x02: case 0x02:
bus->max_bus_speed = PCIE_SPEED_5_0GT; bus->max_bus_speed = PCIE_SPEED_5_0GT;
break; break;
case 0x04:
bus->max_bus_speed = PCIE_SPEED_8_0GT;
break;
default: default:
bus->max_bus_speed = PCI_SPEED_UNKNOWN; bus->max_bus_speed = PCI_SPEED_UNKNOWN;
break; break;
...@@ -156,6 +159,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) ...@@ -156,6 +159,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)
case 0x02: case 0x02:
bus->cur_bus_speed = PCIE_SPEED_5_0GT; bus->cur_bus_speed = PCIE_SPEED_5_0GT;
break; break;
case 0x04:
bus->cur_bus_speed = PCIE_SPEED_8_0GT;
break;
default: default:
bus->cur_bus_speed = PCI_SPEED_UNKNOWN; bus->cur_bus_speed = PCI_SPEED_UNKNOWN;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment