···99 * Copyright (C) 1996-2005 Paul Mackerras.1010 *1111 * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.1212- * Updates for SPARC32 by David S. Miller1212+ * Updates for SPARC by David S. Miller1313 *1414 * This program is free software; you can redistribute it and/or1515 * modify it under the terms of the GNU General Public License···3939 unsigned int unique_id;4040};41414242+struct of_irq_controller;4243struct device_node {4344 const char *name;4445 const char *type;···5958 unsigned long _flags;6059 void *data;6160 unsigned int unique_id;6161+6262+ struct of_irq_controller *irq_trans;6363+};6464+6565+struct of_irq_controller {6666+ unsigned int (*irq_build)(struct device_node *, unsigned int, void *);6767+ void *data;6268};63696470#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)6571#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)66727373+extern struct device_node *of_find_node_by_cpuid(int cpuid);6774extern int of_set_property(struct device_node *node, const char *name, void *val, int len);6875extern int of_getintprop_default(struct device_node *np,6976 const char *name,
+1-103
include/asm-sparc64/prom.h
···11-#ifndef _SPARC64_PROM_H22-#define _SPARC64_PROM_H33-#ifdef __KERNEL__44-55-/*66- * Definitions for talking to the Open Firmware PROM on77- * Power Macintosh computers.88- *99- * Copyright (C) 1996-2005 Paul Mackerras.1010- *1111- * Updates for PPC64 by Peter Bergner & David Engebretsen, IBM Corp.1212- * Updates for SPARC64 by David S. Miller1313- *1414- * This program is free software; you can redistribute it and/or1515- * modify it under the terms of the GNU General Public License1616- * as published by the Free Software Foundation; either version1717- * 2 of the License, or (at your option) any later version.1818- */1919-#include <linux/types.h>2020-#include <linux/proc_fs.h>2121-#include <asm/atomic.h>2222-2323-#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 22424-#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 12525-2626-#define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l))2727-#define of_prop_cmp(s1, s2) strcasecmp((s1), (s2))2828-#define of_node_cmp(s1, s2) strcmp((s1), (s2))2929-3030-typedef u32 phandle;3131-typedef u32 ihandle;3232-3333-struct property {3434- char *name;3535- int length;3636- void *value;3737- struct property *next;3838- unsigned long _flags;3939- unsigned int unique_id;4040-};4141-4242-struct of_irq_controller;4343-struct device_node {4444- const char *name;4545- const char *type;4646- phandle node;4747- char *path_component_name;4848- char *full_name;4949-5050- struct property *properties;5151- struct property *deadprops; /* removed properties */5252- struct device_node *parent;5353- struct device_node *child;5454- struct device_node *sibling;5555- struct device_node *next; /* next device of same type */5656- struct device_node *allnext; /* next in list of all nodes */5757- struct proc_dir_entry *pde; /* this node's proc directory */5858- struct kref kref;5959- unsigned long _flags;6060- void *data;6161- unsigned int unique_id;6262-6363- struct of_irq_controller *irq_trans;6464-};6565-6666-struct of_irq_controller {6767- unsigned int (*irq_build)(struct device_node *, unsigned int, void *);6868- void *data;6969-};7070-7171-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)7272-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)7373-7474-extern struct device_node *of_find_node_by_cpuid(int cpuid);7575-extern int of_set_property(struct device_node *node, const char *name, void *val, int len);7676-extern int of_getintprop_default(struct device_node *np,7777- const char *name,7878- int def);7979-extern int of_find_in_proplist(const char *list, const char *match, int len);8080-8181-extern void prom_build_devicetree(void);8282-8383-/* Dummy ref counting routines - to be implemented later */8484-static inline struct device_node *of_node_get(struct device_node *node)8585-{8686- return node;8787-}8888-static inline void of_node_put(struct device_node *node)8989-{9090-}9191-9292-/*9393- * NB: This is here while we transition from using asm/prom.h9494- * to linux/of.h9595- */9696-#include <linux/of.h>9797-9898-extern struct device_node *of_console_device;9999-extern char *of_console_path;100100-extern char *of_console_options;101101-102102-#endif /* __KERNEL__ */103103-#endif /* _SPARC64_PROM_H */11+#include <asm-sparc/prom.h>