]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc/cell: Fix iommu breakage caused by controller_ops change
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 14 Apr 2015 06:49:06 +0000 (16:49 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 14 Apr 2015 07:13:31 +0000 (17:13 +1000)
The recent patch to convert cell to use pci_controller_ops had a small
bug which broke machines using an iommu.

The set of phb->controller_ops was added after the check for name !=
"pci", meaning pcix/pcie PHBs weren't getting their ops set correctly.

Fixes: 9c1368fc50e7 ("powerpc/cell: Move controller ops from ppc_md to controller_ops")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/cell/setup.c

index d1be268b1e6e120f3cc47348d0f1ca6b4a24a075..36cff28d0293b528b6d5b8847132f43a48a87f89 100644 (file)
@@ -127,13 +127,13 @@ static int cell_setup_phb(struct pci_controller *phb)
        if (rc)
                return rc;
 
+       phb->controller_ops = cell_pci_controller_ops;
+
        np = phb->dn;
        model = of_get_property(np, "model", NULL);
        if (model == NULL || strcmp(np->name, "pci"))
                return 0;
 
-       phb->controller_ops = cell_pci_controller_ops;
-
        /* Setup workarounds for spider */
        if (strcmp(model, "Spider"))
                return 0;