aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100/neponset.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-24 18:17:37 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-09 10:34:16 -0500
commitd2e539a5ebd6b204037deb44c416a9e20b5d2354 (patch)
tree0be887425dea6ecd50df2832a531c600fb49fd96 /arch/arm/mach-sa1100/neponset.c
parentb6bdfcf5ae634fcb9dce0c16972cf39d90be6f74 (diff)
ARM: sa11x0: neponset: place smc91x and sa1111 resources in neponset device
Complete the neponset device resources by covering the children's memory resources in the parent neponset device. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-sa1100/neponset.c')
-rw-r--r--arch/arm/mach-sa1100/neponset.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index f4d587151770..2451a38aa2f0 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -179,6 +179,7 @@ static struct sa1111_platform_data sa1111_info = {
179static int __devinit neponset_probe(struct platform_device *dev) 179static int __devinit neponset_probe(struct platform_device *dev)
180{ 180{
181 struct neponset_drvdata *d; 181 struct neponset_drvdata *d;
182 struct resource *sa1111_res, *smc91x_res;
182 struct resource sa1111_resources[] = { 183 struct resource sa1111_resources[] = {
183 DEFINE_RES_MEM(0x40000000, SZ_8K), 184 DEFINE_RES_MEM(0x40000000, SZ_8K),
184 { .flags = IORESOURCE_IRQ }, 185 { .flags = IORESOURCE_IRQ },
@@ -213,6 +214,13 @@ static int __devinit neponset_probe(struct platform_device *dev)
213 if (ret < 0) 214 if (ret < 0)
214 goto err_alloc; 215 goto err_alloc;
215 216
217 smc91x_res = platform_get_resource(dev, IORESOURCE_MEM, 1);
218 sa1111_res = platform_get_resource(dev, IORESOURCE_MEM, 2);
219 if (!smc91x_res || !sa1111_res) {
220 ret = -ENXIO;
221 goto err_alloc;
222 }
223
216 d = kzalloc(sizeof(*d), GFP_KERNEL); 224 d = kzalloc(sizeof(*d), GFP_KERNEL);
217 if (!d) { 225 if (!d) {
218 ret = -ENOMEM; 226 ret = -ENOMEM;
@@ -258,10 +266,13 @@ static int __devinit neponset_probe(struct platform_device *dev)
258 /* Disable GPIO 0/1 drivers so the buttons work on the Assabet */ 266 /* Disable GPIO 0/1 drivers so the buttons work on the Assabet */
259 NCR_0 = NCR_GP01_OFF; 267 NCR_0 = NCR_GP01_OFF;
260 268
269 sa1111_resources[0].parent = sa1111_res;
261 sa1111_resources[1].start = d->irq_base + NEP_IRQ_SA1111; 270 sa1111_resources[1].start = d->irq_base + NEP_IRQ_SA1111;
262 sa1111_resources[1].end = d->irq_base + NEP_IRQ_SA1111; 271 sa1111_resources[1].end = d->irq_base + NEP_IRQ_SA1111;
263 d->sa1111 = platform_device_register_full(&sa1111_devinfo); 272 d->sa1111 = platform_device_register_full(&sa1111_devinfo);
264 273
274 smc91x_resources[0].parent = smc91x_res;
275 smc91x_resources[1].parent = smc91x_res;
265 smc91x_resources[2].start = d->irq_base + NEP_IRQ_SMC91X; 276 smc91x_resources[2].start = d->irq_base + NEP_IRQ_SMC91X;
266 smc91x_resources[2].end = d->irq_base + NEP_IRQ_SMC91X; 277 smc91x_resources[2].end = d->irq_base + NEP_IRQ_SMC91X;
267 d->smc91x = platform_device_register_full(&smc91x_devinfo); 278 d->smc91x = platform_device_register_full(&smc91x_devinfo);
@@ -331,6 +342,8 @@ static struct platform_driver neponset_device_driver = {
331 342
332static struct resource neponset_resources[] = { 343static struct resource neponset_resources[] = {
333 DEFINE_RES_MEM(0x10000000, 0x08000000), 344 DEFINE_RES_MEM(0x10000000, 0x08000000),
345 DEFINE_RES_MEM(0x18000000, 0x04000000),
346 DEFINE_RES_MEM(0x40000000, SZ_8K),
334 DEFINE_RES_IRQ(IRQ_GPIO25), 347 DEFINE_RES_IRQ(IRQ_GPIO25),
335}; 348};
336 349