of_device.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2007-2008 Michal Simek <monstr@monstr.eu>
  3. *
  4. * based on PowerPC of_device.h
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef _ASM_MICROBLAZE_OF_DEVICE_H
  11. #define _ASM_MICROBLAZE_OF_DEVICE_H
  12. #ifdef __KERNEL__
  13. #include <linux/device.h>
  14. #include <linux/of.h>
  15. /*
  16. * The of_device is a kind of "base class" that is a superset of
  17. * struct device for use by devices attached to an OF node and
  18. * probed using OF properties.
  19. */
  20. struct of_device {
  21. struct device_node *node; /* to be obsoleted */
  22. u64 dma_mask; /* DMA mask */
  23. struct device dev; /* Generic device interface */
  24. };
  25. extern ssize_t of_device_get_modalias(struct of_device *ofdev,
  26. char *str, ssize_t len);
  27. extern struct of_device *of_device_alloc(struct device_node *np,
  28. const char *bus_id,
  29. struct device *parent);
  30. extern int of_device_uevent(struct device *dev,
  31. struct kobj_uevent_env *env);
  32. extern void of_device_make_bus_id(struct of_device *dev);
  33. /* This is just here during the transition */
  34. #include <linux/of_device.h>
  35. #endif /* __KERNEL__ */
  36. #endif /* _ASM_MICROBLAZE_OF_DEVICE_H */