From ef458dafc0f3351c79dd2ac0ec222f60020788e7 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 4 Jan 2021 17:10:45 +0100 Subject: [PATCH] cpu/intel/model_206ax: Simplify C-state acpigen Since there's only one set of values, the if-clause is unnecessary. Change-Id: I2fb4582377fe2f204d2cee0dc513a4d5d24feabe Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/49090 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/cpu/intel/model_206ax/acpi.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c index b38eb15fce..b53e505a5c 100644 --- a/src/cpu/intel/model_206ax/acpi.c +++ b/src/cpu/intel/model_206ax/acpi.c @@ -78,20 +78,8 @@ static void generate_C_state_entries(void) return; acpigen_write_method("_CST", 0); - - /* If running on AC power */ - acpigen_emit_byte(0xa0); /* IfOp */ - acpigen_write_len_f(); /* PkgLength */ - acpigen_emit_namestring("PWRS"); - acpigen_emit_byte(0xa4); /* ReturnOp */ - generate_cstate_entries(cpu->cstates, conf->acpi_c1, - conf->acpi_c2, conf->acpi_c3); - acpigen_pop_len(); - - /* Else on battery power */ - acpigen_emit_byte(0xa4); /* ReturnOp */ - generate_cstate_entries(cpu->cstates, conf->acpi_c1, - conf->acpi_c2, conf->acpi_c3); + acpigen_emit_byte(RETURN_OP); + generate_cstate_entries(cpu->cstates, conf->acpi_c1, conf->acpi_c2, conf->acpi_c3); acpigen_pop_len(); }