diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-07-15 08:55:03 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:34 -0400 |
commit | 714750dd5c6aef8e204d35ba28c1be9641418671 (patch) | |
tree | db0561b346ed1f79242f5f779376856d64955e83 /arch | |
parent | 6874548c69d02fabb8bea12d8c0f5600c1176769 (diff) |
sh: Export sh7366 VPU, VEU(1), VEU(2) using uio_pdrv_genirq
This patch exports the VPU, VEU(1) and VEU(2) blocks of the sh7366
to user space using the uio_pdrv_genirq platform driver.
While at it, fix up the VEU(2) interrupt vector.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 81 |
1 files changed, 80 insertions, 1 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index add99e4f335..2a0fbc3ed9c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/serial.h> | 14 | #include <linux/serial.h> |
15 | #include <linux/serial_sci.h> | 15 | #include <linux/serial_sci.h> |
16 | #include <linux/uio_driver.h> | ||
16 | 17 | ||
17 | static struct resource iic_resources[] = { | 18 | static struct resource iic_resources[] = { |
18 | [0] = { | 19 | [0] = { |
@@ -34,6 +35,81 @@ static struct platform_device iic_device = { | |||
34 | .resource = iic_resources, | 35 | .resource = iic_resources, |
35 | }; | 36 | }; |
36 | 37 | ||
38 | static struct uio_info vpu_platform_data = { | ||
39 | .name = "VPU5", | ||
40 | .version = "0", | ||
41 | .irq = 60, | ||
42 | }; | ||
43 | |||
44 | static struct resource vpu_resources[] = { | ||
45 | [0] = { | ||
46 | .name = "VPU", | ||
47 | .start = 0xfe900000, | ||
48 | .end = 0xfe902807, | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static struct platform_device vpu_device = { | ||
54 | .name = "uio_pdrv_genirq", | ||
55 | .id = 0, | ||
56 | .dev = { | ||
57 | .platform_data = &vpu_platform_data, | ||
58 | }, | ||
59 | .resource = vpu_resources, | ||
60 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
61 | }; | ||
62 | |||
63 | static struct uio_info veu0_platform_data = { | ||
64 | .name = "VEU", | ||
65 | .version = "0", | ||
66 | .irq = 54, | ||
67 | }; | ||
68 | |||
69 | static struct resource veu0_resources[] = { | ||
70 | [0] = { | ||
71 | .name = "VEU(1)", | ||
72 | .start = 0xfe920000, | ||
73 | .end = 0xfe9200b7, | ||
74 | .flags = IORESOURCE_MEM, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct platform_device veu0_device = { | ||
79 | .name = "uio_pdrv_genirq", | ||
80 | .id = 1, | ||
81 | .dev = { | ||
82 | .platform_data = &veu0_platform_data, | ||
83 | }, | ||
84 | .resource = veu0_resources, | ||
85 | .num_resources = ARRAY_SIZE(veu0_resources), | ||
86 | }; | ||
87 | |||
88 | static struct uio_info veu1_platform_data = { | ||
89 | .name = "VEU", | ||
90 | .version = "0", | ||
91 | .irq = 27, | ||
92 | }; | ||
93 | |||
94 | static struct resource veu1_resources[] = { | ||
95 | [0] = { | ||
96 | .name = "VEU(2)", | ||
97 | .start = 0xfe924000, | ||
98 | .end = 0xfe9240b7, | ||
99 | .flags = IORESOURCE_MEM, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | static struct platform_device veu1_device = { | ||
104 | .name = "uio_pdrv_genirq", | ||
105 | .id = 2, | ||
106 | .dev = { | ||
107 | .platform_data = &veu1_platform_data, | ||
108 | }, | ||
109 | .resource = veu1_resources, | ||
110 | .num_resources = ARRAY_SIZE(veu1_resources), | ||
111 | }; | ||
112 | |||
37 | static struct plat_sci_port sci_platform_data[] = { | 113 | static struct plat_sci_port sci_platform_data[] = { |
38 | { | 114 | { |
39 | .mapbase = 0xffe00000, | 115 | .mapbase = 0xffe00000, |
@@ -56,6 +132,9 @@ static struct platform_device sci_device = { | |||
56 | static struct platform_device *sh7366_devices[] __initdata = { | 132 | static struct platform_device *sh7366_devices[] __initdata = { |
57 | &iic_device, | 133 | &iic_device, |
58 | &sci_device, | 134 | &sci_device, |
135 | &vpu_device, | ||
136 | &veu0_device, | ||
137 | &veu1_device, | ||
59 | }; | 138 | }; |
60 | 139 | ||
61 | static int __init sh7366_devices_setup(void) | 140 | static int __init sh7366_devices_setup(void) |
@@ -118,7 +197,7 @@ static struct intc_vect vectors[] __initdata = { | |||
118 | INTC_VECT(SIU, 0xf80), | 197 | INTC_VECT(SIU, 0xf80), |
119 | INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420), | 198 | INTC_VECT(TMU0, 0x400), INTC_VECT(TMU1, 0x420), |
120 | INTC_VECT(TMU2, 0x440), | 199 | INTC_VECT(TMU2, 0x440), |
121 | INTC_VECT(VEU2, 0x580), INTC_VECT(LCDC, 0x580), | 200 | INTC_VECT(VEU2, 0x560), INTC_VECT(LCDC, 0x580), |
122 | }; | 201 | }; |
123 | 202 | ||
124 | static struct intc_group groups[] __initdata = { | 203 | static struct intc_group groups[] __initdata = { |