]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - arch/arm/mach-mmp/include/mach/pxa910.h
ARM: delete struct sys_timer
[mirror_ubuntu-eoan-kernel.git] / arch / arm / mach-mmp / include / mach / pxa910.h
1 #ifndef __ASM_MACH_PXA910_H
2 #define __ASM_MACH_PXA910_H
3
4 extern void pxa910_timer_init(void);
5 extern void __init pxa910_init_irq(void);
6
7 #include <linux/i2c.h>
8 #include <linux/i2c/pxa-i2c.h>
9 #include <mach/devices.h>
10 #include <linux/platform_data/mtd-nand-pxa3xx.h>
11
12 extern struct pxa_device_desc pxa910_device_uart1;
13 extern struct pxa_device_desc pxa910_device_uart2;
14 extern struct pxa_device_desc pxa910_device_twsi0;
15 extern struct pxa_device_desc pxa910_device_twsi1;
16 extern struct pxa_device_desc pxa910_device_pwm1;
17 extern struct pxa_device_desc pxa910_device_pwm2;
18 extern struct pxa_device_desc pxa910_device_pwm3;
19 extern struct pxa_device_desc pxa910_device_pwm4;
20 extern struct pxa_device_desc pxa910_device_nand;
21 extern struct platform_device pxa168_device_u2o;
22 extern struct platform_device pxa168_device_u2ootg;
23 extern struct platform_device pxa168_device_u2oehci;
24
25 extern struct platform_device pxa910_device_gpio;
26 extern struct platform_device pxa910_device_rtc;
27
28 static inline int pxa910_add_uart(int id)
29 {
30 struct pxa_device_desc *d = NULL;
31
32 switch (id) {
33 case 1: d = &pxa910_device_uart1; break;
34 case 2: d = &pxa910_device_uart2; break;
35 }
36
37 if (d == NULL)
38 return -EINVAL;
39
40 return pxa_register_device(d, NULL, 0);
41 }
42
43 static inline int pxa910_add_twsi(int id, struct i2c_pxa_platform_data *data,
44 struct i2c_board_info *info, unsigned size)
45 {
46 struct pxa_device_desc *d = NULL;
47 int ret;
48
49 switch (id) {
50 case 0: d = &pxa910_device_twsi0; break;
51 case 1: d = &pxa910_device_twsi1; break;
52 default:
53 return -EINVAL;
54 }
55
56 ret = i2c_register_board_info(id, info, size);
57 if (ret)
58 return ret;
59
60 return pxa_register_device(d, data, sizeof(*data));
61 }
62
63 static inline int pxa910_add_pwm(int id)
64 {
65 struct pxa_device_desc *d = NULL;
66
67 switch (id) {
68 case 1: d = &pxa910_device_pwm1; break;
69 case 2: d = &pxa910_device_pwm2; break;
70 case 3: d = &pxa910_device_pwm3; break;
71 case 4: d = &pxa910_device_pwm4; break;
72 default:
73 return -EINVAL;
74 }
75
76 return pxa_register_device(d, NULL, 0);
77 }
78
79 static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info)
80 {
81 return pxa_register_device(&pxa910_device_nand, info, sizeof(*info));
82 }
83 #endif /* __ASM_MACH_PXA910_H */