diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-12-25 04:55:26 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-01-21 03:44:26 -0500 |
commit | 3442c0d627985778ef275985831f8fdb5d626c25 (patch) | |
tree | 8951e5c3edaf7d70fcaed0ad253027ff5815156a /arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |
parent | 5e8766f1c1f747522350eba385c584a862f47e4c (diff) |
sh: export the sh7343 JPU to user space
This patch exports the sh7343 JPU to user space using uio_pdrv_genirq,
very similar to the sh7722 JPU patch by Hayama-san.
While at it fix up the end of the sh7722 JPU iomem resource.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7343.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 0623e377f488..4ff4dc64520c 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -112,6 +112,34 @@ static struct platform_device veu_device = { | |||
112 | .num_resources = ARRAY_SIZE(veu_resources), | 112 | .num_resources = ARRAY_SIZE(veu_resources), |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static struct uio_info jpu_platform_data = { | ||
116 | .name = "JPU", | ||
117 | .version = "0", | ||
118 | .irq = 27, | ||
119 | }; | ||
120 | |||
121 | static struct resource jpu_resources[] = { | ||
122 | [0] = { | ||
123 | .name = "JPU", | ||
124 | .start = 0xfea00000, | ||
125 | .end = 0xfea102d3, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }, | ||
128 | [1] = { | ||
129 | /* place holder for contiguous memory */ | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device jpu_device = { | ||
134 | .name = "uio_pdrv_genirq", | ||
135 | .id = 2, | ||
136 | .dev = { | ||
137 | .platform_data = &jpu_platform_data, | ||
138 | }, | ||
139 | .resource = jpu_resources, | ||
140 | .num_resources = ARRAY_SIZE(jpu_resources), | ||
141 | }; | ||
142 | |||
115 | static struct plat_sci_port sci_platform_data[] = { | 143 | static struct plat_sci_port sci_platform_data[] = { |
116 | { | 144 | { |
117 | .mapbase = 0xffe00000, | 145 | .mapbase = 0xffe00000, |
@@ -152,6 +180,7 @@ static struct platform_device *sh7343_devices[] __initdata = { | |||
152 | &sci_device, | 180 | &sci_device, |
153 | &vpu_device, | 181 | &vpu_device, |
154 | &veu_device, | 182 | &veu_device, |
183 | &jpu_device, | ||
155 | }; | 184 | }; |
156 | 185 | ||
157 | static int __init sh7343_devices_setup(void) | 186 | static int __init sh7343_devices_setup(void) |
@@ -160,9 +189,11 @@ static int __init sh7343_devices_setup(void) | |||
160 | clk_always_enable("xymem0"); /* XYMEM */ | 189 | clk_always_enable("xymem0"); /* XYMEM */ |
161 | clk_always_enable("veu0"); /* VEU */ | 190 | clk_always_enable("veu0"); /* VEU */ |
162 | clk_always_enable("vpu0"); /* VPU */ | 191 | clk_always_enable("vpu0"); /* VPU */ |
192 | clk_always_enable("jpu0"); /* JPU */ | ||
163 | 193 | ||
164 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | 194 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); |
165 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | 195 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); |
196 | platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20); | ||
166 | 197 | ||
167 | return platform_add_devices(sh7343_devices, | 198 | return platform_add_devices(sh7343_devices, |
168 | ARRAY_SIZE(sh7343_devices)); | 199 | ARRAY_SIZE(sh7343_devices)); |