aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-01-26 22:08:21 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-06 22:03:18 -0500
commit66b44954f8f2129a39d145991c8e635046a71be6 (patch)
tree609b4fde791008196ba8b2e2701ecabe04193b75 /arch/powerpc
parent73d976b33998bca9aa7300e59f5d6c756be38b87 (diff)
[POWERPC] ps3: get firmware version
Add a new routine ps3_get_firmware_version() and use it to output the firmware version to dmesg. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/ps3/setup.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index 8b0569853fcd..cb91a81352bf 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -32,6 +32,7 @@
32#include <asm/udbg.h> 32#include <asm/udbg.h>
33#include <asm/prom.h> 33#include <asm/prom.h>
34#include <asm/lv1call.h> 34#include <asm/lv1call.h>
35#include <asm/ps3.h>
35 36
36#include "platform.h" 37#include "platform.h"
37 38
@@ -41,6 +42,19 @@
41#define DBG(fmt...) do{if(0)printk(fmt);}while(0) 42#define DBG(fmt...) do{if(0)printk(fmt);}while(0)
42#endif 43#endif
43 44
45int ps3_get_firmware_version(union ps3_firmware_version *v)
46{
47 int result = lv1_get_version_info(&v->raw);
48
49 if (result) {
50 v->raw = 0;
51 return -1;
52 }
53
54 return result;
55}
56EXPORT_SYMBOL_GPL(ps3_get_firmware_version);
57
44static void ps3_power_save(void) 58static void ps3_power_save(void)
45{ 59{
46 /* 60 /*
@@ -69,8 +83,14 @@ static void ps3_panic(char *str)
69 83
70static void __init ps3_setup_arch(void) 84static void __init ps3_setup_arch(void)
71{ 85{
86 union ps3_firmware_version v;
87
72 DBG(" -> %s:%d\n", __func__, __LINE__); 88 DBG(" -> %s:%d\n", __func__, __LINE__);
73 89
90 ps3_get_firmware_version(&v);
91 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor,
92 v.rev);
93
74 ps3_spu_set_platform(); 94 ps3_spu_set_platform();
75 ps3_map_htab(); 95 ps3_map_htab();
76 96