of_platform.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp.
  3. * <benh@kernel.crashing.org>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version
  8. * 2 of the License, or (at your option) any later version.
  9. */
  10. #ifndef _ASM_MICROBLAZE_OF_PLATFORM_H
  11. #define _ASM_MICROBLAZE_OF_PLATFORM_H
  12. /* This is just here during the transition */
  13. #include <linux/of_platform.h>
  14. /*
  15. * The list of OF IDs below is used for matching bus types in the
  16. * system whose devices are to be exposed as of_platform_devices.
  17. *
  18. * This is the default list valid for most platforms. This file provides
  19. * functions who can take an explicit list if necessary though
  20. *
  21. * The search is always performed recursively looking for children of
  22. * the provided device_node and recursively if such a children matches
  23. * a bus type in the list
  24. */
  25. static const struct of_device_id of_default_bus_ids[] = {
  26. { .type = "soc", },
  27. { .compatible = "soc", },
  28. { .type = "plb5", },
  29. { .type = "plb4", },
  30. { .type = "opb", },
  31. { .type = "simple", },
  32. {},
  33. };
  34. /* Platform devices and busses creation */
  35. extern struct of_device *of_platform_device_create(struct device_node *np,
  36. const char *bus_id,
  37. struct device *parent);
  38. /* pseudo "matches" value to not do deep probe */
  39. #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1)
  40. extern int of_platform_bus_probe(struct device_node *root,
  41. const struct of_device_id *matches,
  42. struct device *parent);
  43. extern struct of_device *of_find_device_by_phandle(phandle ph);
  44. extern void of_instantiate_rtc(void);
  45. #endif /* _ASM_MICROBLAZE_OF_PLATFORM_H */