* [PATCH] sh: export the sh7343 JPU to user space
@ 2008-12-25 9:55 Magnus Damm
2008-12-25 10:16 ` Paul Mundt
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2008-12-25 9:55 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm@igel.co.jp>
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>
---
arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 31 +++++++++++++++++++++++++++++++
arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 2 +-
2 files changed, 32 insertions(+), 1 deletion(-)
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7343.c 2008-12-25 18:45:26.000000000 +0900
@@ -112,6 +112,34 @@ static struct platform_device veu_device
.num_resources = ARRAY_SIZE(veu_resources),
};
+static struct uio_info jpu_platform_data = {
+ .name = "JPU",
+ .version = "0",
+ .irq = 27,
+};
+
+static struct resource jpu_resources[] = {
+ [0] = {
+ .name = "JPU",
+ .start = 0xfea00000,
+ .end = 0xfea102d3,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ /* place holder for contiguous memory */
+ },
+};
+
+static struct platform_device jpu_device = {
+ .name = "uio_pdrv_genirq",
+ .id = 2,
+ .dev = {
+ .platform_data = &jpu_platform_data,
+ },
+ .resource = jpu_resources,
+ .num_resources = ARRAY_SIZE(jpu_resources),
+};
+
static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xffe00000,
@@ -152,6 +180,7 @@ static struct platform_device *sh7343_de
&sci_device,
&vpu_device,
&veu_device,
+ &jpu_device,
};
static int __init sh7343_devices_setup(void)
@@ -160,9 +189,11 @@ static int __init sh7343_devices_setup(v
clk_always_enable("xymem0"); /* XYMEM */
clk_always_enable("veu0"); /* VEU */
clk_always_enable("vpu0"); /* VPU */
+ clk_always_enable("jpu0"); /* JPU */
platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20);
platform_resource_setup_memory(&veu_device, "veu", 2 << 20);
+ platform_resource_setup_memory(&jpu_device, "jpu", 2 << 20);
return platform_add_devices(sh7343_devices,
ARRAY_SIZE(sh7343_devices));
--- 0001/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ work/arch/sh/kernel/cpu/sh4a/setup-sh7722.c 2008-12-25 18:40:08.000000000 +0900
@@ -158,7 +158,7 @@ static struct resource jpu_resources[] [0] = {
.name = "JPU",
.start = 0xfea00000,
- .end = 0xfea102d0,
+ .end = 0xfea102d3,
.flags = IORESOURCE_MEM,
},
[1] = {
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] sh: export the sh7343 JPU to user space
2008-12-25 9:55 [PATCH] sh: export the sh7343 JPU to user space Magnus Damm
@ 2008-12-25 10:16 ` Paul Mundt
0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2008-12-25 10:16 UTC (permalink / raw)
To: linux-sh
On Thu, Dec 25, 2008 at 06:55:26PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> 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>
I'll add this and the others to the queue for the next merge, after Linus
pulls the current batch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-25 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-25 9:55 [PATCH] sh: export the sh7343 JPU to user space Magnus Damm
2008-12-25 10:16 ` Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox