aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/intel/model_206ax/acpi.c
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-11-05 10:28:28 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2014-11-19 19:50:51 +0100
commit80fb8edaea44483ed9fa28bfe060734d771150aa (patch)
tree9abeeefa3bc276dd6fef42d6f3fb29e7d3d1bd0e /src/cpu/intel/model_206ax/acpi.c
parentf9cdb486d182668e053ca16f115cbc49066d7768 (diff)
acpigen: Add and use acpigen_write_method.
The sequence of bytes to create a method is used several times in codebase. Put it into a function with logical arguments rather than duplicating magic bytes everywhere. Change-Id: I0e55d8dc7d5e8e92a521c7a83117c470d0614008 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/7347 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/cpu/intel/model_206ax/acpi.c')
-rw-r--r--src/cpu/intel/model_206ax/acpi.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cpu/intel/model_206ax/acpi.c b/src/cpu/intel/model_206ax/acpi.c
index a801ec0928..465525b91e 100644
--- a/src/cpu/intel/model_206ax/acpi.c
+++ b/src/cpu/intel/model_206ax/acpi.c
@@ -106,10 +106,7 @@ static void generate_C_state_entries(void)
if (!cpu || !cpu->cstates)
return;
- acpigen_emit_byte(0x14); /* MethodOp */
- acpigen_write_len_f(); /* PkgLength */
- acpigen_emit_namestring("_CST");
- acpigen_emit_byte(0x00); /* No Arguments */
+ acpigen_write_method("_CST", 0);
/* If running on AC power */
acpigen_emit_byte(0xa0); /* IfOp */