devices.h 1000 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
  24. struct pxa_device_desc pxa910_device_##_name __initdata = { \
  25. .dev_name = "pxa910-" #_name, \
  26. .drv_name = _drv, \
  27. .id = _id, \
  28. .irq = IRQ_PXA910_##_irq, \
  29. .start = _start, \
  30. .size = _size, \
  31. .dma = { _dma }, \
  32. };
  33. extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);