powerpc/powernv: Fix condition to remove M64
authorGavin Shan <gwshan@linux.vnet.ibm.com>
Wed, 12 Nov 2014 02:36:05 +0000 (13:36 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 14 Nov 2014 06:24:22 +0000 (17:24 +1100)
The M64 resource should be removed if we don't have hook to
initialize it, or (not and) fail to do that.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c

index 7ab1dd732993fa6a24af9af2da6ee9c1f4d2214e..7aa040441c0801d0bf072ac1556083bebc11ef25 100644 (file)
@@ -2000,8 +2000,8 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
                ioda_eeh_phb_reset(hose, OPAL_DEASSERT_RESET);
        }
 
-       /* Configure M64 window */
-       if (phb->init_m64 && phb->init_m64(phb))
+       /* Remove M64 resource if we can't configure it successfully */
+       if (!phb->init_m64 || phb->init_m64(phb))
                hose->mem_resources[1].flags = 0;
 }