Skip to content

Commit ddfb131

Browse files
DiwakarCCnashif
authored andcommitted
driver: peci: Add supported peci response codes
Add supported peci response codes 0x80 (Out of resources timeout) and 0x81 (Resources required to service the command are in low power state). Signed-off-by: Diwakar C <[email protected]>
1 parent f5409de commit ddfb131

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

include/drivers/peci.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ enum peci_command_code {
6565
};
6666

6767
/** PECI read/write supported responses */
68-
#define PECI_RW_PKG_CFG_RSP_PASS (0x40U)
69-
#define PECI_RW_PKG_CFG_RSP_TIMEOUT (0x80U)
70-
#define PECI_RW_PKG_CFG_RSP_ILLEGAL (0x90U)
68+
#define PECI_CC_RSP_SUCCESS (0x40U)
69+
#define PECI_CC_RSP_TIMEOUT (0x80U)
70+
#define PECI_CC_OUT_OF_RESOURCES_TIMEOUT (0x81U)
71+
#define PECI_CC_RESOURCES_LOWPWR_TIMEOUT (0x82U)
72+
#define PECI_CC_ILLEGAL_REQUEST (0x90U)
7173

7274
/** Ping command format. */
7375
#define PECI_PING_WR_LEN (0U)

samples/drivers/peci/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ int peci_get_tjmax(uint8_t *tjmax)
9090
k_sleep(K_MSEC(1));
9191
printk("\npeci_resp %x\n", peci_resp);
9292
retries--;
93-
} while ((peci_resp != PECI_RW_PKG_CFG_RSP_PASS) && (retries > 0));
93+
} while ((peci_resp != PECI_CC_RSP_SUCCESS) && (retries > 0));
9494

9595
*tjmax = packet.rx_buffer.buf[3];
9696

0 commit comments

Comments
 (0)