aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/pci.c')
-rw-r--r--arch/powerpc/platforms/pseries/pci.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c
index 41d8a4d1d02e..7725825d887d 100644
--- a/arch/powerpc/platforms/pseries/pci.c
+++ b/arch/powerpc/platforms/pseries/pci.c
@@ -29,6 +29,7 @@
29#include <asm/pci-bridge.h> 29#include <asm/pci-bridge.h>
30#include <asm/prom.h> 30#include <asm/prom.h>
31#include <asm/ppc-pci.h> 31#include <asm/ppc-pci.h>
32#include <asm/pci.h>
32#include "pseries.h" 33#include "pseries.h"
33 34
34#if 0 35#if 0
@@ -237,6 +238,8 @@ static void __init pSeries_request_regions(void)
237 238
238void __init pSeries_final_fixup(void) 239void __init pSeries_final_fixup(void)
239{ 240{
241 struct pci_controller *hose;
242
240 pSeries_request_regions(); 243 pSeries_request_regions();
241 244
242 eeh_probe_devices(); 245 eeh_probe_devices();
@@ -246,6 +249,25 @@ void __init pSeries_final_fixup(void)
246 ppc_md.pcibios_sriov_enable = pseries_pcibios_sriov_enable; 249 ppc_md.pcibios_sriov_enable = pseries_pcibios_sriov_enable;
247 ppc_md.pcibios_sriov_disable = pseries_pcibios_sriov_disable; 250 ppc_md.pcibios_sriov_disable = pseries_pcibios_sriov_disable;
248#endif 251#endif
252 list_for_each_entry(hose, &hose_list, list_node) {
253 struct device_node *dn = hose->dn, *nvdn;
254
255 while (1) {
256 dn = of_find_all_nodes(dn);
257 if (!dn)
258 break;
259 nvdn = of_parse_phandle(dn, "ibm,nvlink", 0);
260 if (!nvdn)
261 continue;
262 if (!of_device_is_compatible(nvdn, "ibm,npu-link"))
263 continue;
264 if (!of_device_is_compatible(nvdn->parent,
265 "ibm,power9-npu"))
266 continue;
267 WARN_ON_ONCE(pnv_npu2_init(hose));
268 break;
269 }
270 }
249} 271}
250 272
251/* 273/*