]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sparc/kernel/prom_32.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild...
[mv-sheeva.git] / arch / sparc / kernel / prom_32.c
index 5818aa9e85a00c168df49315fcae23bfa0961758..fe43e80772dbf597e201b7badd87521b364c6e53 100644 (file)
@@ -27,8 +27,6 @@
 
 #include "prom.h"
 
-static unsigned int prom_early_allocated;
-
 void * __init prom_early_alloc(unsigned long size)
 {
        void *ret;
@@ -42,14 +40,6 @@ void * __init prom_early_alloc(unsigned long size)
        return ret;
 }
 
-static int is_root_node(const struct device_node *dp)
-{
-       if (!dp)
-               return 0;
-
-       return (dp->parent == NULL);
-}
-
 /* The following routines deal with the black magic of fully naming a
  * node.
  *
@@ -161,7 +151,7 @@ static void __init __build_path_component(struct device_node *dp, char *tmp_buf)
        return sparc32_path_component(dp, tmp_buf);
 }
 
-static char * __init build_path_component(struct device_node *dp)
+char * __init build_path_component(struct device_node *dp)
 {
        char tmp_buf[64], *n;
 
@@ -176,97 +166,9 @@ static char * __init build_path_component(struct device_node *dp)
        return n;
 }
 
-static char * __init build_full_name(struct device_node *dp)
-{
-       int len, ourlen, plen;
-       char *n;
-
-       plen = strlen(dp->parent->full_name);
-       ourlen = strlen(dp->path_component_name);
-       len = ourlen + plen + 2;
-
-       n = prom_early_alloc(len);
-       strcpy(n, dp->parent->full_name);
-       if (!is_root_node(dp->parent)) {
-               strcpy(n + plen, "/");
-               plen++;
-       }
-       strcpy(n + plen, dp->path_component_name);
-
-       return n;
-}
-
-static char * __init get_one_property(phandle node, const char *name)
-{
-       char *buf = "<NULL>";
-       int len;
-
-       len = prom_getproplen(node, name);
-       if (len > 0) {
-               buf = prom_early_alloc(len);
-               len = prom_getproperty(node, name, buf, len);
-       }
-
-       return buf;
-}
-
-static struct device_node * __init create_node(phandle node, struct device_node *parent)
-{
-       struct device_node *dp;
-
-       if (!node)
-               return NULL;
-
-       dp = prom_early_alloc(sizeof(*dp));
-       dp->unique_id = prom_unique_id++;
-       dp->parent = parent;
-
-       kref_init(&dp->kref);
-
-       dp->name = get_one_property(node, "name");
-       dp->type = get_one_property(node, "device_type");
-       dp->node = node;
-
-       /* Build interrupts later... */
-
-       dp->properties = build_prop_list(node);
-
-       return dp;
-}
-
-static struct device_node * __init build_tree(struct device_node *parent, phandle node, struct device_node ***nextp)
-{
-       struct device_node *dp;
-
-       dp = create_node(node, parent);
-       if (dp) {
-               *(*nextp) = dp;
-               *nextp = &dp->allnext;
-
-               dp->parent = parent;
-               dp->path_component_name = build_path_component(dp);
-               dp->full_name = build_full_name(dp);
-
-               dp->child = build_tree(dp, prom_getchild(node), nextp);
-
-               dp->sibling = build_tree(parent, prom_getsibling(node), nextp);
-       }
-
-       return dp;
-}
-
-struct device_node *of_console_device;
-EXPORT_SYMBOL(of_console_device);
-
-char *of_console_path;
-EXPORT_SYMBOL(of_console_path);
-
-char *of_console_options;
-EXPORT_SYMBOL(of_console_options);
-
 extern void restore_current(void);
 
-static void __init of_console_init(void)
+void __init of_console_init(void)
 {
        char *msg = "OF stdout device is: %s\n";
        struct device_node *dp;
@@ -384,20 +286,10 @@ static void __init of_console_init(void)
        printk(msg, of_console_path);
 }
 
-void __init prom_build_devicetree(void)
+void __init of_fill_in_cpu_data(void)
 {
-       struct device_node **nextp;
-
-       allnodes = create_node(prom_root_node, NULL);
-       allnodes->path_component_name = "";
-       allnodes->full_name = "/";
-
-       nextp = &allnodes->allnext;
-       allnodes->child = build_tree(allnodes,
-                                    prom_getchild(allnodes->node),
-                                    &nextp);
-       of_console_init();
+}
 
-       printk("PROM: Built device tree with %u bytes of memory.\n",
-              prom_early_allocated);
+void __init irq_trans_init(struct device_node *dp)
+{
 }