diff options
author | Valentine Barshak <vbarshak@ru.mvista.com> | 2007-12-21 11:24:02 -0500 |
---|---|---|
committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2007-12-23 14:35:58 -0500 |
commit | 14b3d926a22b89f779229f88ed16a76b6b641b1c (patch) | |
tree | 34e406787a98910ade5b12eaaeca225e7afad7f4 | |
parent | 72fda1148e14d2f06d8653c26f579b7d2dabba57 (diff) |
[POWERPC] 4xx: update 440EP(x)/440GR(x) identical PVR issue workaround
Renaming the CPU nodes with generic names put the CPU model in
the "model" property and thus broke the PowerPC 440EP(x)/440GR(x)
identical PVR workaround. The updates it to use the new model property
for CPU identification.
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
-rw-r--r-- | arch/powerpc/kernel/prom.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6c2d8836f77d..8b5efbce8d90 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -614,6 +614,29 @@ static struct feature_property { | |||
614 | #endif /* CONFIG_PPC64 */ | 614 | #endif /* CONFIG_PPC64 */ |
615 | }; | 615 | }; |
616 | 616 | ||
617 | #if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU) | ||
618 | static inline void identical_pvr_fixup(unsigned long node) | ||
619 | { | ||
620 | unsigned int pvr; | ||
621 | char *model = of_get_flat_dt_prop(node, "model", NULL); | ||
622 | |||
623 | /* | ||
624 | * Since 440GR(x)/440EP(x) processors have the same pvr, | ||
625 | * we check the node path and set bit 28 in the cur_cpu_spec | ||
626 | * pvr for EP(x) processor version. This bit is always 0 in | ||
627 | * the "real" pvr. Then we call identify_cpu again with | ||
628 | * the new logical pvr to enable FPU support. | ||
629 | */ | ||
630 | if (model && strstr(model, "440EP")) { | ||
631 | pvr = cur_cpu_spec->pvr_value | 0x8; | ||
632 | identify_cpu(0, pvr); | ||
633 | DBG("Using logical pvr %x for %s\n", pvr, model); | ||
634 | } | ||
635 | } | ||
636 | #else | ||
637 | #define identical_pvr_fixup(node) do { } while(0) | ||
638 | #endif | ||
639 | |||
617 | static void __init check_cpu_feature_properties(unsigned long node) | 640 | static void __init check_cpu_feature_properties(unsigned long node) |
618 | { | 641 | { |
619 | unsigned long i; | 642 | unsigned long i; |
@@ -711,18 +734,8 @@ static int __init early_init_dt_scan_cpus(unsigned long node, | |||
711 | prop = of_get_flat_dt_prop(node, "cpu-version", NULL); | 734 | prop = of_get_flat_dt_prop(node, "cpu-version", NULL); |
712 | if (prop && (*prop & 0xff000000) == 0x0f000000) | 735 | if (prop && (*prop & 0xff000000) == 0x0f000000) |
713 | identify_cpu(0, *prop); | 736 | identify_cpu(0, *prop); |
714 | #if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU) | 737 | |
715 | /* | 738 | identical_pvr_fixup(node); |
716 | * Since 440GR(x)/440EP(x) processors have the same pvr, | ||
717 | * we check the node path and set bit 28 in the cur_cpu_spec | ||
718 | * pvr for EP(x) processor version. This bit is always 0 in | ||
719 | * the "real" pvr. Then we call identify_cpu again with | ||
720 | * the new logical pvr to enable FPU support. | ||
721 | */ | ||
722 | if (strstr(uname, "440EP")) { | ||
723 | identify_cpu(0, cur_cpu_spec->pvr_value | 0x8); | ||
724 | } | ||
725 | #endif | ||
726 | } | 739 | } |
727 | 740 | ||
728 | check_cpu_feature_properties(node); | 741 | check_cpu_feature_properties(node); |