of_device.h 962 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 dev;
  16. struct resource resource[PROMREG_MAX];
  17. unsigned int irqs[PROMINTR_MAX];
  18. int num_irqs;
  19. void *sysdata;
  20. int slot;
  21. int portid;
  22. int clock_freq;
  23. };
  24. extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name);
  25. extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size);
  26. extern void of_propagate_archdata(struct of_device *bus);
  27. /* This is just here during the transition */
  28. #include <linux/of_platform.h>
  29. #endif /* __KERNEL__ */
  30. #endif /* _ASM_SPARC_OF_DEVICE_H */