Commit bce9451310eb66fbbd77bf22e8160079700691f8

Authored by Geert Uytterhoeven
Committed by Linus Torvalds
1 parent cca9a6cc58

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>

Showing 4 changed files with 22 additions and 4 deletions Side-by-side Diff

arch/powerpc/platforms/cell/spu_base.c
... ... @@ -31,6 +31,7 @@
31 31 #include <linux/mm.h>
32 32 #include <linux/io.h>
33 33 #include <linux/mutex.h>
  34 +#include <linux/linux_logo.h>
34 35 #include <asm/spu.h>
35 36 #include <asm/spu_priv1.h>
36 37 #include <asm/xmon.h>
37 38  
... ... @@ -656,10 +657,22 @@
656 657  
657 658 ret = spu_enumerate_spus(create_spu);
658 659  
659   - if (ret) {
  660 + if (ret < 0) {
660 661 printk(KERN_WARNING "%s: Error initializing spus\n",
661 662 __FUNCTION__);
662 663 goto out_unregister_sysdev_class;
  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);
663 676 }
664 677  
665 678 xmon_register_spus(&spu_full_list);
arch/powerpc/platforms/cell/spu_manage.c
... ... @@ -279,6 +279,7 @@
279 279 {
280 280 int ret;
281 281 struct device_node *node;
  282 + unsigned int n = 0;
282 283  
283 284 ret = -ENODEV;
284 285 for (node = of_find_node_by_type(NULL, "spe");
285 286  
... ... @@ -289,8 +290,9 @@
289 290 __FUNCTION__, node->name);
290 291 break;
291 292 }
  293 + n++;
292 294 }
293   - return ret;
  295 + return ret ? ret : n;
294 296 }
295 297  
296 298 static int __init of_create_spu(struct spu *spu, void *data)
arch/powerpc/platforms/ps3/spu.c
... ... @@ -405,11 +405,13 @@
405 405 }
406 406 }
407 407  
408   - if (result)
  408 + if (result) {
409 409 printk(KERN_WARNING "%s:%d: Error initializing spus\n",
410 410 __func__, __LINE__);
  411 + return result;
  412 + }
411 413  
412   - return result;
  414 + return num_resource_id;
413 415 }
414 416  
415 417 const struct spu_management_ops spu_management_ps3_ops = {
drivers/video/logo/Kconfig
... ... @@ -13,6 +13,7 @@
13 13 config FB_LOGO_EXTRA
14 14 bool
15 15 depends on FB
  16 + default y if SPU_BASE
16 17  
17 18 config LOGO_LINUX_MONO
18 19 bool "Standard black and white Linux logo"