aboutsummaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-07-15 21:52:19 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 18:10:34 +0900
commita55f6d2567008699d705a006f2432bf3e872b743 (patch)
treed6bf2d9dfbc54f8d0fe0432a24889fd4fe21e6ce /arch/sh
parentc901c96cc25f6143a7d2fb59c3287f868e84a69e (diff)
sh: Export sh7722 VPU and VEU using uio_pdrv_genirq
This patch exports the VPU and VEU blocks of the sh7722 to user space using the uio_pdrv_genirq platform driver. Signed-off-by: Magnus Damm <damm@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.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index d8617b669fa..39854d9413c 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -12,6 +12,7 @@
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/mm.h>
+#include <linux/uio_driver.h>
#include <asm/mmzone.h>
static struct resource usbf_resources[] = {
@@ -59,6 +60,56 @@ static struct platform_device iic_device = {
.resource = iic_resources,
};
+static struct uio_info vpu_platform_data = {
+ .name = "VPU4",
+ .version = "0",
+ .irq = 60,
+};
+
+static struct resource vpu_resources[] = {
+ [0] = {
+ .name = "VPU",
+ .start = 0xfe900000,
+ .end = 0xfe9022eb,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device vpu_device = {
+ .name = "uio_pdrv_genirq",
+ .id = 0,
+ .dev = {
+ .platform_data = &vpu_platform_data,
+ },
+ .resource = vpu_resources,
+ .num_resources = ARRAY_SIZE(vpu_resources),
+};
+
+static struct uio_info veu_platform_data = {
+ .name = "VEU",
+ .version = "0",
+ .irq = 54,
+};
+
+static struct resource veu_resources[] = {
+ [0] = {
+ .name = "VEU",
+ .start = 0xfe920000,
+ .end = 0xfe9200b7,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device veu_device = {
+ .name = "uio_pdrv_genirq",
+ .id = 1,
+ .dev = {
+ .platform_data = &veu_platform_data,
+ },
+ .resource = veu_resources,
+ .num_resources = ARRAY_SIZE(veu_resources),
+};
+
static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xffe00000,
@@ -95,6 +146,8 @@ static struct platform_device *sh7722_devices[] __initdata = {
&usbf_device,
&iic_device,
&sci_device,
+ &vpu_device,
+ &veu_device,
};
static int __init sh7722_devices_setup(void)