of_device.h 990 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _ASM_SPARC_OF_DEVICE_H
  2. #define _ASM_SPARC_OF_DEVICE_H
  3. #ifdef __KERNEL__
  4. #include <linux/device.h>
  5. #include <linux/of.h>
  6. #include <linux/mod_devicetable.h>
  7. #include <asm/openprom.h>
  8. /*
  9. * The of_device is a kind of "base class" that is a superset of
  10. * struct device for use by devices attached to an OF node and
  11. * probed using OF properties.
  12. */
  13. struct of_device
  14. {
  15. struct device_node *node;
  16. struct device dev;
  17. struct resource resource[PROMREG_MAX];
  18. unsigned int irqs[PROMINTR_MAX];
  19. int num_irqs;
  20. void *sysdata;
  21. int slot;
  22. int portid;
  23. int clock_freq;
  24. };
  25. extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
  26. extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size);
  27. extern void of_propagate_archdata(struct of_device *bus);
  28. /* This is just here during the transition */
  29. #include <linux/of_platform.h>
  30. #endif /* __KERNEL__ */
  31. #endif /* _ASM_SPARC_OF_DEVICE_H */