From e58027cc38deb318fb6d6bf1ef1559f44711c452 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 12 Sep 2021 12:23:32 +0530 Subject: [PATCH] soc/intel/block/../tcss: Create enum for TCSS Port0/1/2/3 Additionally, convert MAX_TYPE_C_PORTS from macro to enum value. Change-Id: I3c596d8a015adc0449b44710c6d517753904ecd6 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/57577 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Angel Pons --- src/soc/intel/common/block/include/intelblocks/tcss.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/soc/intel/common/block/include/intelblocks/tcss.h b/src/soc/intel/common/block/include/intelblocks/tcss.h index 9595a78e00..97d63af41a 100644 --- a/src/soc/intel/common/block/include/intelblocks/tcss.h +++ b/src/soc/intel/common/block/include/intelblocks/tcss.h @@ -68,7 +68,13 @@ #define TCSS_HPD_IRQ_SHIFT 13 #define TCSS_HPD_IRQ_MASK 0x01 -#define MAX_TYPE_C_PORTS 4 +enum typec_port_index { + TYPE_C_PORT_0, + TYPE_C_PORT_1, + TYPE_C_PORT_2, + TYPE_C_PORT_3, + MAX_TYPE_C_PORTS, +}; #define TCSS_CD_FIELD(name, val) \ (((val) & TCSS_CD_##name##_MASK) << TCSS_CD_##name##_SHIFT)