diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-14 01:10:02 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-05-14 01:10:02 -0400 |
| commit | 75b93da43aa1132bf23dafbb4badb028ccf78129 (patch) | |
| tree | cc3cf2301808302e7951ee6887398ea7d639302a /arch/powerpc/platforms | |
| parent | af945cf4bfc6586f0739b8c7f67af75576dec25e (diff) | |
powerpc/powernv: Detect OPAL v3 API version
Future firmwares will support that new version
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
| -rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 6 | ||||
| -rw-r--r-- | arch/powerpc/platforms/powernv/setup.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 27907cb18b8a..628c564ceadb 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
| @@ -56,7 +56,11 @@ int __init early_init_dt_scan_opal(unsigned long node, | |||
| 56 | opal.entry, entryp, entrysz); | 56 | opal.entry, entryp, entrysz); |
| 57 | 57 | ||
| 58 | powerpc_firmware_features |= FW_FEATURE_OPAL; | 58 | powerpc_firmware_features |= FW_FEATURE_OPAL; |
| 59 | if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) { | 59 | if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) { |
| 60 | powerpc_firmware_features |= FW_FEATURE_OPALv2; | ||
| 61 | powerpc_firmware_features |= FW_FEATURE_OPALv3; | ||
| 62 | printk("OPAL V3 detected !\n"); | ||
| 63 | } else if (of_flat_dt_is_compatible(node, "ibm,opal-v2")) { | ||
| 60 | powerpc_firmware_features |= FW_FEATURE_OPALv2; | 64 | powerpc_firmware_features |= FW_FEATURE_OPALv2; |
| 61 | printk("OPAL V2 detected !\n"); | 65 | printk("OPAL V2 detected !\n"); |
| 62 | } else { | 66 | } else { |
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index c20381caaa3e..d4459bfc92f7 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c | |||
| @@ -78,7 +78,9 @@ static void pnv_show_cpuinfo(struct seq_file *m) | |||
| 78 | if (root) | 78 | if (root) |
| 79 | model = of_get_property(root, "model", NULL); | 79 | model = of_get_property(root, "model", NULL); |
| 80 | seq_printf(m, "machine\t\t: PowerNV %s\n", model); | 80 | seq_printf(m, "machine\t\t: PowerNV %s\n", model); |
| 81 | if (firmware_has_feature(FW_FEATURE_OPALv2)) | 81 | if (firmware_has_feature(FW_FEATURE_OPALv3)) |
| 82 | seq_printf(m, "firmware\t: OPAL v3\n"); | ||
| 83 | else if (firmware_has_feature(FW_FEATURE_OPALv2)) | ||
| 82 | seq_printf(m, "firmware\t: OPAL v2\n"); | 84 | seq_printf(m, "firmware\t: OPAL v2\n"); |
| 83 | else if (firmware_has_feature(FW_FEATURE_OPAL)) | 85 | else if (firmware_has_feature(FW_FEATURE_OPAL)) |
| 84 | seq_printf(m, "firmware\t: OPAL v1\n"); | 86 | seq_printf(m, "firmware\t: OPAL v1\n"); |
