diff options
-rw-r--r-- | arch/powerpc/platforms/ps3/setup.c | 32 | ||||
-rw-r--r-- | include/asm-powerpc/ps3.h | 3 |
2 files changed, 22 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c index 935396766621..b79d62b68df5 100644 --- a/arch/powerpc/platforms/ps3/setup.c +++ b/arch/powerpc/platforms/ps3/setup.c | |||
@@ -46,18 +46,26 @@ | |||
46 | static void smp_send_stop(void) {} | 46 | static void smp_send_stop(void) {} |
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | int ps3_get_firmware_version(union ps3_firmware_version *v) | 49 | static union ps3_firmware_version ps3_firmware_version; |
50 | |||
51 | void ps3_get_firmware_version(union ps3_firmware_version *v) | ||
50 | { | 52 | { |
51 | int result = lv1_get_version_info(&v->raw); | 53 | *v = ps3_firmware_version; |
54 | } | ||
55 | EXPORT_SYMBOL_GPL(ps3_get_firmware_version); | ||
52 | 56 | ||
53 | if (result) { | 57 | int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev) |
54 | v->raw = 0; | 58 | { |
55 | return -1; | 59 | union ps3_firmware_version x; |
56 | } | 60 | |
61 | x.pad = 0; | ||
62 | x.major = major; | ||
63 | x.minor = minor; | ||
64 | x.rev = rev; | ||
57 | 65 | ||
58 | return result; | 66 | return (ps3_firmware_version.raw - x.raw); |
59 | } | 67 | } |
60 | EXPORT_SYMBOL_GPL(ps3_get_firmware_version); | 68 | EXPORT_SYMBOL_GPL(ps3_compare_firmware_version); |
61 | 69 | ||
62 | static void ps3_power_save(void) | 70 | static void ps3_power_save(void) |
63 | { | 71 | { |
@@ -146,13 +154,13 @@ static int ps3_set_dabr(u64 dabr) | |||
146 | 154 | ||
147 | static void __init ps3_setup_arch(void) | 155 | static void __init ps3_setup_arch(void) |
148 | { | 156 | { |
149 | union ps3_firmware_version v; | ||
150 | 157 | ||
151 | DBG(" -> %s:%d\n", __func__, __LINE__); | 158 | DBG(" -> %s:%d\n", __func__, __LINE__); |
152 | 159 | ||
153 | ps3_get_firmware_version(&v); | 160 | lv1_get_version_info(&ps3_firmware_version.raw); |
154 | printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", v.major, v.minor, | 161 | printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", |
155 | v.rev); | 162 | ps3_firmware_version.major, ps3_firmware_version.minor, |
163 | ps3_firmware_version.rev); | ||
156 | 164 | ||
157 | ps3_spu_set_platform(); | 165 | ps3_spu_set_platform(); |
158 | ps3_map_htab(); | 166 | ps3_map_htab(); |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 1e04651eedc4..ac85d729f14f 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -35,7 +35,8 @@ union ps3_firmware_version { | |||
35 | }; | 35 | }; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | int ps3_get_firmware_version(union ps3_firmware_version *v); | 38 | void ps3_get_firmware_version(union ps3_firmware_version *v); |
39 | int ps3_compare_firmware_version(u16 major, u16 minor, u16 rev); | ||
39 | 40 | ||
40 | /* 'Other OS' area */ | 41 | /* 'Other OS' area */ |
41 | 42 | ||