--- zzzz-none-000/linux-2.6.19.2/arch/powerpc/platforms/cell/spu_base.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/arch/powerpc/platforms/cell/spu_base.c 2007-01-11 07:38:19.000000000 +0000 @@ -655,19 +655,14 @@ for (i=0; i < 3; i++) { ret = of_irq_map_one(np, i, &oirq); - if (ret) { - pr_debug("spu_new: failed to get irq %d\n", i); + if (ret) goto err; - } + ret = -EINVAL; - pr_debug(" irq %d no 0x%x on %s\n", i, oirq.specifier[0], - oirq.controller->full_name); spu->irqs[i] = irq_create_of_mapping(oirq.controller, oirq.specifier, oirq.size); - if (spu->irqs[i] == NO_IRQ) { - pr_debug("spu_new: failed to map it !\n"); + if (spu->irqs[i] == NO_IRQ) goto err; - } } return 0; @@ -686,7 +681,7 @@ struct resource resource = { }; int ret; - ret = of_address_to_resource(node, nr, &resource); + ret = of_address_to_resource(node, 0, &resource); if (ret) goto out; @@ -709,42 +704,22 @@ ret = spu_map_resource(node, 0, (void __iomem**)&spu->local_store, &spu->local_store_phys); - if (ret) { - pr_debug("spu_new: failed to map %s resource 0\n", - node->full_name); + if (ret) goto out; - } ret = spu_map_resource(node, 1, (void __iomem**)&spu->problem, &spu->problem_phys); - if (ret) { - pr_debug("spu_new: failed to map %s resource 1\n", - node->full_name); + if (ret) goto out_unmap; - } ret = spu_map_resource(node, 2, (void __iomem**)&spu->priv2, NULL); - if (ret) { - pr_debug("spu_new: failed to map %s resource 2\n", - node->full_name); + if (ret) goto out_unmap; - } if (!firmware_has_feature(FW_FEATURE_LPAR)) ret = spu_map_resource(node, 3, (void __iomem**)&spu->priv1, NULL); - if (ret) { - pr_debug("spu_new: failed to map %s resource 3\n", - node->full_name); + if (ret) goto out_unmap; - } - pr_debug("spu_new: %s maps:\n", node->full_name); - pr_debug(" local store : 0x%016lx -> 0x%p\n", - spu->local_store_phys, spu->local_store); - pr_debug(" problem state : 0x%016lx -> 0x%p\n", - spu->problem_phys, spu->problem); - pr_debug(" priv2 : 0x%p\n", spu->priv2); - pr_debug(" priv1 : 0x%p\n", spu->priv1); - return 0; out_unmap: