diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-11-15 02:21:45 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-15 21:51:58 -0500 |
commit | de93f0d62ccaa730fd46de14d46c0317bd82596a (patch) | |
tree | 38184c1a318f111abd0f20c541ea2e1b69da0b41 /arch/ppc/kernel/setup.c | |
parent | c0ce5c5228dd17d4e3dd1d15b8d52714262cab70 (diff) |
[PATCH] ppc: Fix boot with yaboot with ARCH=ppc
The merge of machine types broke boot with yaboot & ARCH=ppc due to the
old code still retreiving the old-syle machine type passed in by yaboot.
This patch fixes it by translating those old numbers. Since that whole
mecanism is deprecated, this is a temporary fix until ARCH=ppc uses the
new prom_init that the merged architecture now uses for both ppc32 and
ppc64 (after 2.6.15)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel/setup.c')
-rw-r--r-- | arch/ppc/kernel/setup.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index dc55e1abc45..0eb0b7085e6 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -602,7 +602,19 @@ void parse_bootinfo(struct bi_record *rec) | |||
602 | #endif /* CONFIG_BLK_DEV_INITRD */ | 602 | #endif /* CONFIG_BLK_DEV_INITRD */ |
603 | #ifdef CONFIG_PPC_MULTIPLATFORM | 603 | #ifdef CONFIG_PPC_MULTIPLATFORM |
604 | case BI_MACHTYPE: | 604 | case BI_MACHTYPE: |
605 | _machine = data[0]; | 605 | /* Machine types changed with the merge. Since the |
606 | * bootinfo are now deprecated, we can just hard code | ||
607 | * the appropriate conversion here for when we are | ||
608 | * called with yaboot which passes us a machine type | ||
609 | * this way. | ||
610 | */ | ||
611 | switch(data[0]) { | ||
612 | case 1: _machine = _MACH_prep; break; | ||
613 | case 2: _machine = _MACH_Pmac; break; | ||
614 | case 4: _machine = _MACH_chrp; break; | ||
615 | default: | ||
616 | _machine = data[0]; | ||
617 | } | ||
606 | break; | 618 | break; |
607 | #endif | 619 | #endif |
608 | case BI_MEMSIZE: | 620 | case BI_MEMSIZE: |