summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc/prom.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
commit545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch)
treee9ce4bc598d06374bda906f18365984bf22a526a /include/asm-ppc/prom.h
parent4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff)
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'include/asm-ppc/prom.h')
-rw-r--r--include/asm-ppc/prom.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/include/asm-ppc/prom.h b/include/asm-ppc/prom.h
new file mode 100644
index 000000000..f5ec558aa
--- /dev/null
+++ b/include/asm-ppc/prom.h
@@ -0,0 +1,65 @@
+/*
+ * Definitions for talking to the Open Firmware PROM on
+ * Power Macintosh computers.
+ *
+ * Copyright (C) 1996 Paul Mackerras.
+ */
+
+typedef void *phandle;
+typedef void *ihandle;
+
+extern ihandle prom_stdout;
+extern ihandle prom_chosen;
+extern phandle cpu_node;
+extern char prom_display_path[];
+
+struct reg_property {
+ unsigned int address;
+ unsigned int size;
+};
+
+struct translation_property {
+ unsigned int virt;
+ unsigned int size;
+ unsigned int phys;
+ unsigned int flags;
+};
+
+struct property {
+ char *name;
+ int length;
+ unsigned char *value;
+ struct property *next;
+};
+
+struct device_node {
+ char *name;
+ char *type;
+ phandle node;
+ int n_addrs;
+ struct reg_property *addrs;
+ int n_intrs;
+ int *intrs;
+ char *full_name;
+ struct property *properties;
+ struct device_node *parent;
+ struct device_node *child;
+ struct device_node *sibling;
+ struct device_node *next; /* next device of same type */
+ struct device_node *allnext; /* next in list of all nodes */
+};
+
+/* Prototypes */
+void abort(void);
+void prom_exit(void);
+void *call_prom(const char *service, int nargs, int nret, ...);
+void prom_print(const char *msg);
+void prom_init(char *params, int unused, void (*)(void *));
+void set_prom_callback(void);
+unsigned long copy_device_tree(unsigned long, unsigned long);
+struct device_node *find_devices(const char *name);
+struct device_node *find_type_devices(const char *type);
+struct device_node *find_path_device(const char *path);
+unsigned char *get_property(struct device_node *node, const char *name,
+ int *lenp);
+void print_properties(struct device_node *node);