1657f201dSDavid S. Miller #ifndef __PROM_H 2657f201dSDavid S. Miller #define __PROM_H 3657f201dSDavid S. Miller 4657f201dSDavid S. Miller #include <linux/spinlock.h> 5657f201dSDavid S. Miller #include <asm/prom.h> 6657f201dSDavid S. Miller 7657f201dSDavid S. Miller extern struct device_node *allnodes; /* temporary while merging */ 8657f201dSDavid S. Miller extern rwlock_t devtree_lock; /* temporary while merging */ 9657f201dSDavid S. Miller 10efeac2f8SDavid S. Miller extern void * prom_early_alloc(unsigned long size); 11efeac2f8SDavid S. Miller 125fce09c6SDavid S. Miller #ifdef CONFIG_SPARC64 135fce09c6SDavid S. Miller extern void irq_trans_init(struct device_node *dp); 145fce09c6SDavid S. Miller #endif 155fce09c6SDavid S. Miller 16e5ff0fe3SDavid S. Miller extern unsigned int prom_unique_id; 17e5ff0fe3SDavid S. Miller 186524036aSDavid S. Miller static inline int is_root_node(const struct device_node *dp) 196524036aSDavid S. Miller { 206524036aSDavid S. Miller if (!dp) 216524036aSDavid S. Miller return 0; 226524036aSDavid S. Miller 236524036aSDavid S. Miller return (dp->parent == NULL); 246524036aSDavid S. Miller } 256524036aSDavid S. Miller 266524036aSDavid S. Miller extern char *build_path_component(struct device_node *dp); 276524036aSDavid S. Miller 286524036aSDavid S. Miller extern struct device_node * __init prom_create_node(phandle node, 297d9439d5SDavid S. Miller struct device_node *parent); 30b9e5567cSDavid S. Miller 316524036aSDavid S. Miller extern struct device_node * __init prom_build_tree(struct device_node *parent, 326524036aSDavid S. Miller phandle node, 336524036aSDavid S. Miller struct device_node ***nextp); 34657f201dSDavid S. Miller #endif /* __PROM_H */ 35