diff options
Diffstat (limited to 'arch/arm/mach-vt8500/devices.h')
-rw-r--r-- | arch/arm/mach-vt8500/devices.h | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/arch/arm/mach-vt8500/devices.h b/arch/arm/mach-vt8500/devices.h new file mode 100644 index 000000000000..188d4e17f35c --- /dev/null +++ b/arch/arm/mach-vt8500/devices.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* linux/arch/arm/mach-vt8500/devices.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ARCH_ARM_MACH_VT8500_DEVICES_H | ||
17 | #define __ARCH_ARM_MACH_VT8500_DEVICES_H | ||
18 | |||
19 | #include <linux/platform_device.h> | ||
20 | #include <asm/mach/map.h> | ||
21 | |||
22 | void __init vt8500_init_irq(void); | ||
23 | void __init wm8505_init_irq(void); | ||
24 | void __init vt8500_map_io(void); | ||
25 | void __init wm8505_map_io(void); | ||
26 | void __init vt8500_reserve_mem(void); | ||
27 | void __init wm8505_reserve_mem(void); | ||
28 | void __init vt8500_gpio_init(void); | ||
29 | void __init vt8500_set_resources(void); | ||
30 | void __init wm8505_set_resources(void); | ||
31 | |||
32 | extern unsigned long wmt_ic_base __initdata; | ||
33 | extern unsigned long wmt_sic_base __initdata; | ||
34 | extern unsigned long wmt_gpio_base __initdata; | ||
35 | extern unsigned long wmt_pmc_base __initdata; | ||
36 | |||
37 | extern int wmt_nr_irqs __initdata; | ||
38 | extern int wmt_timer_irq __initdata; | ||
39 | extern int wmt_gpio_ext_irq[8] __initdata; | ||
40 | |||
41 | extern struct map_desc wmt_io_desc[2] __initdata; | ||
42 | |||
43 | static inline struct resource wmt_mmio_res(u32 start, u32 size) | ||
44 | { | ||
45 | struct resource tmp = { | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | .start = start, | ||
48 | .end = start + size - 1, | ||
49 | }; | ||
50 | |||
51 | return tmp; | ||
52 | } | ||
53 | |||
54 | static inline struct resource wmt_irq_res(int irq) | ||
55 | { | ||
56 | struct resource tmp = { | ||
57 | .flags = IORESOURCE_IRQ, | ||
58 | .start = irq, | ||
59 | .end = irq, | ||
60 | }; | ||
61 | |||
62 | return tmp; | ||
63 | } | ||
64 | |||
65 | static inline void wmt_res_add(struct platform_device *pdev, | ||
66 | const struct resource *res, unsigned int num) | ||
67 | { | ||
68 | if (unlikely(platform_device_add_resources(pdev, res, num))) | ||
69 | pr_err("Failed to assign resources\n"); | ||
70 | } | ||
71 | |||
72 | extern struct sys_timer vt8500_timer; | ||
73 | |||
74 | extern struct platform_device vt8500_device_uart0; | ||
75 | extern struct platform_device vt8500_device_uart1; | ||
76 | extern struct platform_device vt8500_device_uart2; | ||
77 | extern struct platform_device vt8500_device_uart3; | ||
78 | extern struct platform_device vt8500_device_uart4; | ||
79 | extern struct platform_device vt8500_device_uart5; | ||
80 | |||
81 | extern struct platform_device vt8500_device_lcdc; | ||
82 | extern struct platform_device vt8500_device_wm8505_fb; | ||
83 | extern struct platform_device vt8500_device_ehci; | ||
84 | extern struct platform_device vt8500_device_ge_rops; | ||
85 | extern struct platform_device vt8500_device_pwm; | ||
86 | extern struct platform_device vt8500_device_pwmbl; | ||
87 | extern struct platform_device vt8500_device_rtc; | ||
88 | #endif | ||