Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
[pandora-kernel.git] / arch / powerpc / platforms / 52xx / mpc52xx_pci.c
index 4b79398..5a382bb 100644 (file)
@@ -63,6 +63,7 @@
 
 #define MPC52xx_PCI_TCR_P              0x01000000
 #define MPC52xx_PCI_TCR_LD             0x00010000
+#define MPC52xx_PCI_TCR_WCT8           0x00000008
 
 #define MPC52xx_PCI_TBATR_DISABLE      0x0
 #define MPC52xx_PCI_TBATR_ENABLE       0x1
@@ -99,6 +100,12 @@ struct mpc52xx_pci {
        u8      reserved6[4];   /* PCI + 0xFC */
 };
 
+/* MPC5200 device tree match tables */
+const struct of_device_id mpc52xx_pci_ids[] __initdata = {
+       { .type = "pci", .compatible = "fsl,mpc5200-pci", },
+       { .type = "pci", .compatible = "mpc5200-pci", },
+       {}
+};
 
 /* ======================================================================== */
 /* PCI configuration acess                                                  */
@@ -307,7 +314,7 @@ mpc52xx_pci_setup(struct pci_controller *hose,
        out_be32(&pci_regs->tbatr1,
                MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM );
 
-       out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD);
+       out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8);
 
        tmp = in_be32(&pci_regs->gscr);
 #if 0
@@ -411,9 +418,7 @@ void __init mpc52xx_setup_pci(void)
 {
        struct device_node *pci;
 
-       pci = of_find_compatible_node(NULL, NULL, "fsl,mpc5200-pci");
-       if (!pci)
-               pci = of_find_compatible_node(NULL, NULL, "mpc5200-pci");
+       pci = of_find_matching_node(NULL, mpc52xx_pci_ids);
        if (!pci)
                return;