Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bce9451310eb66fbbd77bf22e8160079700691f8
Commit:     bce9451310eb66fbbd77bf22e8160079700691f8
Parent:     cca9a6cc580b504a2575d505ab072ebf0872e016
Author:     Geert Uytterhoeven <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 04:05:52 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jul 17 10:23:13 2007 -0700

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Geoff Levand <[EMAIL PROTECTED]>
    Acked-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Acked-By: James Simmons <[EMAIL PROTECTED]>
    Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spu_base.c   |   15 ++++++++++++++-
 arch/powerpc/platforms/cell/spu_manage.c |    4 +++-
 arch/powerpc/platforms/ps3/spu.c         |    6 ++++--
 drivers/video/logo/Kconfig               |    1 +
 4 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spu_base.c 
b/arch/powerpc/platforms/cell/spu_base.c
index e4d0c9f..96a8f60 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -31,6 +31,7 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/mutex.h>
+#include <linux/linux_logo.h>
 #include <asm/spu.h>
 #include <asm/spu_priv1.h>
 #include <asm/xmon.h>
@@ -656,12 +657,24 @@ static int __init init_spu_base(void)
 
        ret = spu_enumerate_spus(create_spu);
 
-       if (ret) {
+       if (ret < 0) {
                printk(KERN_WARNING "%s: Error initializing spus\n",
                        __FUNCTION__);
                goto out_unregister_sysdev_class;
        }
 
+       if (ret > 0) {
+               /*
+                * We cannot put the forward declaration in
+                * <linux/linux_logo.h> because of conflicting session type
+                * conflicts for const and __initdata with different compiler
+                * versions
+                */
+               extern const struct linux_logo logo_spe_clut224;
+
+               fb_append_extra_logo(&logo_spe_clut224, ret);
+       }
+
        xmon_register_spus(&spu_full_list);
 
        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 1d4562a..75ed50f 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))
 {
        int ret;
        struct device_node *node;
+       unsigned int n = 0;
 
        ret = -ENODEV;
        for (node = of_find_node_by_type(NULL, "spe");
@@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int (*fn)(void *data))
                                __FUNCTION__, node->name);
                        break;
                }
+               n++;
        }
-       return ret;
+       return ret ? ret : n;
 }
 
 static int __init of_create_spu(struct spu *spu, void *data)
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index c7f734c..502d80e 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -405,11 +405,13 @@ static int __init ps3_enumerate_spus(int (*fn)(void 
*data))
                }
        }
 
-       if (result)
+       if (result) {
                printk(KERN_WARNING "%s:%d: Error initializing spus\n",
                        __func__, __LINE__);
+               return result;
+       }
 
-       return result;
+       return num_resource_id;
 }
 
 const struct spu_management_ops spu_management_ps3_ops = {
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index 5bb78e4..da219c0 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -13,6 +13,7 @@ if LOGO
 config FB_LOGO_EXTRA
        bool
        depends on FB
+       default y if SPU_BASE
 
 config LOGO_LINUX_MONO
        bool "Standard black and white Linux logo"
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to