Merge branch 'for-rmk/samsung6' of git://git.fluff.org/bjdooks/linux into devel-stable
[linux-2.6.git] / arch / arm / mach-mmp / include / mach / devices.h
1 #include <linux/types.h>
2
3 #define MAX_RESOURCE_DMA        2
4
5 /* structure for describing the on-chip devices */
6 struct pxa_device_desc {
7         const char      *dev_name;
8         const char      *drv_name;
9         int             id;
10         int             irq;
11         unsigned long   start;
12         unsigned long   size;
13         int             dma[MAX_RESOURCE_DMA];
14 };
15
16 #define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)   \
17 struct pxa_device_desc pxa168_device_##_name __initdata = {             \
18         .dev_name       = "pxa168-" #_name,                             \
19         .drv_name       = _drv,                                         \
20         .id             = _id,                                          \
21         .irq            = IRQ_PXA168_##_irq,                            \
22         .start          = _start,                                       \
23         .size           = _size,                                        \
24         .dma            = { _dma },                                     \
25 };
26
27 #define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)   \
28 struct pxa_device_desc pxa910_device_##_name __initdata = {             \
29         .dev_name       = "pxa910-" #_name,                             \
30         .drv_name       = _drv,                                         \
31         .id             = _id,                                          \
32         .irq            = IRQ_PXA910_##_irq,                            \
33         .start          = _start,                                       \
34         .size           = _size,                                        \
35         .dma            = { _dma },                                     \
36 };
37
38 #define MMP2_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)     \
39 struct pxa_device_desc mmp2_device_##_name __initdata = {               \
40         .dev_name       = "mmp2-" #_name,                               \
41         .drv_name       = _drv,                                         \
42         .id             = _id,                                          \
43         .irq            = IRQ_MMP2_##_irq,                              \
44         .start          = _start,                                       \
45         .size           = _size,                                        \
46         .dma            = { _dma },                                     \
47 }
48
49 extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);