]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc/5121: Add PCI support.
authorJohn Rigby <jrigby@freescale.com>
Tue, 7 Oct 2008 21:13:18 +0000 (15:13 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 13 Oct 2008 16:09:58 +0000 (11:09 -0500)
Uses mpc83xx_add_bridge in fsl_pci.c

Adds second register tuple to pci node register property
as done for 83xx device trees in a previous patch.

Signed-off-by: John Rigby <jrigby@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/boot/dts/mpc5121ads.dts
arch/powerpc/platforms/512x/Kconfig
arch/powerpc/platforms/512x/mpc5121_ads.c
arch/powerpc/sysdev/fsl_pci.c

index 1f9036c317b4ab235e9264705ee38fdd1e2c5d14..c2b8dbfab79e6dc1e4fa5f4b365a06d6f103776f 100644 (file)
                #interrupt-cells = <1>;
                #size-cells = <2>;
                #address-cells = <3>;
-               reg = <0x80008500 0x100>;
+               reg = <0x80008500 0x100         /* internal registers */
+                      0x80008300 0x8>;         /* config space access registers */
                compatible = "fsl,mpc5121-pci";
                device_type = "pci";
        };
index c62f893ede190f984c6d235304b196651fb3b3c6..326852c78b8fa79caf1349f0e1776b955285a26c 100644 (file)
@@ -3,6 +3,8 @@ config PPC_MPC512x
        select FSL_SOC
        select IPIC
        select PPC_CLOCK
+       select PPC_PCI_CHOICE
+       select FSL_PCI if PCI
 
 config PPC_MPC5121
        bool
index 5ebf6939a6975ba593b1d4b1372a5ebd19c68a11..441abc488851c9f95bf6b674b7198041bf2cd79f 100644 (file)
 #include <asm/prom.h>
 #include <asm/time.h>
 
+#include <sysdev/fsl_pci.h>
+
 #include "mpc512x.h"
 #include "mpc5121_ads.h"
 
 static void __init mpc5121_ads_setup_arch(void)
 {
+#ifdef CONFIG_PCI
+       struct device_node *np;
+#endif
        printk(KERN_INFO "MPC5121 ADS board from Freescale Semiconductor\n");
        /*
         * cpld regs are needed early
         */
        mpc5121_ads_cpld_map();
+
+#ifdef CONFIG_PCI
+       for_each_compatible_node(np, "pci", "fsl,mpc5121-pci")
+               mpc83xx_add_bridge(np);
+#endif
 }
 
 static void __init mpc5121_ads_init_IRQ(void)
index a3f4abadbadef7749fbab7f3003bdbba329a7a88..5b264eb4b1f7f6af12115640ed8c17d139cb9e3b 100644 (file)
@@ -251,7 +251,7 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header);
 DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header);
 #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */
 
-#if defined(CONFIG_PPC_83xx)
+#if defined(CONFIG_PPC_83xx) || defined(CONFIG_PPC_MPC512x)
 int __init mpc83xx_add_bridge(struct device_node *dev)
 {
        int len;
@@ -310,7 +310,7 @@ int __init mpc83xx_add_bridge(struct device_node *dev)
 
        setup_indirect_pci(hose, rsrc_cfg.start, rsrc_cfg.start + 4, 0);
 
-       printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
+       printk(KERN_INFO "Found FSL PCI host bridge at 0x%016llx. "
               "Firmware bus number: %d->%d\n",
               (unsigned long long)rsrc_reg.start, hose->first_busno,
               hose->last_busno);