*/
 static void __init mpc83xx_km_setup_arch(void)
 {
+#ifdef CONFIG_QUICC_ENGINE
        struct device_node *np;
+#endif
 
        if (ppc_md.progress)
                ppc_md.progress("kmpbec83xx_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/of_platform.h>
+#include <linux/pci.h>
 
 #include <asm/io.h>
 #include <asm/hw_irq.h>
 #include <asm/ipic.h>
 #include <asm/qe_ic.h>
 #include <sysdev/fsl_soc.h>
+#include <sysdev/fsl_pci.h>
 
 #include "mpc83xx.h"
 
        of_platform_bus_probe(NULL, of_bus_ids, NULL);
        return 0;
 }
+
+#ifdef CONFIG_PCI
+void __init mpc83xx_setup_pci(void)
+{
+       struct device_node *np;
+
+       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
+               mpc83xx_add_bridge(np);
+       for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
+               mpc83xx_add_bridge(np);
+}
+#endif
 
  */
 static void __init mpc831x_rdb_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc831x_rdb_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-       for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
        mpc831x_usb_cfg();
 }
 
 
                of_node_put(np);
        }
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
  */
 static void __init mpc832x_rdb_setup_arch(void)
 {
-#if defined(CONFIG_PCI) || defined(CONFIG_QUICC_ENGINE)
+#if defined(CONFIG_QUICC_ENGINE)
        struct device_node *np;
 #endif
 
        if (ppc_md.progress)
                ppc_md.progress("mpc832x_rdb_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
  */
 static void __init mpc834x_itx_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc834x_itx_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
        mpc834x_usb_cfg();
 }
 
  */
 static void __init mpc834x_mds_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc834x_mds_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
        mpc834xemds_usb_cfg();
 }
 
                of_node_put(np);
        }
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 
 
 static void __init mpc836x_rdk_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc836x_rdk_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
 #ifdef CONFIG_QUICC_ENGINE
        qe_reset();
 #endif
 
  */
 static void __init mpc837x_mds_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc837x_mds_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-       for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
        mpc837xmds_usb_cfg();
 }
 
 
  */
 static void __init mpc837x_rdb_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("mpc837x_rdb_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-       for_each_compatible_node(np, "pci", "fsl,mpc8314-pcie")
-               mpc83xx_add_bridge(np);
-#endif
+       mpc83xx_setup_pci();
        mpc837x_usb_cfg();
        mpc837x_rdb_sd_cfg();
 }
 
 #define mpc83xx_ipic_and_qe_init_IRQ mpc83xx_ipic_init_IRQ
 #endif /* CONFIG_QUICC_ENGINE */
 
+#ifdef CONFIG_PCI
+extern void mpc83xx_setup_pci(void);
+#else
+#define mpc83xx_setup_pci()    do {} while (0)
+#endif
+
 extern int mpc83xx_declare_of_platform_devices(void);
 
 #endif                         /* __MPC83XX_H__ */
 
  */
 static void __init sbc834x_setup_arch(void)
 {
-#ifdef CONFIG_PCI
-       struct device_node *np;
-#endif
-
        if (ppc_md.progress)
                ppc_md.progress("sbc834x_setup_arch()", 0);
 
-#ifdef CONFIG_PCI
-       for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
-               mpc83xx_add_bridge(np);
-#endif
-
+       mpc83xx_setup_pci();
 }
 
 machine_device_initcall(sbc834x, mpc83xx_declare_of_platform_devices);