]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[POWERPC] rename add_bridge to avoid namespace clashes
authorArnd Bergmann <arnd@arndb.de>
Sun, 17 Jun 2007 23:06:54 +0000 (01:06 +0200)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 29 Jun 2007 06:56:23 +0000 (01:56 -0500)
Many platforms currently define their own add_bridge function, some
of them globally. This breaks some multiplatform configurations.
Prefixing each of these functions with the platform name avoids
this problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
21 files changed:
arch/powerpc/platforms/82xx/mpc82xx_ads.c
arch/powerpc/platforms/83xx/mpc8313_rdb.c
arch/powerpc/platforms/83xx/mpc832x_mds.c
arch/powerpc/platforms/83xx/mpc832x_rdb.c
arch/powerpc/platforms/83xx/mpc834x_itx.c
arch/powerpc/platforms/83xx/mpc834x_mds.c
arch/powerpc/platforms/83xx/mpc836x_mds.c
arch/powerpc/platforms/83xx/mpc83xx.h
arch/powerpc/platforms/83xx/pci.c
arch/powerpc/platforms/85xx/mpc85xx.h
arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/pci.c
arch/powerpc/platforms/86xx/mpc86xx.h
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
arch/powerpc/platforms/86xx/pci.c
arch/powerpc/platforms/embedded6xx/linkstation.c
arch/powerpc/platforms/maple/pci.c
arch/powerpc/platforms/pasemi/pci.c
arch/powerpc/platforms/powermac/pci.c

index 47cb09f08052837cb2c7f5621dfcca30c4a79f0b..dc16bb4422ac5738b5fe5b69656a88ad61a6b702 100644 (file)
@@ -515,7 +515,7 @@ static int m82xx_pci_exclude_device(u_char bus, u_char devfn)
                return PCIBIOS_SUCCESSFUL;
 }
 
-void __init add_bridge(struct device_node *np)
+static void __init mpc82xx_add_bridge(struct device_node *np)
 {
        int len;
        struct pci_controller *hose;
@@ -584,7 +584,7 @@ static void __init mpc82xx_ads_setup_arch(void)
 #ifdef CONFIG_PCI
        ppc_md.pci_exclude_device = m82xx_pci_exclude_device;
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc82xx_add_bridge(np);
 
        of_node_put(np);
 #endif
index 96970ac887ee267dc2826f607298df6cf930e36c..ecf34fac837252bb43bc642a848dbe1f79132dac 100644 (file)
@@ -49,7 +49,7 @@ static void __init mpc8313_rdb_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 94843ed52a9334b476724e4243cd56520e45b1db..55e8079510e37e679711564c1bff5405bf2824da 100644 (file)
@@ -80,7 +80,7 @@ static void __init mpc832x_sys_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
index 3db68b73fc3297a8eab6c1bff2d73cf0de3532cf..8b790d4d07411d8bc629e6910348f970f8a5f8a3 100644 (file)
@@ -53,7 +53,7 @@ static void __init mpc832x_rdb_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 40a01947d6840428733df06f316d8f0be3152904..120c5d25c709d5c63011de663694ee2a2bfd1023 100644 (file)
@@ -59,7 +59,7 @@ static void __init mpc834x_itx_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index 10394b2d7e7a0bd44cb4cc9871d7ddc30f876897..d64d5a5ae00cfa0b7aa9ca83a18f446dbdb7369a 100644 (file)
@@ -129,7 +129,7 @@ static void __init mpc834x_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
index bceeff8bbfd21045fb9c873a468720f6f6d90552..bf3be3741129e46661738c9e737a4ec87e411e9f 100644 (file)
@@ -86,7 +86,7 @@ static void __init mpc836x_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc83xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc83xx_exclude_device;
 #endif
 
index 9cd03b59c8f4796a177e8df9801a03cd09d02c5e..9bd85f5e9a56e2d96bd728c1d011c7ae26aac5b3 100644 (file)
@@ -27,7 +27,7 @@
  * mpc83xx_* files. Mostly for use by mpc83xx_setup
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc83xx_add_bridge(struct device_node *dev);
 extern int mpc83xx_exclude_device(u_char bus, u_char devfn);
 extern void mpc83xx_restart(char *cmd);
 extern long mpc83xx_time_init(void);
index 774457d09e947af0c43ef8cd9d4f99b780e1bd8d..1752d4577aafdbd552efd55114344c9be9fa3625 100644 (file)
@@ -45,7 +45,7 @@ int mpc83xx_exclude_device(u_char bus, u_char devfn)
        return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc83xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index 83415db33378e71e22bd2f514be1071c53fee2c5..7286ffac2c1dbaeaf77c4b21568fa0523e99b2e5 100644 (file)
@@ -15,4 +15,4 @@
  */
 
 extern void mpc85xx_restart(char *);
-extern int add_bridge(struct device_node *dev);
+extern int mpc85xx_add_bridge(struct device_node *dev);
index 5d27621f09272af77d520afbdb7c1f29a0ebc303..a4995de6e737fd0c601a277b1681c00dc87afca6 100644 (file)
@@ -241,7 +241,7 @@ static void __init mpc85xx_ads_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
        ppc_md.pci_exclude_device = mpc85xx_exclude_device;
 #endif
 }
