aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2007-07-17 07:05:52 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 13:23:13 -0400
commitbce9451310eb66fbbd77bf22e8160079700691f8 (patch)
treed054902d208c904784d1e5d29957acd6627e153d /arch/powerpc/platforms/cell
parentcca9a6cc580b504a2575d505ab072ebf0872e016 (diff)
Cell: Draw SPE helper penguin logos
Let spu_management_ops.enumerate_spus() return the number of found SPEs and use that information to draw some little helper penguin logos. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-By: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c15
-rw-r--r--arch/powerpc/platforms/cell/spu_manage.c4
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
296static int __init of_create_spu(struct spu *spu, void *data) 298static int __init of_create_spu(struct spu *spu, void *data)