diff options
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_manage.c | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index e4d0c9f42abd..96a8f609690c 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mm.h> | 31 | #include <linux/mm.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/linux_logo.h> | ||
34 | #include <asm/spu.h> | 35 | #include <asm/spu.h> |
35 | #include <asm/spu_priv1.h> | 36 | #include <asm/spu_priv1.h> |
36 | #include <asm/xmon.h> | 37 | #include <asm/xmon.h> |
@@ -656,12 +657,24 @@ static int __init init_spu_base(void) | |||
656 | 657 | ||
657 | ret = spu_enumerate_spus(create_spu); | 658 | ret = spu_enumerate_spus(create_spu); |
658 | 659 | ||
659 | if (ret) { | 660 | if (ret < 0) { |
660 | printk(KERN_WARNING "%s: Error initializing spus\n", | 661 | printk(KERN_WARNING "%s: Error initializing spus\n", |
661 | __FUNCTION__); | 662 | __FUNCTION__); |
662 | goto out_unregister_sysdev_class; | 663 | goto out_unregister_sysdev_class; |
663 | } | 664 | } |
664 | 665 | ||
666 | if (ret > 0) { | ||
667 | /* | ||
668 | * We cannot put the forward declaration in | ||
669 | * <linux/linux_logo.h> because of conflicting session type | ||
670 | * conflicts for const and __initdata with different compiler | ||
671 | * versions | ||
672 | */ | ||
673 | extern const struct linux_logo logo_spe_clut224; | ||
674 | |||
675 | fb_append_extra_logo(&logo_spe_clut224, ret); | ||
676 | } | ||
677 | |||
665 | xmon_register_spus(&spu_full_list); | 678 | xmon_register_spus(&spu_full_list); |
666 | 679 | ||
667 | spu_add_sysdev_attr(&attr_stat); | 680 | spu_add_sysdev_attr(&attr_stat); |
diff --git a/arch/powerpc/platforms/cell/spu_manage.c b/arch/powerpc/platforms/cell/spu_manage.c index 1d4562ae463d..75ed50fcc3db 100644 --- a/arch/powerpc/platforms/cell/spu_manage.c +++ b/arch/powerpc/platforms/cell/spu_manage.c | |||
@@ -279,6 +279,7 @@ static int __init of_enumerate_spus(int (*fn)(void *data)) | |||
279 | { | 279 | { |
280 | int ret; | 280 | int ret; |
281 | struct device_node *node; | 281 | struct device_node *node; |
282 | unsigned int n = 0; | ||
282 | 283 | ||
283 | ret = -ENODEV; | 284 | ret = -ENODEV; |
284 | for (node = of_find_node_by_type(NULL, "spe"); | 285 | for (node = of_find_node_by_type(NULL, "spe"); |
@@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int (*fn)(void *data)) | |||
289 | __FUNCTION__, node->name); | 290 | __FUNCTION__, node->name); |
290 | break; | 291 | break; |
291 | } | 292 | } |
293 | n++; | ||
292 | } | 294 | } |
293 | return ret; | 295 | return ret ? ret : n; |
294 | } | 296 | } |
295 | 297 | ||
296 | static int __init of_create_spu(struct spu *spu, void *data) | 298 | static int __init of_create_spu(struct spu *spu, void *data) |