index 1490eb3ce0d3d447b6d2731645db5f1c78203a7b..40592540ec771c271cef3b165309a88eb8a2c192 100644 (file)
@@ -257,7 +257,7 @@ static void __init mpc85xx_cds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
 
        ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
        ppc_md.pci_exclude_device = mpc85xx_exclude_device;
index e3dddbfe66ff711f8a14860d62252c5ebb004080..7310818bcc233126e0146d3f811634782736c810 100644 (file)
@@ -100,7 +100,7 @@ static void __init mpc85xx_mds_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) {
-               add_bridge(np);
+               mpc85xx_add_bridge(np);
        }
        of_node_put(np);
 #endif
index 48f17e23d771ff0492f8dc9cc46efc753f420555..3c38ae4b76c737a87d131214806cd76c5007bb87 100644 (file)
@@ -36,7 +36,7 @@
 int mpc85xx_pci2_busno = 0;
 
 #ifdef CONFIG_PCI
-int __init add_bridge(struct device_node *dev)
+int __init mpc85xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index 2834462590b809ae80de941d77a46aa925bc24e1..dc2f6fdc8de4a0135a9bb5b3ceac8827e010c8a2 100644 (file)
@@ -15,7 +15,7 @@
  * mpc86xx_* files. Mostly for use by mpc86xx_setup().
  */
 
-extern int add_bridge(struct device_node *dev);
+extern int mpc86xx_add_bridge(struct device_node *dev);
 
 extern int mpc86xx_exclude_device(u_char bus, u_char devfn);
 
index 1051702c8d4f48c5e2dc9bc0c01be7e913e8eb0b..23f3e1bbf861d10584ee5e045368c7b7554ee98c 100644 (file)
@@ -364,7 +364,7 @@ mpc86xx_hpcn_setup_arch(void)
 
 #ifdef CONFIG_PCI
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               mpc86xx_add_bridge(np);
 
        ppc_md.pci_exclude_device = mpc86xx_exclude_device;
 #endif
index 8235c562661fc356794c5d04573fda545afe36f0..c1d65fac690d332e2dcca83d583f3e870f5b0490 100644 (file)
@@ -148,7 +148,7 @@ int mpc86xx_exclude_device(u_char bus, u_char devfn)
        return PCIBIOS_SUCCESSFUL;
 }
 
-int __init add_bridge(struct device_node *dev)
+int __init mpc86xx_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
index b412f006a9c55a8dd0bd60ebd193ab1277872793..f3ae0a728158b6061ad4f02e69133feb080f9b4d 100644 (file)
@@ -54,7 +54,7 @@ static struct mtd_partition linkstation_physmap_partitions[] = {
        },
 };
 
