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:
parent
cbeeec123c
commit
e58027cc38
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue