aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorTakanari Hayama <taki@igel.co.jp>2008-12-21 21:05:03 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-12-22 04:44:49 -0500
commit7d91fcfcb91dde7bc4586154942862c1724b3519 (patch)
tree8eefa88104c5bd4786fc717772c3482f56eea80b /arch/sh
parentb0c50ad71746c4ad148f366135e3c87e32729108 (diff)
sh: add UIO support for JPU on SH7722.
Add JPU support on Migo-R via UIO. This make use of Magnus's generic UIO platform driver. Chunk of contiguous memory to hold intermediate image and compressed data during encode and decode. Signed-off-by: Takanari Hayama <taki@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-sh7722.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 9162013ec695..50cf6838ec41 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -148,6 +148,34 @@ static struct platform_device veu_device = {
148 .num_resources = ARRAY_SIZE(veu_resources), 148 .num_resources = ARRAY_SIZE(veu_resources),
149}; 149};
150 150
151static struct uio_info jpu_platform_data = {
152 .name = "JPU",
153 .version = "0",
154 .irq = 27,
155};
156
157static struct resource jpu_resources[] = {
158 [0] = {
159 .name = "JPU",
160 .start = 0xfea00000,
161 .end = 0xfea102d0,
162 .flags = IORESOURCE_MEM,
163 },
164 [1] = {
165 /* place holder for contiguous memory */
166 },
167};
168
169static struct platform_device jpu_device = {
170 .name = "uio_pdrv_genirq",
171 .id = 2,
172 .dev = {
173 .platform_data = &jpu_platform_data,
174 },
175 .resource = jpu_resources,
176 .num_resources = ARRAY_SIZE(jpu_resources),
177};
178
151static struct plat_sci_port sci_platform_data[] = { 179static struct plat_sci_port sci_platform_data[] = {
152 { 180 {
153 .mapbase = 0xffe00000, 181 .mapbase = 0xffe00000,
@@ -187,6 +215,7 @@ static struct platform_device *sh7722_devices[] __initdata = {
187 &sci_device, 215 &sci_device,
188 &vpu_device, 216 &vpu_device,
189 &veu_device, 217 &veu_device,
218 &jpu_device,
190}; 219};
191 220
192static int __init sh7722_devices_setup(void) 221static int __init sh7722_devices_setup(void)
@@ -196,9 +225,11 @@ static int __init sh7722_devices_setup(void)
196 clk_always_enable("rtc0"); /* RTC */ 225 clk_always_enable("rtc0"); /* RTC */
197 clk_always_enable("veu0"); /* VEU */ 226 clk_always_enable("veu0"); /* VEU */
198 clk_always_enable("vpu0"); /* VPU */ 227 clk_always_enable("vpu0"); /* VPU */
228 clk_always_enable("jpu0"); /* JPU */
199 229
200 platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); 230 platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
201 platform_resource_setup_memory(&veu_device, "veu", 2 << 20); 231 platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
232 platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20);
202 233
203 return platform_add_devices(sh7722_devices, 234 return platform_add_devices(sh7722_devices,
204 ARRAY_SIZE(sh7722_devices)); 235 ARRAY_SIZE(sh7722_devices));