-static int __init add_bridge(struct device_node *dev)
+static int __init linkstation_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -92,7 +92,7 @@ static void __init linkstation_setup_arch(void)
 
        /* Lookup PCI host bridges */
        for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
-               add_bridge(np);
+               linkstation_add_bridge(np);
 
        printk(KERN_INFO "BUFFALO Network Attached Storage Series\n");
        printk(KERN_INFO "(C) 2002-2005 BUFFALO INC.\n");
index f357b9258875489e234c0f5bb8ece0e5a203e7df..fceaae40fe7033c70947f3c9f65680d2b0671c0a 100644 (file)
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
        u3_ht = hose;
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init maple_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -541,7 +541,7 @@ void __init maple_pci_init(void)
                        continue;
                if ((of_device_is_compatible(np, "u4-pcie") ||
                     of_device_is_compatible(np, "u3-agp")) &&
-                   add_bridge(np) == 0)
+                   maple_add_bridge(np) == 0)
                        of_node_get(np);
 
                if (of_device_is_compatible(np, "u3-ht")) {
@@ -553,7 +553,7 @@ void __init maple_pci_init(void)
 
        /* Now setup the HyperTransport host if we found any
         */
-       if (ht && add_bridge(ht) != 0)
+       if (ht && maple_add_bridge(ht) != 0)
                of_node_put(ht);
 
        /* Setup the linkage between OF nodes and PHBs */ 
index 5606f25760bca8862e77f94d4f9fad56c83c9de1..ab1f5f62bcd871cbb6d2955b40af5b0754635d51 100644 (file)
@@ -132,7 +132,7 @@ static void __init setup_pa_pxp(struct pci_controller *hose)
        hose->cfg_data = ioremap(0xe0000000, 0x10000000);
 }
 
-static int __init add_bridge(struct device_node *dev)
+static int __init pas_add_bridge(struct device_node *dev)
 {
        struct pci_controller *hose;
 
@@ -167,7 +167,7 @@ void __init pas_pci_init(void)
        }
 
        for (np = NULL; (np = of_get_next_child(root, np)) != NULL;)
-               if (np->name && !strcmp(np->name, "pxp") && !add_bridge(np))
+               if (np->name && !strcmp(np->name, "pxp") && !pas_add_bridge(np))
                        of_node_get(np);
 
        of_node_put(root);
index 8302e34a3cbfc6c53a6cba1b046fcbc764d8bb85..fb853c0affcc991984765b470a3cabeff35fa46f 100644 (file)
@@ -35,8 +35,6 @@
 #define DBG(x...)
 #endif
 
-static int add_bridge(struct device_node *dev);
-
 /* XXX Could be per-controller, but I don't think we risk anything by
  * assuming we won't have both UniNorth and Bandit */
 static int has_uninorth;
@@ -897,7 +895,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
  * "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
  * if we have one or more bandit or chaos bridges, we don't have a MPC106.
  */
-static int __init add_bridge(struct device_node *dev)
+static int __init pmac_add_bridge(struct device_node *dev)
 {
        int len;
        struct pci_controller *hose;
@@ -1023,7 +1021,7 @@ void __init pmac_pci_init(void)
                if (strcmp(np->name, "bandit") == 0
                    || strcmp(np->name, "chaos") == 0
                    || strcmp(np->name, "pci") == 0) {
-                       if (add_bridge(np) == 0)
+                       if (pmac_add_bridge(np) == 0)
                                of_node_get(np);
                }
                if (strcmp(np->name, "ht") == 0) {
@@ -1037,7 +1035,7 @@ void __init pmac_pci_init(void)
        /* Probe HT last as it relies on the agp resources to be already
         * setup
         */
-       if (ht && add_bridge(ht) != 0)
+       if (ht && pmac_add_bridge(ht) != 0)
                of_node_put(ht);
 
        /* Setup the linkage between OF nodes and PHBs */