diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 8bcc9ca6682f..ac932a9eb440 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -628,25 +628,39 @@ static void __init pSeries_init_early(void) | |||
628 | * Called very early, MMU is off, device-tree isn't unflattened | 628 | * Called very early, MMU is off, device-tree isn't unflattened |
629 | */ | 629 | */ |
630 | 630 | ||
631 | static int __init pSeries_probe_hypertas(unsigned long node, | 631 | static int __init pseries_probe_fw_features(unsigned long node, |
632 | const char *uname, int depth, | 632 | const char *uname, int depth, |
633 | void *data) | 633 | void *data) |
634 | { | 634 | { |
635 | const char *hypertas; | 635 | const char *prop; |
636 | unsigned long len; | 636 | unsigned long len; |
637 | static int hypertas_found; | ||
638 | static int vec5_found; | ||
637 | 639 | ||
638 | if (depth != 1 || | 640 | if (depth != 1) |
639 | (strcmp(uname, "rtas") != 0 && strcmp(uname, "rtas@0") != 0)) | ||
640 | return 0; | 641 | return 0; |
641 | 642 | ||
642 | hypertas = of_get_flat_dt_prop(node, "ibm,hypertas-functions", &len); | 643 | if (!strcmp(uname, "rtas") || !strcmp(uname, "rtas@0")) { |
643 | if (!hypertas) | 644 | prop = of_get_flat_dt_prop(node, "ibm,hypertas-functions", |
644 | return 1; | 645 | &len); |
646 | if (prop) { | ||
647 | powerpc_firmware_features |= FW_FEATURE_LPAR; | ||
648 | fw_hypertas_feature_init(prop, len); | ||
649 | } | ||
645 | 650 | ||
646 | powerpc_firmware_features |= FW_FEATURE_LPAR; | 651 | hypertas_found = 1; |
647 | fw_feature_init(hypertas, len); | 652 | } |
648 | 653 | ||
649 | return 1; | 654 | if (!strcmp(uname, "chosen")) { |
655 | prop = of_get_flat_dt_prop(node, "ibm,architecture-vec-5", | ||
656 | &len); | ||
657 | if (prop) | ||
658 | fw_vec5_feature_init(prop, len); | ||
659 | |||
660 | vec5_found = 1; | ||
661 | } | ||
662 | |||
663 | return hypertas_found && vec5_found; | ||
650 | } | 664 | } |
651 | 665 | ||
652 | static int __init pSeries_probe(void) | 666 | static int __init pSeries_probe(void) |
@@ -669,7 +683,7 @@ static int __init pSeries_probe(void) | |||
669 | pr_debug("pSeries detected, looking for LPAR capability...\n"); | 683 | pr_debug("pSeries detected, looking for LPAR capability...\n"); |
670 | 684 | ||
671 | /* Now try to figure out if we are running on LPAR */ | 685 | /* Now try to figure out if we are running on LPAR */ |
672 | of_scan_flat_dt(pSeries_probe_hypertas, NULL); | 686 | of_scan_flat_dt(pseries_probe_fw_features, NULL); |
673 | 687 | ||
674 | if (firmware_has_feature(FW_FEATURE_LPAR)) | 688 | if (firmware_has_feature(FW_FEATURE_LPAR)) |
675 | hpte_init_lpar(); | 689 | hpte_init_lpar(); |