aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-07-15 08:55:03 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 05:10:34 -0400
commit714750dd5c6aef8e204d35ba28c1be9641418671 (patch)
treedb0561b346ed1f79242f5f779376856d64955e83 /arch
parent6874548c69d02fabb8bea12d8c0f5600c1176769 (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.c81
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 add99e4f335f..2a0fbc3ed9c2 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
17static struct resource iic_resources[] = { 18static 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
38static struct uio_info vpu_platform_data = {
39 .name = "VPU5",
40 .version = "0",
41 .irq = 60,
42};
43
44static struct resource vpu_resources[] = {
45 [0] = {
46 .name = "VPU",
47 .start = 0xfe900000,
48 .end = 0xfe902807,
49 .flags = IORESOURCE_MEM,
50 },
51};
52
53static 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
63static struct uio_info veu0_platform_data = {
64 .name = "VEU",
65 .version = "0",
66 .irq = 54,
67};
68
69static struct resource veu0_resources[] = {
70 [0] = {
71 .name = "VEU(1)",
72 .start = 0xfe920000,
73 .end = 0xfe9200b7,
74 .flags = IORESOURCE_MEM,
75 },
76};
77
78static 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
88static struct uio_info veu1_platform_data = {
89 .name = "VEU",
90 .version = "0",
91 .irq = 27,
92};
93
94static struct resource veu1_resources[] = {
95 [0] = {
96 .name = "VEU(2)",
97 .start = 0xfe924000,
98 .end = 0xfe9240b7,
99 .flags = IORESOURCE_MEM,
100 },
101};
102
103static 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
37static struct plat_sci_port sci_platform_data[] = { 113static 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 = {
56static struct platform_device *sh7366_devices[] __initdata = { 132static 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
61static int __init sh7366_devices_setup(void) 140static 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
124static struct intc_group groups[] __initdata = { 203static struct intc_group groups[] __initdata = {