blob: 453397fe5e14035fbc980689d844e5673312d4a3 [file] [log] [blame]
David S. Miller657f2012008-12-04 20:12:20 -08001#ifndef __PROM_H
2#define __PROM_H
3
4#include <linux/spinlock.h>
5#include <asm/prom.h>
6
7extern struct device_node *allnodes; /* temporary while merging */
8extern rwlock_t devtree_lock; /* temporary while merging */
9
David S. Millerefeac2f2008-12-05 00:40:43 -080010extern void * prom_early_alloc(unsigned long size);
David S. Miller5fce09c2008-12-05 00:43:03 -080011extern void irq_trans_init(struct device_node *dp);
David S. Miller5fce09c2008-12-05 00:43:03 -080012
David S. Millere5ff0fe2008-12-05 00:50:22 -080013extern unsigned int prom_unique_id;
14
David S. Miller65240362008-12-05 01:21:41 -080015static inline int is_root_node(const struct device_node *dp)
16{
17 if (!dp)
18 return 0;
David S. Millerb9e55672008-12-05 01:00:46 -080019
David S. Miller65240362008-12-05 01:21:41 -080020 return (dp->parent == NULL);
21}
22
23extern char *build_path_component(struct device_node *dp);
David S. Miller23dc7582008-12-05 18:16:48 -080024extern void of_console_init(void);
David S. Miller65240362008-12-05 01:21:41 -080025
David S. Miller23dc7582008-12-05 18:16:48 -080026extern unsigned int prom_early_allocated;
David S. Miller65240362008-12-05 01:21:41 -080027
David S. Miller657f2012008-12-04 20:12:20 -080028#endif /* __PROM_H */