diff options
Diffstat (limited to 'arch/alpha/kernel/sys_ruffian.c')
-rw-r--r-- | arch/alpha/kernel/sys_ruffian.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c index 78c30decf3ff..5b99cf3cd69c 100644 --- a/arch/alpha/kernel/sys_ruffian.c +++ b/arch/alpha/kernel/sys_ruffian.c | |||
@@ -182,16 +182,16 @@ static unsigned long __init | |||
182 | ruffian_get_bank_size(unsigned long offset) | 182 | ruffian_get_bank_size(unsigned long offset) |
183 | { | 183 | { |
184 | unsigned long bank_addr, bank, ret = 0; | 184 | unsigned long bank_addr, bank, ret = 0; |
185 | 185 | ||
186 | /* Valid offsets are: 0x800, 0x840 and 0x880 | 186 | /* Valid offsets are: 0x800, 0x840 and 0x880 |
187 | since Ruffian only uses three banks. */ | 187 | since Ruffian only uses three banks. */ |
188 | bank_addr = (unsigned long)PYXIS_MCR + offset; | 188 | bank_addr = (unsigned long)PYXIS_MCR + offset; |
189 | bank = *(vulp)bank_addr; | 189 | bank = *(vulp)bank_addr; |
190 | 190 | ||
191 | /* Check BANK_ENABLE */ | 191 | /* Check BANK_ENABLE */ |
192 | if (bank & 0x01) { | 192 | if (bank & 0x01) { |
193 | static unsigned long size[] __initdata = { | 193 | static unsigned long size[] __initdata = { |
194 | 0x40000000UL, /* 0x00, 1G */ | 194 | 0x40000000UL, /* 0x00, 1G */ |
195 | 0x20000000UL, /* 0x02, 512M */ | 195 | 0x20000000UL, /* 0x02, 512M */ |
196 | 0x10000000UL, /* 0x04, 256M */ | 196 | 0x10000000UL, /* 0x04, 256M */ |
197 | 0x08000000UL, /* 0x06, 128M */ | 197 | 0x08000000UL, /* 0x06, 128M */ |
@@ -203,7 +203,7 @@ ruffian_get_bank_size(unsigned long offset) | |||
203 | }; | 203 | }; |
204 | 204 | ||
205 | bank = (bank & 0x1e) >> 1; | 205 | bank = (bank & 0x1e) >> 1; |
206 | if (bank < sizeof(size)/sizeof(*size)) | 206 | if (bank < ARRAY_SIZE(size)) |
207 | ret = size[bank]; | 207 | ret = size[bank]; |
208 | } | 208 | } |
209 | 209 | ||