mdesc.h 966 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _SPARC64_MDESC_H
  2. #define _SPARC64_MDESC_H
  3. #include <linux/types.h>
  4. #include <asm/prom.h>
  5. struct mdesc_node;
  6. struct mdesc_arc {
  7. const char *name;
  8. struct mdesc_node *arc;
  9. };
  10. struct mdesc_node {
  11. const char *name;
  12. u64 node;
  13. unsigned int unique_id;
  14. unsigned int num_arcs;
  15. unsigned int irqs[2];
  16. struct property *properties;
  17. struct mdesc_node *hash_next;
  18. struct mdesc_node *allnodes_next;
  19. struct mdesc_arc arcs[0];
  20. };
  21. extern struct mdesc_node *md_find_node_by_name(struct mdesc_node *from,
  22. const char *name);
  23. #define md_for_each_node_by_name(__mn, __name) \
  24. for (__mn = md_find_node_by_name(NULL, __name); __mn; \
  25. __mn = md_find_node_by_name(__mn, __name))
  26. extern struct property *md_find_property(const struct mdesc_node *mp,
  27. const char *name,
  28. int *lenp);
  29. extern const void *md_get_property(const struct mdesc_node *mp,
  30. const char *name,
  31. int *lenp);
  32. extern void sun4v_mdesc_init(void);
  33. #endif