From dd5ff243113996b0648f52e6d0cfe7bbb41c781e Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Wed, 31 Jul 2024 20:52:27 +0100 Subject: soc/intel/cnvi: Add CNIP Method This method is used to provision the CNVi, and ensure that it is in the correct state. Intel document #559910 details this. Change-Id: Id8a36a09c7beaf3ba8b29d3276bd9dc59420dab5 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/83713 Reviewed-by: Nicholas Sudsgaard Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cnvi/cnvi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/cnvi/cnvi.c b/src/soc/intel/common/block/cnvi/cnvi.c index 5899a94428..591dfd8857 100644 --- a/src/soc/intel/common/block/cnvi/cnvi.c +++ b/src/soc/intel/common/block/cnvi/cnvi.c @@ -358,6 +358,31 @@ static void cnvw_fill_ssdt(const struct device *dev) acpigen_pop_len(); } acpigen_pop_len(); + +/* + * Method (CNIP, 0, NotSerialized) + * { + * If (^CNVW.VDID == 0xFFFFFFFF) + * { + * Return (Zero) + * } Else { + * Return (One) + * } + * } + */ + acpigen_write_method("CNIP", 0); + { + acpigen_write_if_lequal_namestr_int("^CNVW.VDID", 0xffffffff); + { + acpigen_write_return_integer(0); + } + acpigen_write_else(); + { + acpigen_write_return_integer(1); + } + acpigen_pop_len(); + } + acpigen_pop_len(); } static struct device_operations cnvi_wifi_ops = { -- cgit v1.2.3