0001
0002 #include <linux/of.h> /* linux/of.h gets to determine #include ordering */
0003 #ifndef _SPARC_PROM_H
0004 #define _SPARC_PROM_H
0005 #ifdef __KERNEL__
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <linux/types.h>
0017 #include <linux/of_pdt.h>
0018 #include <linux/proc_fs.h>
0019 #include <linux/mutex.h>
0020 #include <linux/atomic.h>
0021 #include <linux/irqdomain.h>
0022
0023 #define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l))
0024 #define of_prop_cmp(s1, s2) strcasecmp((s1), (s2))
0025 #define of_node_cmp(s1, s2) strcmp((s1), (s2))
0026
0027 struct of_irq_controller {
0028 unsigned int (*irq_build)(struct device_node *, unsigned int, void *);
0029 void *data;
0030 };
0031
0032 struct device_node *of_find_node_by_cpuid(int cpuid);
0033 int of_set_property(struct device_node *node, const char *name, void *val, int len);
0034 extern struct mutex of_set_property_mutex;
0035 int of_getintprop_default(struct device_node *np,
0036 const char *name,
0037 int def);
0038 int of_find_in_proplist(const char *list, const char *match, int len);
0039
0040 void prom_build_devicetree(void);
0041 void of_populate_present_mask(void);
0042 void of_fill_in_cpu_data(void);
0043
0044 struct resource;
0045 void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
0046 void of_iounmap(struct resource *res, void __iomem *base, unsigned long size);
0047
0048 extern struct device_node *of_console_device;
0049 extern char *of_console_path;
0050 extern char *of_console_options;
0051
0052 void irq_trans_init(struct device_node *dp);
0053 char *build_path_component(struct device_node *dp);
0054
0055 #endif
0056 #endif