Merge branch 'linux-2.6'
[sfrench/cifs-2.6.git] / arch / ppc / syslib / mpc52xx_pci.c
index 2c5e6ddaf2c5063bb346a06393632868c3b80311..20a0eac0dc3a3fbd8ca4a6f3bbd59e6a64295dc3 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/mpc52xx_pci.c
- *
  * PCI code for the Freescale MPC52xx embedded CPU.
  *
  *
@@ -13,7 +11,6 @@
  * kind, whether express or implied.
  */
 
-#include <linux/config.h>
 
 #include <asm/pci.h>
 
@@ -154,9 +151,12 @@ static struct pci_ops mpc52xx_pci_ops = {
 static void __init
 mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
 {
+       u32 tmp;
 
        /* Setup control regs */
-               /* Nothing to do afaik */
+       tmp = in_be32(&pci_regs->scr);
+       tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+       out_be32(&pci_regs->scr, tmp);
 
        /* Setup windows */
        out_be32(&pci_regs->iw0btar, MPC52xx_PCI_IWBTAR_TRANSLATION(
@@ -197,13 +197,12 @@ mpc52xx_pci_setup(struct mpc52xx_pci __iomem *pci_regs)
        /* Not necessary and can be a bad thing if for example the bootloader
           is displaying a splash screen or ... Just left here for
           documentation purpose if anyone need it */
-#if 0
-       u32 tmp;
        tmp = in_be32(&pci_regs->gscr);
+#if 0
        out_be32(&pci_regs->gscr, tmp | MPC52xx_PCI_GSCR_PR);
        udelay(50);
-       out_be32(&pci_regs->gscr, tmp);
 #endif
+       out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
 }
 
 static void
@@ -225,7 +224,8 @@ mpc52xx_pci_fixup_resources(struct pci_dev *dev)
        /* The PCI Host bridge of MPC52xx has a prefetch memory resource
           fixed to 1Gb. Doesn't fit in the resource system so we remove it */
        if ( (dev->vendor == PCI_VENDOR_ID_MOTOROLA) &&
-            (dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200) ) {
+            (   dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200
+             || dev->device == PCI_DEVICE_ID_MOTOROLA_MPC5200B) ) {
                struct resource *res = &dev->resource[1];
                res->start = res->end = res->flags = 0;
        }