1 #ifndef __ASM_MACH_PXA168_H
2 #define __ASM_MACH_PXA168_H
6 extern struct sys_timer pxa168_timer;
7 extern void __init pxa168_init_irq(void);
10 #include <mach/devices.h>
12 #include <plat/pxa3xx_nand.h>
14 extern struct pxa_device_desc pxa168_device_uart1;
15 extern struct pxa_device_desc pxa168_device_uart2;
16 extern struct pxa_device_desc pxa168_device_twsi0;
17 extern struct pxa_device_desc pxa168_device_twsi1;
18 extern struct pxa_device_desc pxa168_device_pwm1;
19 extern struct pxa_device_desc pxa168_device_pwm2;
20 extern struct pxa_device_desc pxa168_device_pwm3;
21 extern struct pxa_device_desc pxa168_device_pwm4;
22 extern struct pxa_device_desc pxa168_device_ssp1;
23 extern struct pxa_device_desc pxa168_device_ssp2;
24 extern struct pxa_device_desc pxa168_device_ssp3;
25 extern struct pxa_device_desc pxa168_device_ssp4;
26 extern struct pxa_device_desc pxa168_device_ssp5;
27 extern struct pxa_device_desc pxa168_device_nand;
29 static inline int pxa168_add_uart(int id)
31 struct pxa_device_desc *d = NULL;
34 case 1: d = &pxa168_device_uart1; break;
35 case 2: d = &pxa168_device_uart2; break;
41 return pxa_register_device(d, NULL, 0);
44 static inline int pxa168_add_twsi(int id, struct i2c_pxa_platform_data *data,
45 struct i2c_board_info *info, unsigned size)
47 struct pxa_device_desc *d = NULL;
51 case 0: d = &pxa168_device_twsi0; break;
52 case 1: d = &pxa168_device_twsi1; break;
57 ret = i2c_register_board_info(id, info, size);
61 return pxa_register_device(d, data, sizeof(*data));
64 static inline int pxa168_add_pwm(int id)
66 struct pxa_device_desc *d = NULL;
69 case 1: d = &pxa168_device_pwm1; break;
70 case 2: d = &pxa168_device_pwm2; break;
71 case 3: d = &pxa168_device_pwm3; break;
72 case 4: d = &pxa168_device_pwm4; break;
77 return pxa_register_device(d, NULL, 0);
80 static inline int pxa168_add_ssp(int id)
82 struct pxa_device_desc *d = NULL;
85 case 1: d = &pxa168_device_ssp1; break;
86 case 2: d = &pxa168_device_ssp2; break;
87 case 3: d = &pxa168_device_ssp3; break;
88 case 4: d = &pxa168_device_ssp4; break;
89 case 5: d = &pxa168_device_ssp5; break;
93 return pxa_register_device(d, NULL, 0);
96 static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info)
98 return pxa_register_device(&pxa168_device_nand, info, sizeof(*info));
100 #endif /* __ASM_MACH_PXA168_H */