diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/pci.c')
| -rw-r--r-- | arch/powerpc/platforms/pseries/pci.c | 18 | 
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 5f93856cdf4..c413ec158ff 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -113,7 +113,8 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)  {  	struct device_node *dn, *pdn;  	struct pci_bus *bus; -	const uint32_t *pcie_link_speed_stats; +	u32 pcie_link_speed_stats[2]; +	int rc;  	bus = bridge->bus; @@ -122,15 +123,16 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)  		return 0;  	for (pdn = dn; pdn != NULL; pdn = of_get_next_parent(pdn)) { -		pcie_link_speed_stats = (const uint32_t *) of_get_property(pdn, -			"ibm,pcie-link-speed-stats", NULL); -		if (pcie_link_speed_stats) +		rc = of_property_read_u32_array(pdn, +				"ibm,pcie-link-speed-stats", +				&pcie_link_speed_stats[0], 2); +		if (!rc)  			break;  	}  	of_node_put(pdn); -	if (!pcie_link_speed_stats) { +	if (rc) {  		pr_err("no ibm,pcie-link-speed-stats property\n");  		return 0;  	} @@ -142,6 +144,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)  	case 0x02:  		bus->max_bus_speed = PCIE_SPEED_5_0GT;  		break; +	case 0x04: +		bus->max_bus_speed = PCIE_SPEED_8_0GT; +		break;  	default:  		bus->max_bus_speed = PCI_SPEED_UNKNOWN;  		break; @@ -154,6 +159,9 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)  	case 0x02:  		bus->cur_bus_speed = PCIE_SPEED_5_0GT;  		break; +	case 0x04: +		bus->cur_bus_speed = PCIE_SPEED_8_0GT; +		break;  	default:  		bus->cur_bus_speed = PCI_SPEED_UNKNOWN;  		break;  | 
