diff options
author | Prarit Bhargava <prarit@sgi.com> | 2005-07-06 18:29:13 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-07-06 18:29:13 -0400 |
commit | 283c7f6ac6adb57e7dd13cdbc8d60b6ea4de6faf (patch) | |
tree | 53ce99a2373134c174f8df4f3729fcb4f11fb44e /include/asm-ia64 | |
parent | e07d01e0aeba905aeca6e0ae612943417d396a0f (diff) |
[IA64] hotplug/ia64: SN Hotplug Driver - new SN PROM version code
This patch is a rewrite of the code to check the PROM version. The current
code has some deficiences in the way PROM comparisons were made. The minimum
value of PROM that will boot has also been changed to 4.04.
Signed-off-by: Prarit Bhargava <prarit@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 1455375d2ce4..27976d223186 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -134,43 +134,28 @@ | |||
134 | 134 | ||
135 | #define SN_SAL_FAKE_PROM 0x02009999 | 135 | #define SN_SAL_FAKE_PROM 0x02009999 |
136 | 136 | ||
137 | |||
138 | /** | 137 | /** |
139 | * sn_sal_rev_major - get the major SGI SAL revision number | 138 | * sn_sal_revision - get the SGI SAL revision number |
140 | * | 139 | * |
141 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | 140 | * The SGI PROM stores its version in the sal_[ab]_rev_(major|minor). |
142 | * This routine simply extracts the major value from the | 141 | * This routine simply extracts the major and minor values and |
143 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | 142 | * presents them in a u32 format. |
144 | */ | 143 | * |
145 | static inline int | 144 | * For example, version 4.05 would be represented at 0x0405. |
146 | sn_sal_rev_major(void) | 145 | */ |
146 | static inline u32 | ||
147 | sn_sal_rev(void) | ||
147 | { | 148 | { |
148 | struct ia64_sal_systab *systab = efi.sal_systab; | 149 | struct ia64_sal_systab *systab = efi.sal_systab; |
149 | 150 | ||
150 | return (int)systab->sal_b_rev_major; | 151 | return (u32)(systab->sal_b_rev_major << 8 | systab->sal_b_rev_minor); |
151 | } | ||
152 | |||
153 | /** | ||
154 | * sn_sal_rev_minor - get the minor SGI SAL revision number | ||
155 | * | ||
156 | * The SGI PROM stores its version in sal_[ab]_rev_(major|minor). | ||
157 | * This routine simply extracts the minor value from the | ||
158 | * @ia64_sal_systab structure constructed by ia64_sal_init(). | ||
159 | */ | ||
160 | static inline int | ||
161 | sn_sal_rev_minor(void) | ||
162 | { | ||
163 | struct ia64_sal_systab *systab = efi.sal_systab; | ||
164 | |||
165 | return (int)systab->sal_b_rev_minor; | ||
166 | } | 152 | } |
167 | 153 | ||
168 | /* | 154 | /* |
169 | * Specify the minimum PROM revsion required for this kernel. | 155 | * Specify the minimum PROM revsion required for this kernel. |
170 | * Note that they're stored in hex format... | 156 | * Note that they're stored in hex format... |
171 | */ | 157 | */ |
172 | #define SN_SAL_MIN_MAJOR 0x4 /* SN2 kernels need at least PROM 4.0 */ | 158 | #define SN_SAL_MIN_VERSION 0x0404 |
173 | #define SN_SAL_MIN_MINOR 0x0 | ||
174 | 159 | ||
175 | /* | 160 | /* |
176 | * Returns the master console nasid, if the call fails, return an illegal | 161 | * Returns the master console nasid, if the call fails, return an illegal |