diff options
-rw-r--r-- | arch/powerpc/include/asm/firmware.h | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/opal.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/setup.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powernv/smp.c | 4 |
4 files changed, 5 insertions, 15 deletions
diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h index e05808a328db..50af5e5ea86f 100644 --- a/arch/powerpc/include/asm/firmware.h +++ b/arch/powerpc/include/asm/firmware.h | |||
@@ -47,7 +47,6 @@ | |||
47 | #define FW_FEATURE_VPHN ASM_CONST(0x0000000004000000) | 47 | #define FW_FEATURE_VPHN ASM_CONST(0x0000000004000000) |
48 | #define FW_FEATURE_XCMO ASM_CONST(0x0000000008000000) | 48 | #define FW_FEATURE_XCMO ASM_CONST(0x0000000008000000) |
49 | #define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000) | 49 | #define FW_FEATURE_OPAL ASM_CONST(0x0000000010000000) |
50 | #define FW_FEATURE_OPALv2 ASM_CONST(0x0000000020000000) | ||
51 | #define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000) | 50 | #define FW_FEATURE_SET_MODE ASM_CONST(0x0000000040000000) |
52 | #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000) | 51 | #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000) |
53 | #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) | 52 | #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000) |
@@ -70,8 +69,7 @@ enum { | |||
70 | FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY | | 69 | FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY | |
71 | FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN, | 70 | FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN, |
72 | FW_FEATURE_PSERIES_ALWAYS = 0, | 71 | FW_FEATURE_PSERIES_ALWAYS = 0, |
73 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv2 | | 72 | FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL | FW_FEATURE_OPALv3, |
74 | FW_FEATURE_OPALv3, | ||
75 | FW_FEATURE_POWERNV_ALWAYS = 0, | 73 | FW_FEATURE_POWERNV_ALWAYS = 0, |
76 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 74 | FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
77 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, | 75 | FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, |
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index faea1abaa785..5ce51d9b4ca6 100644 --- a/arch/powerpc/platforms/powernv/opal.c +++ b/arch/powerpc/platforms/powernv/opal.c | |||
@@ -100,7 +100,6 @@ int __init early_init_dt_scan_opal(unsigned long node, | |||
100 | 100 | ||
101 | powerpc_firmware_features |= FW_FEATURE_OPAL; | 101 | powerpc_firmware_features |= FW_FEATURE_OPAL; |
102 | if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) { | 102 | if (of_flat_dt_is_compatible(node, "ibm,opal-v3")) { |
103 | powerpc_firmware_features |= FW_FEATURE_OPALv2; | ||
104 | powerpc_firmware_features |= FW_FEATURE_OPALv3; | 103 | powerpc_firmware_features |= FW_FEATURE_OPALv3; |
105 | pr_info("OPAL V3 detected !\n"); | 104 | pr_info("OPAL V3 detected !\n"); |
106 | } else { | 105 | } else { |
@@ -349,7 +348,7 @@ int opal_put_chars(uint32_t vtermno, const char *data, int total_len) | |||
349 | * enough room and be done with it | 348 | * enough room and be done with it |
350 | */ | 349 | */ |
351 | spin_lock_irqsave(&opal_write_lock, flags); | 350 | spin_lock_irqsave(&opal_write_lock, flags); |
352 | if (firmware_has_feature(FW_FEATURE_OPALv2)) { | 351 | if (firmware_has_feature(FW_FEATURE_OPALv3)) { |
353 | rc = opal_console_write_buffer_space(vtermno, &olen); | 352 | rc = opal_console_write_buffer_space(vtermno, &olen); |
354 | len = be64_to_cpu(olen); | 353 | len = be64_to_cpu(olen); |
355 | if (rc || len < total_len) { | 354 | if (rc || len < total_len) { |
@@ -693,10 +692,7 @@ static int __init opal_init(void) | |||
693 | } | 692 | } |
694 | 693 | ||
695 | /* Register OPAL consoles if any ports */ | 694 | /* Register OPAL consoles if any ports */ |
696 | if (firmware_has_feature(FW_FEATURE_OPALv2)) | 695 | consoles = of_find_node_by_path("/ibm,opal/consoles"); |
697 | consoles = of_find_node_by_path("/ibm,opal/consoles"); | ||
698 | else | ||
699 | consoles = of_node_get(opal_node); | ||
700 | if (consoles) { | 696 | if (consoles) { |
701 | for_each_child_of_node(consoles, np) { | 697 | for_each_child_of_node(consoles, np) { |
702 | if (strcmp(np->name, "serial")) | 698 | if (strcmp(np->name, "serial")) |
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index a9a8fa37a555..54583fc417be 100644 --- a/arch/powerpc/platforms/powernv/setup.c +++ b/arch/powerpc/platforms/powernv/setup.c | |||
@@ -92,10 +92,6 @@ static void pnv_show_cpuinfo(struct seq_file *m) | |||
92 | seq_printf(m, "machine\t\t: PowerNV %s\n", model); | 92 | seq_printf(m, "machine\t\t: PowerNV %s\n", model); |
93 | if (firmware_has_feature(FW_FEATURE_OPALv3)) | 93 | if (firmware_has_feature(FW_FEATURE_OPALv3)) |
94 | seq_printf(m, "firmware\t: OPAL v3\n"); | 94 | seq_printf(m, "firmware\t: OPAL v3\n"); |
95 | else if (firmware_has_feature(FW_FEATURE_OPALv2)) | ||
96 | seq_printf(m, "firmware\t: OPAL v2\n"); | ||
97 | else if (firmware_has_feature(FW_FEATURE_OPAL)) | ||
98 | seq_printf(m, "firmware\t: OPAL v1\n"); | ||
99 | else | 95 | else |
100 | seq_printf(m, "firmware\t: BML\n"); | 96 | seq_printf(m, "firmware\t: BML\n"); |
101 | of_node_put(root); | 97 | of_node_put(root); |
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index ca264833ee64..9b968a315103 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c | |||
@@ -65,10 +65,10 @@ static int pnv_smp_kick_cpu(int nr) | |||
65 | BUG_ON(nr < 0 || nr >= NR_CPUS); | 65 | BUG_ON(nr < 0 || nr >= NR_CPUS); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * If we already started or OPALv2 is not supported, we just | 68 | * If we already started or OPALv3 is not supported, we just |
69 | * kick the CPU via the PACA | 69 | * kick the CPU via the PACA |
70 | */ | 70 | */ |
71 | if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv2)) | 71 | if (paca[nr].cpu_start || !firmware_has_feature(FW_FEATURE_OPALv3)) |
72 | goto kick; | 72 | goto kick; |
73 | 73 | ||
74 | /* | 74 | /* |