blob: d0ec7dae88e4c06f9050f4bf3b2223121109c8c0 [file] [log] [blame]
Eric Miaof7426f52010-07-15 22:18:32 +08001#ifndef __MACH_DEVICE_H
2#define __MACH_DEVICE_H
3
Eric Miao49cbe782009-01-20 14:15:18 +08004#include <linux/types.h>
5
6#define MAX_RESOURCE_DMA 2
7
8/* structure for describing the on-chip devices */
9struct pxa_device_desc {
10 const char *dev_name;
11 const char *drv_name;
12 int id;
13 int irq;
14 unsigned long start;
15 unsigned long size;
16 int dma[MAX_RESOURCE_DMA];
17};
18
19#define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
20struct pxa_device_desc pxa168_device_##_name __initdata = { \
21 .dev_name = "pxa168-" #_name, \
22 .drv_name = _drv, \
23 .id = _id, \
24 .irq = IRQ_PXA168_##_irq, \
25 .start = _start, \
26 .size = _size, \
27 .dma = { _dma }, \
28};
29
Eric Miao14c6b5e2009-03-20 12:50:22 +080030#define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
31struct pxa_device_desc pxa910_device_##_name __initdata = { \
32 .dev_name = "pxa910-" #_name, \
33 .drv_name = _drv, \
34 .id = _id, \
35 .irq = IRQ_PXA910_##_irq, \
36 .start = _start, \
37 .size = _size, \
38 .dma = { _dma }, \
39};
Haojian Zhuang2f7e8fa2009-12-04 09:41:28 -050040
41#define MMP2_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...) \
42struct pxa_device_desc mmp2_device_##_name __initdata = { \
43 .dev_name = "mmp2-" #_name, \
44 .drv_name = _drv, \
45 .id = _id, \
46 .irq = IRQ_MMP2_##_irq, \
47 .start = _start, \
48 .size = _size, \
49 .dma = { _dma }, \
50}
51
Eric Miao49cbe782009-01-20 14:15:18 +080052extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
Eric Miaof7426f52010-07-15 22:18:32 +080053#endif /* __MACH_DEVICE_H */