mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 13:21:45 +00:00
[PATCH] powerpc: Fix machine detection in prom_init.c
In e8222502ee
the detection of machine types
in prom_init broke for some machines. We should be checking /device_type
instead of /model. This should make Power3 and Power4 boot again. Haven't
been able to test this. We also need to relocate before comparing.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
132058f78a
commit
6f806ceed5
1 changed files with 2 additions and 3 deletions
|
@ -1528,12 +1528,11 @@ static int __init prom_find_machine_type(void)
|
||||||
* non-IBM designs !
|
* non-IBM designs !
|
||||||
* - it has /rtas
|
* - it has /rtas
|
||||||
*/
|
*/
|
||||||
len = prom_getprop(_prom->root, "model",
|
len = prom_getprop(_prom->root, "device_type",
|
||||||
compat, sizeof(compat)-1);
|
compat, sizeof(compat)-1);
|
||||||
if (len <= 0)
|
if (len <= 0)
|
||||||
return PLATFORM_GENERIC;
|
return PLATFORM_GENERIC;
|
||||||
compat[len] = 0;
|
if (strncmp(compat, RELOC("chrp"), 4))
|
||||||
if (strcmp(compat, "chrp"))
|
|
||||||
return PLATFORM_GENERIC;
|
return PLATFORM_GENERIC;
|
||||||
|
|
||||||
/* Default to pSeries. We need to know if we are running LPAR */
|
/* Default to pSeries. We need to know if we are running LPAR */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue