Merge branches 'cxgb4' and 'mlx5' into k.o/for-4.8
[deliverable/linux.git] / arch / arm / mach-mmp / pxa910.h
CommitLineData
14c6b5e7
EM
1#ifndef __ASM_MACH_PXA910_H
2#define __ASM_MACH_PXA910_H
3
6bb27d73 4extern void pxa910_timer_init(void);
c052d13c 5extern void __init icu_init_irq(void);
2728701d
EM
6extern void __init pxa910_init_irq(void);
7
1a77920e 8#include <linux/i2c.h>
b459396e 9#include <linux/i2c/pxa-i2c.h>
293b2da1 10#include <linux/platform_data/mtd-nand-pxa3xx.h>
333893cd 11#include <video/mmp_disp.h>
14c6b5e7 12
b501fd7b
AB
13#include "devices.h"
14
14c6b5e7
EM
15extern struct pxa_device_desc pxa910_device_uart1;
16extern struct pxa_device_desc pxa910_device_uart2;
1a77920e
EM
17extern struct pxa_device_desc pxa910_device_twsi0;
18extern struct pxa_device_desc pxa910_device_twsi1;
a27ba768
EM
19extern struct pxa_device_desc pxa910_device_pwm1;
20extern struct pxa_device_desc pxa910_device_pwm2;
21extern struct pxa_device_desc pxa910_device_pwm3;
22extern struct pxa_device_desc pxa910_device_pwm4;
a0f266c1 23extern struct pxa_device_desc pxa910_device_nand;
75b1bdf5
NZ
24extern struct platform_device pxa168_device_u2o;
25extern struct platform_device pxa168_device_u2ootg;
26extern struct platform_device pxa168_device_u2oehci;
333893cd
ZZ
27extern struct pxa_device_desc pxa910_device_disp;
28extern struct pxa_device_desc pxa910_device_fb;
29extern struct pxa_device_desc pxa910_device_panel;
157d2644 30extern struct platform_device pxa910_device_gpio;
4128e275 31extern struct platform_device pxa910_device_rtc;
157d2644 32
14c6b5e7
EM
33static inline int pxa910_add_uart(int id)
34{
35 struct pxa_device_desc *d = NULL;
36
37 switch (id) {
38 case 1: d = &pxa910_device_uart1; break;
39 case 2: d = &pxa910_device_uart2; break;
40 }
41
42 if (d == NULL)
43 return -EINVAL;
44
45 return pxa_register_device(d, NULL, 0);
46}
1a77920e
EM
47
48static inline int pxa910_add_twsi(int id, struct i2c_pxa_platform_data *data,
49 struct i2c_board_info *info, unsigned size)
50{
51 struct pxa_device_desc *d = NULL;
52 int ret;
53
54 switch (id) {
55 case 0: d = &pxa910_device_twsi0; break;
56 case 1: d = &pxa910_device_twsi1; break;
57 default:
58 return -EINVAL;
59 }
60
61 ret = i2c_register_board_info(id, info, size);
62 if (ret)
63 return ret;
64
65 return pxa_register_device(d, data, sizeof(*data));
66}
a27ba768
EM
67
68static inline int pxa910_add_pwm(int id)
69{
70 struct pxa_device_desc *d = NULL;
71
72 switch (id) {
73 case 1: d = &pxa910_device_pwm1; break;
74 case 2: d = &pxa910_device_pwm2; break;
75 case 3: d = &pxa910_device_pwm3; break;
76 case 4: d = &pxa910_device_pwm4; break;
77 default:
78 return -EINVAL;
79 }
80
81 return pxa_register_device(d, NULL, 0);
82}
a0f266c1
HZ
83
84static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info)
85{
86 return pxa_register_device(&pxa910_device_nand, info, sizeof(*info));
87}
14c6b5e7 88#endif /* __ASM_MACH_PXA910_H */
This page took 0.387667 seconds and 5 git commands to generate.