GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / mach-mmp / include / mach / pxa910.h
blobf13c49d6f8dc052988e6f5f407f333c2be183a2e
1 #ifndef __ASM_MACH_PXA910_H
2 #define __ASM_MACH_PXA910_H
4 struct sys_timer;
6 extern struct sys_timer pxa910_timer;
7 extern void __init pxa910_init_irq(void);
9 #include <linux/i2c.h>
10 #include <mach/devices.h>
11 #include <plat/i2c.h>
12 #include <plat/pxa3xx_nand.h>
14 extern struct pxa_device_desc pxa910_device_uart1;
15 extern struct pxa_device_desc pxa910_device_uart2;
16 extern struct pxa_device_desc pxa910_device_twsi0;
17 extern struct pxa_device_desc pxa910_device_twsi1;
18 extern struct pxa_device_desc pxa910_device_pwm1;
19 extern struct pxa_device_desc pxa910_device_pwm2;
20 extern struct pxa_device_desc pxa910_device_pwm3;
21 extern struct pxa_device_desc pxa910_device_pwm4;
22 extern struct pxa_device_desc pxa910_device_nand;
24 static inline int pxa910_add_uart(int id)
26 struct pxa_device_desc *d = NULL;
28 switch (id) {
29 case 1: d = &pxa910_device_uart1; break;
30 case 2: d = &pxa910_device_uart2; break;
33 if (d == NULL)
34 return -EINVAL;
36 return pxa_register_device(d, NULL, 0);
39 static inline int pxa910_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;
43 int ret;
45 switch (id) {
46 case 0: d = &pxa910_device_twsi0; break;
47 case 1: d = &pxa910_device_twsi1; break;
48 default:
49 return -EINVAL;
52 ret = i2c_register_board_info(id, info, size);
53 if (ret)
54 return ret;
56 return pxa_register_device(d, data, sizeof(*data));
59 static inline int pxa910_add_pwm(int id)
61 struct pxa_device_desc *d = NULL;
63 switch (id) {
64 case 1: d = &pxa910_device_pwm1; break;
65 case 2: d = &pxa910_device_pwm2; break;
66 case 3: d = &pxa910_device_pwm3; break;
67 case 4: d = &pxa910_device_pwm4; break;
68 default:
69 return -EINVAL;
72 return pxa_register_device(d, NULL, 0);
75 static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info)
77 return pxa_register_device(&pxa910_device_nand, info, sizeof(*info));
79 #endif /* __ASM_MACH_PXA910_H */