diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-07-16 06:02:54 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 05:10:35 -0400 |
commit | 1eca5c92729a83f64826d15a9ecb1652dda54bcb (patch) | |
tree | 95753726159c945deccef68d4b54de9f4d5ec756 /arch/sh/kernel | |
parent | 714750dd5c6aef8e204d35ba28c1be9641418671 (diff) |
sh: Add memory chunks to SH-Mobile UIO devices
This patch adds physically contiguous memory chunks to the UIO devices.
The same strategy can be used in the future for the CEU as well.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 12 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 8 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 12 |
4 files changed, 40 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index bcc4255acd84..79ce34e19a2e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -66,6 +66,9 @@ static struct resource vpu_resources[] = { | |||
66 | .end = 0xfe9022eb, | 66 | .end = 0xfe9022eb, |
67 | .flags = IORESOURCE_MEM, | 67 | .flags = IORESOURCE_MEM, |
68 | }, | 68 | }, |
69 | [1] = { | ||
70 | /* place holder for contiguous memory */ | ||
71 | }, | ||
69 | }; | 72 | }; |
70 | 73 | ||
71 | static struct platform_device vpu_device = { | 74 | static struct platform_device vpu_device = { |
@@ -91,6 +94,9 @@ static struct resource veu_resources[] = { | |||
91 | .end = 0xfe9200b7, | 94 | .end = 0xfe9200b7, |
92 | .flags = IORESOURCE_MEM, | 95 | .flags = IORESOURCE_MEM, |
93 | }, | 96 | }, |
97 | [1] = { | ||
98 | /* place holder for contiguous memory */ | ||
99 | }, | ||
94 | }; | 100 | }; |
95 | 101 | ||
96 | static struct platform_device veu_device = { | 102 | static struct platform_device veu_device = { |
@@ -132,6 +138,8 @@ static struct platform_device *sh7343_devices[] __initdata = { | |||
132 | 138 | ||
133 | static int __init sh7343_devices_setup(void) | 139 | static int __init sh7343_devices_setup(void) |
134 | { | 140 | { |
141 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | ||
142 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | ||
135 | return platform_add_devices(sh7343_devices, | 143 | return platform_add_devices(sh7343_devices, |
136 | ARRAY_SIZE(sh7343_devices)); | 144 | ARRAY_SIZE(sh7343_devices)); |
137 | } | 145 | } |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 2a0fbc3ed9c2..7ee01757f3fe 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c | |||
@@ -48,6 +48,9 @@ static struct resource vpu_resources[] = { | |||
48 | .end = 0xfe902807, | 48 | .end = 0xfe902807, |
49 | .flags = IORESOURCE_MEM, | 49 | .flags = IORESOURCE_MEM, |
50 | }, | 50 | }, |
51 | [1] = { | ||
52 | /* place holder for contiguous memory */ | ||
53 | }, | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | static struct platform_device vpu_device = { | 56 | static struct platform_device vpu_device = { |
@@ -73,6 +76,9 @@ static struct resource veu0_resources[] = { | |||
73 | .end = 0xfe9200b7, | 76 | .end = 0xfe9200b7, |
74 | .flags = IORESOURCE_MEM, | 77 | .flags = IORESOURCE_MEM, |
75 | }, | 78 | }, |
79 | [1] = { | ||
80 | /* place holder for contiguous memory */ | ||
81 | }, | ||
76 | }; | 82 | }; |
77 | 83 | ||
78 | static struct platform_device veu0_device = { | 84 | static struct platform_device veu0_device = { |
@@ -98,6 +104,9 @@ static struct resource veu1_resources[] = { | |||
98 | .end = 0xfe9240b7, | 104 | .end = 0xfe9240b7, |
99 | .flags = IORESOURCE_MEM, | 105 | .flags = IORESOURCE_MEM, |
100 | }, | 106 | }, |
107 | [1] = { | ||
108 | /* place holder for contiguous memory */ | ||
109 | }, | ||
101 | }; | 110 | }; |
102 | 111 | ||
103 | static struct platform_device veu1_device = { | 112 | static struct platform_device veu1_device = { |
@@ -139,6 +148,9 @@ static struct platform_device *sh7366_devices[] __initdata = { | |||
139 | 148 | ||
140 | static int __init sh7366_devices_setup(void) | 149 | static int __init sh7366_devices_setup(void) |
141 | { | 150 | { |
151 | platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20); | ||
152 | platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); | ||
153 | platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); | ||
142 | return platform_add_devices(sh7366_devices, | 154 | return platform_add_devices(sh7366_devices, |
143 | ARRAY_SIZE(sh7366_devices)); | 155 | ARRAY_SIZE(sh7366_devices)); |
144 | } | 156 | } |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 39854d9413cf..6015f842edad 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -73,6 +73,9 @@ static struct resource vpu_resources[] = { | |||
73 | .end = 0xfe9022eb, | 73 | .end = 0xfe9022eb, |
74 | .flags = IORESOURCE_MEM, | 74 | .flags = IORESOURCE_MEM, |
75 | }, | 75 | }, |
76 | [1] = { | ||
77 | /* place holder for contiguous memory */ | ||
78 | }, | ||
76 | }; | 79 | }; |
77 | 80 | ||
78 | static struct platform_device vpu_device = { | 81 | static struct platform_device vpu_device = { |
@@ -98,6 +101,9 @@ static struct resource veu_resources[] = { | |||
98 | .end = 0xfe9200b7, | 101 | .end = 0xfe9200b7, |
99 | .flags = IORESOURCE_MEM, | 102 | .flags = IORESOURCE_MEM, |
100 | }, | 103 | }, |
104 | [1] = { | ||
105 | /* place holder for contiguous memory */ | ||
106 | }, | ||
101 | }; | 107 | }; |
102 | 108 | ||
103 | static struct platform_device veu_device = { | 109 | static struct platform_device veu_device = { |
@@ -152,6 +158,8 @@ static struct platform_device *sh7722_devices[] __initdata = { | |||
152 | 158 | ||
153 | static int __init sh7722_devices_setup(void) | 159 | static int __init sh7722_devices_setup(void) |
154 | { | 160 | { |
161 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | ||
162 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | ||
155 | return platform_add_devices(sh7722_devices, | 163 | return platform_add_devices(sh7722_devices, |
156 | ARRAY_SIZE(sh7722_devices)); | 164 | ARRAY_SIZE(sh7722_devices)); |
157 | } | 165 | } |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 1f3137ad0136..cb5e6f822e64 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -28,6 +28,9 @@ static struct resource vpu_resources[] = { | |||
28 | .end = 0xfe902807, | 28 | .end = 0xfe902807, |
29 | .flags = IORESOURCE_MEM, | 29 | .flags = IORESOURCE_MEM, |
30 | }, | 30 | }, |
31 | [1] = { | ||
32 | /* place holder for contiguous memory */ | ||
33 | }, | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | static struct platform_device vpu_device = { | 36 | static struct platform_device vpu_device = { |
@@ -53,6 +56,9 @@ static struct resource veu0_resources[] = { | |||
53 | .end = 0xfe92027b, | 56 | .end = 0xfe92027b, |
54 | .flags = IORESOURCE_MEM, | 57 | .flags = IORESOURCE_MEM, |
55 | }, | 58 | }, |
59 | [1] = { | ||
60 | /* place holder for contiguous memory */ | ||
61 | }, | ||
56 | }; | 62 | }; |
57 | 63 | ||
58 | static struct platform_device veu0_device = { | 64 | static struct platform_device veu0_device = { |
@@ -78,6 +84,9 @@ static struct resource veu1_resources[] = { | |||
78 | .end = 0xfe92427b, | 84 | .end = 0xfe92427b, |
79 | .flags = IORESOURCE_MEM, | 85 | .flags = IORESOURCE_MEM, |
80 | }, | 86 | }, |
87 | [1] = { | ||
88 | /* place holder for contiguous memory */ | ||
89 | }, | ||
81 | }; | 90 | }; |
82 | 91 | ||
83 | static struct platform_device veu1_device = { | 92 | static struct platform_device veu1_device = { |
@@ -221,6 +230,9 @@ static struct platform_device *sh7723_devices[] __initdata = { | |||
221 | 230 | ||
222 | static int __init sh7723_devices_setup(void) | 231 | static int __init sh7723_devices_setup(void) |
223 | { | 232 | { |
233 | platform_resource_setup_memory(&vpu_device, "vpu", 2 << 20); | ||
234 | platform_resource_setup_memory(&veu0_device, "veu0", 2 << 20); | ||
235 | platform_resource_setup_memory(&veu1_device, "veu1", 2 << 20); | ||
224 | return platform_add_devices(sh7723_devices, | 236 | return platform_add_devices(sh7723_devices, |
225 | ARRAY_SIZE(sh7723_devices)); | 237 | ARRAY_SIZE(sh7723_devices)); |
226 | } | 238 | } |