diff options
author | Subrata Banik <subrata.banik@intel.com> | 2021-09-12 12:23:32 +0530 |
---|---|---|
committer | Subrata Banik <subrata.banik@intel.com> | 2021-09-15 06:21:37 +0000 |
commit | e58027cc38deb318fb6d6bf1ef1559f44711c452 (patch) | |
tree | ea67d17733b379213545a49a830562f286a1c34f | |
parent | cbeeec123c58fcbe33c954e803a06a2aae6c1533 (diff) |
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 <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57577
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
-rw-r--r-- | src/soc/intel/common/block/include/intelblocks/tcss.h | 8 |
1 files changed, 7 insertions, 1 deletions
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) |