Commit 61a25809 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.5

into home.osdl.org:/home/torvalds/v2.5/linux
parents 8b4b205c a29e67ac
......@@ -36,6 +36,7 @@ void __init prom_init(void *cif_handler, void *cif_stack)
int ints[3];
int node;
int i = 0;
int bufadjust;
prom_vers = PROM_P1275;
......@@ -63,9 +64,19 @@ void __init prom_init(void *cif_handler, void *cif_stack)
if (strncmp (buffer, "OBP ", 4))
goto strange_version;
/* Version field is expected to be 'OBP xx.yy.zz date...' */
/*
* Version field is expected to be 'OBP xx.yy.zz date...'
* However, Sun can't stick to this format very well, so
* we need to check for 'OBP xx.yy.zz date...' and adjust
* accordingly. -spot
*/
p = buffer + 4;
if (strncmp (buffer, "OBP ", 5))
bufadjust = 4;
else
bufadjust = 5;
p = buffer + bufadjust;
while (p && isdigit(*p) && i < 3) {
ints[i++] = simple_strtoul(p, NULL, 0);
if ((p = strchr(p, '.')) != NULL)
......@@ -77,7 +88,7 @@ void __init prom_init(void *cif_handler, void *cif_stack)
prom_rev = ints[1];
prom_prev = (ints[0] << 16) | (ints[1] << 8) | ints[2];
printk ("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + 4);
printk ("PROMLIB: Sun IEEE Boot Prom %s\n", buffer + bufadjust);
prom_meminit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment