1 #ifndef __ASM_MACH_PXA168_H
2 #define __ASM_MACH_PXA168_H
4 #include <linux/reboot.h>
6 extern void pxa168_timer_init(void);
7 extern void __init
icu_init_irq(void);
8 extern void __init
pxa168_init_irq(void);
9 extern void pxa168_restart(enum reboot_mode
, const char *);
10 extern void pxa168_clear_keypad_wakeup(void);
12 #include <linux/i2c.h>
13 #include <linux/i2c/pxa-i2c.h>
14 #include <mach/devices.h>
15 #include <linux/platform_data/mtd-nand-pxa3xx.h>
16 #include <video/pxa168fb.h>
17 #include <linux/platform_data/keypad-pxa27x.h>
18 #include <mach/cputype.h>
19 #include <linux/pxa168_eth.h>
20 #include <linux/platform_data/mv_usb.h>
22 extern struct pxa_device_desc pxa168_device_uart1
;
23 extern struct pxa_device_desc pxa168_device_uart2
;
24 extern struct pxa_device_desc pxa168_device_uart3
;
25 extern struct pxa_device_desc pxa168_device_twsi0
;
26 extern struct pxa_device_desc pxa168_device_twsi1
;
27 extern struct pxa_device_desc pxa168_device_pwm1
;
28 extern struct pxa_device_desc pxa168_device_pwm2
;
29 extern struct pxa_device_desc pxa168_device_pwm3
;
30 extern struct pxa_device_desc pxa168_device_pwm4
;
31 extern struct pxa_device_desc pxa168_device_ssp1
;
32 extern struct pxa_device_desc pxa168_device_ssp2
;
33 extern struct pxa_device_desc pxa168_device_ssp3
;
34 extern struct pxa_device_desc pxa168_device_ssp4
;
35 extern struct pxa_device_desc pxa168_device_ssp5
;
36 extern struct pxa_device_desc pxa168_device_nand
;
37 extern struct pxa_device_desc pxa168_device_fb
;
38 extern struct pxa_device_desc pxa168_device_keypad
;
39 extern struct pxa_device_desc pxa168_device_eth
;
41 /* pdata can be NULL */
42 extern int __init
pxa168_add_usb_host(struct mv_usb_platform_data
*pdata
);
45 extern struct platform_device pxa168_device_gpio
;
47 static inline int pxa168_add_uart(int id
)
49 struct pxa_device_desc
*d
= NULL
;
52 case 1: d
= &pxa168_device_uart1
; break;
53 case 2: d
= &pxa168_device_uart2
; break;
54 case 3: d
= &pxa168_device_uart3
; break;
60 return pxa_register_device(d
, NULL
, 0);
63 static inline int pxa168_add_twsi(int id
, struct i2c_pxa_platform_data
*data
,
64 struct i2c_board_info
*info
, unsigned size
)
66 struct pxa_device_desc
*d
= NULL
;
70 case 0: d
= &pxa168_device_twsi0
; break;
71 case 1: d
= &pxa168_device_twsi1
; break;
76 ret
= i2c_register_board_info(id
, info
, size
);
80 return pxa_register_device(d
, data
, sizeof(*data
));
83 static inline int pxa168_add_pwm(int id
)
85 struct pxa_device_desc
*d
= NULL
;
88 case 1: d
= &pxa168_device_pwm1
; break;
89 case 2: d
= &pxa168_device_pwm2
; break;
90 case 3: d
= &pxa168_device_pwm3
; break;
91 case 4: d
= &pxa168_device_pwm4
; break;
96 return pxa_register_device(d
, NULL
, 0);
99 static inline int pxa168_add_ssp(int id
)
101 struct pxa_device_desc
*d
= NULL
;
104 case 1: d
= &pxa168_device_ssp1
; break;
105 case 2: d
= &pxa168_device_ssp2
; break;
106 case 3: d
= &pxa168_device_ssp3
; break;
107 case 4: d
= &pxa168_device_ssp4
; break;
108 case 5: d
= &pxa168_device_ssp5
; break;
112 return pxa_register_device(d
, NULL
, 0);
115 static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data
*info
)
117 return pxa_register_device(&pxa168_device_nand
, info
, sizeof(*info
));
120 static inline int pxa168_add_fb(struct pxa168fb_mach_info
*mi
)
122 return pxa_register_device(&pxa168_device_fb
, mi
, sizeof(*mi
));
125 static inline int pxa168_add_keypad(struct pxa27x_keypad_platform_data
*data
)
128 data
->clear_wakeup_event
= pxa168_clear_keypad_wakeup
;
130 return pxa_register_device(&pxa168_device_keypad
, data
, sizeof(*data
));
133 static inline int pxa168_add_eth(struct pxa168_eth_platform_data
*data
)
135 return pxa_register_device(&pxa168_device_eth
, data
, sizeof(*data
));
137 #endif /* __ASM_MACH_PXA168_H */