Modify PECI macro uses to prepare PECI header update
This commit is for preparation of PECI header update which has
'PECI_' prefix on all PECI relating macros. The temporary
re-definition code will be removed later when the header file is
provisioned completely.
Change-Id: Ib66addb1c96c08f12dcfddbc6048dc425e0b2afb
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
index 7f437ce..6c4e2e5 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
@@ -34,6 +34,9 @@
// clang-format off
// this needs to be included last or we'll have build issues
#include <linux/peci-ioctl.h>
+#if !defined(PECI_MBX_INDEX_DDR_DIMM_TEMP)
+#define PECI_MBX_INDEX_DDR_DIMM_TEMP MBX_INDEX_DDR_DIMM_TEMP
+#endif
// clang-format on
static constexpr bool DEBUG = false;
@@ -405,7 +408,7 @@
{
struct peci_rd_pkg_cfg_msg msg;
msg.addr = config.addr;
- msg.index = MBX_INDEX_DDR_DIMM_TEMP;
+ msg.index = PECI_MBX_INDEX_DDR_DIMM_TEMP;
msg.param = rank;
msg.rx_len = 4;
if (!ioctl(file, PECI_IOC_RD_PKG_CFG, &msg))