1 #ifndef __ASM_MACH_PXA168_H
2 #define __ASM_MACH_PXA168_H
5 #include <mach/devices.h>
7 #include <plat/pxa3xx_nand.h>
9 extern struct pxa_device_desc pxa168_device_uart1;
10 extern struct pxa_device_desc pxa168_device_uart2;
11 extern struct pxa_device_desc pxa168_device_twsi0;
12 extern struct pxa_device_desc pxa168_device_twsi1;
13 extern struct pxa_device_desc pxa168_device_pwm1;
14 extern struct pxa_device_desc pxa168_device_pwm2;
15 extern struct pxa_device_desc pxa168_device_pwm3;
16 extern struct pxa_device_desc pxa168_device_pwm4;
17 extern struct pxa_device_desc pxa168_device_ssp1;
18 extern struct pxa_device_desc pxa168_device_ssp2;
19 extern struct pxa_device_desc pxa168_device_ssp3;
20 extern struct pxa_device_desc pxa168_device_ssp4;
21 extern struct pxa_device_desc pxa168_device_ssp5;
22 extern struct pxa_device_desc pxa168_device_nand;
24 static inline int pxa168_add_uart(int id)
26 struct pxa_device_desc *d = NULL;
29 case 1: d = &pxa168_device_uart1; break;
30 case 2: d = &pxa168_device_uart2; break;
36 return pxa_register_device(d, NULL, 0);
39 static inline int pxa168_add_twsi(int id, struct i2c_pxa_platform_data *data,
40 struct i2c_board_info *info, unsigned size)
42 struct pxa_device_desc *d = NULL;
46 case 0: d = &pxa168_device_twsi0; break;
47 case 1: d = &pxa168_device_twsi1; break;
52 ret = i2c_register_board_info(id, info, size);
56 return pxa_register_device(d, data, sizeof(*data));
59 static inline int pxa168_add_pwm(int id)
61 struct pxa_device_desc *d = NULL;
64 case 1: d = &pxa168_device_pwm1; break;
65 case 2: d = &pxa168_device_pwm2; break;
66 case 3: d = &pxa168_device_pwm3; break;
67 case 4: d = &pxa168_device_pwm4; break;
72 return pxa_register_device(d, NULL, 0);
75 static inline int pxa168_add_ssp(int id)
77 struct pxa_device_desc *d = NULL;
80 case 1: d = &pxa168_device_ssp1; break;
81 case 2: d = &pxa168_device_ssp2; break;
82 case 3: d = &pxa168_device_ssp3; break;
83 case 4: d = &pxa168_device_ssp4; break;
84 case 5: d = &pxa168_device_ssp5; break;
88 return pxa_register_device(d, NULL, 0);
91 static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info)
93 return pxa_register_device(&pxa168_device_nand, info, sizeof(*info));
95 #endif /* __ASM_MACH_PXA168_H */