@@ -88,7 +88,7 @@ static struct resource vpu_resources[] =
static struct platform_device vpu_device = {
.name = "uio_pdrv_genirq",
- .id = 0,
+ .id = 1,
.dev = {
.platform_data = &vpu_platform_data,
},
@@ -116,7 +116,7 @@ static struct resource veu0_resources[]
static struct platform_device veu0_device = {
.name = "uio_pdrv_genirq",
- .id = 1,
+ .id = 2,
.dev = {
.platform_data = &veu0_platform_data,
},
@@ -144,7 +144,7 @@ static struct resource veu1_resources[]
static struct platform_device veu1_device = {
.name = "uio_pdrv_genirq",
- .id = 2,
+ .id = 3,
.dev = {
.platform_data = &veu1_platform_data,
},
@@ -130,7 +130,7 @@ static struct resource vpu_resources[] =
static struct platform_device vpu_device = {
.name = "uio_pdrv_genirq",
- .id = 0,
+ .id = 1,
.dev = {
.platform_data = &vpu_platform_data,
},
@@ -161,7 +161,7 @@ static struct resource veu_resources[] =
static struct platform_device veu_device = {
.name = "uio_pdrv_genirq",
- .id = 1,
+ .id = 2,
.dev = {
.platform_data = &veu_platform_data,
},
@@ -192,7 +192,7 @@ static struct resource jpu_resources[] =
static struct platform_device jpu_device = {
.name = "uio_pdrv_genirq",
- .id = 2,
+ .id = 3,
.dev = {
.platform_data = &jpu_platform_data,
},
@@ -40,7 +40,7 @@ static struct resource vpu_resources[] =
static struct platform_device vpu_device = {
.name = "uio_pdrv_genirq",
- .id = 0,
+ .id = 1,
.dev = {
.platform_data = &vpu_platform_data,
},
@@ -71,7 +71,7 @@ static struct resource veu0_resources[]
static struct platform_device veu0_device = {
.name = "uio_pdrv_genirq",
- .id = 1,
+ .id = 2,
.dev = {
.platform_data = &veu0_platform_data,
},
@@ -102,7 +102,7 @@ static struct resource veu1_resources[]
static struct platform_device veu1_device = {
.name = "uio_pdrv_genirq",
- .id = 2,
+ .id = 3,
.dev = {
.platform_data = &veu1_platform_data,
},
@@ -180,7 +180,7 @@ static struct resource vpu_resources[] =
static struct platform_device vpu_device = {
.name = "uio_pdrv_genirq",
- .id = 0,
+ .id = 1,
.dev = {
.platform_data = &vpu_platform_data,
},
@@ -212,7 +212,7 @@ static struct resource veu0_resources[]
static struct platform_device veu0_device = {
.name = "uio_pdrv_genirq",
- .id = 1,
+ .id = 2,
.dev = {
.platform_data = &veu0_platform_data,
},
@@ -244,7 +244,7 @@ static struct resource veu1_resources[]
static struct platform_device veu1_device = {
.name = "uio_pdrv_genirq",
- .id = 2,
+ .id = 3,
.dev = {
.platform_data = &veu1_platform_data,
},
@@ -512,7 +512,7 @@ static struct resource jpu_resources[] =
static struct platform_device jpu_device = {
.name = "uio_pdrv_genirq",
- .id = 3,
+ .id = 4,
.dev = {
.platform_data = &jpu_platform_data,
},
@@ -6,3 +6,4 @@
obj-$(CONFIG_PM) += pm.o sleep.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
obj-$(CONFIG_PM_RUNTIME) += pm_runtime.o
+obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_memory.o
@@ -0,0 +1,42 @@
+/*
+ * Physical contiguous memory for UIO devices
+ *
+ * Copyright (C) 2009 Magnus Damm
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+#include <linux/platform_device.h>
+#include <linux/init.h>
+#include <linux/uio_driver.h>
+
+static struct uio_info mem_platform_data = {
+ .name = "uio_memory",
+ .version = "0",
+ .irq = UIO_IRQ_NONE,
+};
+
+static struct resource mem_resources[] = {
+ [0] = {
+ /* place holder for contiguous memory */
+ },
+};
+
+static struct platform_device mem_device = {
+ .name = "uio_pdrv_genirq",
+ .id = 0,
+ .dev = {
+ .platform_data = &mem_platform_data,
+ },
+ .resource = mem_resources,
+ .num_resources = ARRAY_SIZE(mem_resources),
+};
+
+static int __init mem_devices_setup(void)
+{
+ platform_resource_setup_memory(&mem_device, "uio_memory", 0);
+
+ return platform_device_register(&mem_device);
+}
+arch_initcall(mem_devices_setup);