diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-07-15 08:53:33 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:34 -0400 |
commit | 6874548c69d02fabb8bea12d8c0f5600c1176769 (patch) | |
tree | 00ec84f3ff7fdf55e3335bc1084e08d924b2fb96 /arch/sh | |
parent | a55f6d2567008699d705a006f2432bf3e872b743 (diff) |
sh: Export sh7723 VPU, VEU2H0, VEU2H1 using uio_pdrv_genirq
This patch exports the VPU, VEU2H0 and VEU2H1 blocks of the sh7723
to user space using the uio_pdrv_genirq platform driver.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 1b4533bfdae5..1f3137ad0136 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -12,8 +12,84 @@ | |||
12 | #include <linux/serial.h> | 12 | #include <linux/serial.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <linux/serial_sci.h> | 14 | #include <linux/serial_sci.h> |
15 | #include <linux/uio_driver.h> | ||
15 | #include <asm/mmzone.h> | 16 | #include <asm/mmzone.h> |
16 | 17 | ||
18 | static struct uio_info vpu_platform_data = { | ||
19 | .name = "VPU5", | ||
20 | .version = "0", | ||
21 | .irq = 60, | ||
22 | }; | ||
23 | |||
24 | static struct resource vpu_resources[] = { | ||
25 | [0] = { | ||
26 | .name = "VPU", | ||
27 | .start = 0xfe900000, | ||
28 | .end = 0xfe902807, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | }; | ||
32 | |||
33 | static struct platform_device vpu_device = { | ||
34 | .name = "uio_pdrv_genirq", | ||
35 | .id = 0, | ||
36 | .dev = { | ||
37 | .platform_data = &vpu_platform_data, | ||
38 | }, | ||
39 | .resource = vpu_resources, | ||
40 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
41 | }; | ||
42 | |||
43 | static struct uio_info veu0_platform_data = { | ||
44 | .name = "VEU", | ||
45 | .version = "0", | ||
46 | .irq = 54, | ||
47 | }; | ||
48 | |||
49 | static struct resource veu0_resources[] = { | ||
50 | [0] = { | ||
51 | .name = "VEU2H0", | ||
52 | .start = 0xfe920000, | ||
53 | .end = 0xfe92027b, | ||
54 | .flags = IORESOURCE_MEM, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static struct platform_device veu0_device = { | ||
59 | .name = "uio_pdrv_genirq", | ||
60 | .id = 1, | ||
61 | .dev = { | ||
62 | .platform_data = &veu0_platform_data, | ||
63 | }, | ||
64 | .resource = veu0_resources, | ||
65 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
66 | }; | ||
67 | |||
68 | static struct uio_info veu1_platform_data = { | ||
69 | .name = "VEU", | ||
70 | .version = "0", | ||
71 | .irq = 27, | ||
72 | }; | ||
73 | |||
74 | static struct resource veu1_resources[] = { | ||
75 | [0] = { | ||
76 | .name = "VEU2H1", | ||
77 | .start = 0xfe924000, | ||
78 | .end = 0xfe92427b, | ||
79 | .flags = IORESOURCE_MEM, | ||
80 | }, | ||
81 | }; | ||
82 | |||
83 | static struct platform_device veu1_device = { | ||
84 | .name = "uio_pdrv_genirq", | ||
85 | .id = 2, | ||
86 | .dev = { | ||
87 | .platform_data = &veu1_platform_data, | ||
88 | }, | ||
89 | .resource = veu1_resources, | ||
90 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
91 | }; | ||
92 | |||
17 | static struct plat_sci_port sci_platform_data[] = { | 93 | static struct plat_sci_port sci_platform_data[] = { |
18 | { | 94 | { |
19 | .mapbase = 0xffe00000, | 95 | .mapbase = 0xffe00000, |
@@ -138,6 +214,9 @@ static struct platform_device *sh7723_devices[] __initdata = { | |||
138 | &rtc_device, | 214 | &rtc_device, |
139 | &iic_device, | 215 | &iic_device, |
140 | &sh7723_usb_host_device, | 216 | &sh7723_usb_host_device, |
217 | &vpu_device, | ||
218 | &veu0_device, | ||
219 | &veu1_device, | ||
141 | }; | 220 | }; |
142 | 221 | ||
143 | static int __init sh7723_devices_setup(void) | 222 | static int __init sh7723_devices_setup(void) |