devices.h 674 B

123456789101112131415161718192021222324252627
  1. #include <linux/types.h>
  2. #define MAX_RESOURCE_DMA 2
  3. /* structure for describing the on-chip devices */
  4. struct pxa_device_desc {
  5. const char *dev_name;
  6. const char *drv_name;
  7. int id;
  8. int irq;
  9. unsigned long start;
  10. unsigned long size;
  11. int dma[MAX_RESOURCE_DMA];
  12. };
  13. #define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
  14. struct pxa_device_desc pxa168_device_##_name __initdata = { \
  15. .dev_name = "pxa168-" #_name, \
  16. .drv_name = _drv, \
  17. .id = _id, \
  18. .irq = IRQ_PXA168_##_irq, \
  19. .start = _start, \
  20. .size = _size, \
  21. .dma = { _dma }, \
  22. };
  23. extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);