Merge tag 'drm-fixes-for-v4.14-rc8' of git://people.freedesktop.org/~airlied/linux
[sfrench/cifs-2.6.git] / arch / arm / mach-mmp / devices.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __MACH_DEVICE_H
3 #define __MACH_DEVICE_H
4
5 #include <linux/types.h>
6
7 #define MAX_RESOURCE_DMA        2
8
9 /* structure for describing the on-chip devices */
10 struct pxa_device_desc {
11         const char      *dev_name;
12         const char      *drv_name;
13         int             id;
14         int             irq;
15         unsigned long   start;
16         unsigned long   size;
17         int             dma[MAX_RESOURCE_DMA];
18 };
19
20 #define PXA168_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)   \
21 struct pxa_device_desc pxa168_device_##_name __initdata = {             \
22         .dev_name       = "pxa168-" #_name,                             \
23         .drv_name       = _drv,                                         \
24         .id             = _id,                                          \
25         .irq            = IRQ_PXA168_##_irq,                            \
26         .start          = _start,                                       \
27         .size           = _size,                                        \
28         .dma            = { _dma },                                     \
29 };
30
31 #define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)   \
32 struct pxa_device_desc pxa910_device_##_name __initdata = {             \
33         .dev_name       = "pxa910-" #_name,                             \
34         .drv_name       = _drv,                                         \
35         .id             = _id,                                          \
36         .irq            = IRQ_PXA910_##_irq,                            \
37         .start          = _start,                                       \
38         .size           = _size,                                        \
39         .dma            = { _dma },                                     \
40 };
41
42 #define MMP2_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)     \
43 struct pxa_device_desc mmp2_device_##_name __initdata = {               \
44         .dev_name       = "mmp2-" #_name,                               \
45         .drv_name       = _drv,                                         \
46         .id             = _id,                                          \
47         .irq            = IRQ_MMP2_##_irq,                              \
48         .start          = _start,                                       \
49         .size           = _size,                                        \
50         .dma            = { _dma },                                     \
51 }
52
53 extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
54 extern int pxa_usb_phy_init(void __iomem *phy_reg);
55 extern void pxa_usb_phy_deinit(void __iomem *phy_reg);
56
57 #endif /* __MACH_DEVICE_H */