• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __MACH_DEVICE_H
2 #define __MACH_DEVICE_H
3 
4 #include <linux/types.h>
5 
6 #define MAX_RESOURCE_DMA	2
7 
8 /* structure for describing the on-chip devices */
9 struct 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...)	\
20 struct 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 
30 #define PXA910_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)	\
31 struct 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 };
40 
41 #define MMP2_DEVICE(_name, _drv, _id, _irq, _start, _size, _dma...)	\
42 struct 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 
52 extern int pxa_register_device(struct pxa_device_desc *, void *, size_t);
53 extern int pxa_usb_phy_init(void __iomem *phy_reg);
54 extern void pxa_usb_phy_deinit(void __iomem *phy_reg);
55 
56 #endif /* __MACH_DEVICE_H */
57