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>
This commit is contained in:
Subrata Banik 2021-09-12 12:23:32 +05:30
parent cbeeec123c
commit e58027cc38
1 changed files with 7 additions and 1 deletions

View File

@ -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)