aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-07-15 08:52:19 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 05:10:34 -0400
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 d8617b669fad..39854d9413cf 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -12,6 +12,7 @@
12#include <linux/serial.h> 12#include <linux/serial.h>
13#include <linux/serial_sci.h> 13#include <linux/serial_sci.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/uio_driver.h>
15#include <asm/mmzone.h> 16#include <asm/mmzone.h>
16 17
17static struct resource usbf_resources[] = { 18static struct resource usbf_resources[] = {
@@ -59,6 +60,56 @@ static struct platform_device iic_device = {
59 .resource = iic_resources, 60 .resource = iic_resources,
60}; 61};
61 62
63static struct uio_info vpu_platform_data = {
64 .name = "VPU4",
65 .version = "0",
66 .irq = 60,
67};
68
69static struct resource vpu_resources[] = {
70 [0] = {
71 .name = "VPU",
72 .start = 0xfe900000,
73 .end = 0xfe9022eb,
74 .flags = IORESOURCE_MEM,
75 },
76};
77
78static struct platform_device vpu_device = {
79 .name = "uio_pdrv_genirq",
80 .id = 0,
81 .dev = {
82 .platform_data = &vpu_platform_data,
83 },
84 .resource = vpu_resources,
85 .num_resources = ARRAY_SIZE(vpu_resources),
86};
87
88static struct uio_info veu_platform_data = {
89 .name = "VEU",
90 .version = "0",
91 .irq = 54,
92};
93
94static struct resource veu_resources[] = {
95 [0] = {
96 .name = "VEU",
97 .start = 0xfe920000,
98 .end = 0xfe9200b7,
99 .flags = IORESOURCE_MEM,
100 },
101};
102
103static struct platform_device veu_device = {
104 .name = "uio_pdrv_genirq",
105 .id = 1,
106 .dev = {
107 .platform_data = &veu_platform_data,
108 },
109 .resource = veu_resources,
110 .num_resources = ARRAY_SIZE(veu_resources),
111};
112
62static struct plat_sci_port sci_platform_data[] = { 113static struct plat_sci_port sci_platform_data[] = {
63 { 114 {
64 .mapbase = 0xffe00000, 115 .mapbase = 0xffe00000,
@@ -95,6 +146,8 @@ static struct platform_device *sh7722_devices[] __initdata = {
95 &usbf_device, 146 &usbf_device,
96 &iic_device, 147 &iic_device,
97 &sci_device, 148 &sci_device,
149 &vpu_device,
150 &veu_device,
98}; 151};
99 152
100static int __init sh7722_devices_setup(void) 153static int __init sh7722_devices_setup(void)