aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block/tcss/tcss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/block/tcss/tcss.c')
-rw-r--r--src/soc/intel/common/block/tcss/tcss.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/soc/intel/common/block/tcss/tcss.c b/src/soc/intel/common/block/tcss/tcss.c
index e0ca90d7e8..f1a3584400 100644
--- a/src/soc/intel/common/block/tcss/tcss.c
+++ b/src/soc/intel/common/block/tcss/tcss.c
@@ -355,7 +355,7 @@ static uint32_t calc_bias_ctrl_reg_value(gpio_t pad)
cpu_pid;
}
-static void tcss_configure_aux_bias_pads_regbar(
+void tcss_configure_aux_bias_pads_regbar(
const struct typec_aux_bias_pads *pads)
{
for (size_t i = 0; i < MAX_TYPE_C_PORTS; i++) {
@@ -368,16 +368,6 @@ static void tcss_configure_aux_bias_pads_regbar(
}
}
-static void tcss_configure_aux_bias_pads(
- const struct typec_aux_bias_pads *pads)
-{
- if (CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS_REG_ACCESS_REGBAR))
- tcss_configure_aux_bias_pads_regbar(pads);
- else
- printk(BIOS_ERR, "%s: Error: No TCSS configuration method is selected!\n",
- __func__);
-}
-
const struct tcss_port_map *tcss_get_port_info(size_t *num_ports)
{
static struct tcss_port_map port_map[MAX_TYPE_C_PORTS];
@@ -423,19 +413,14 @@ void tcss_configure(const struct typec_aux_bias_pads aux_bias_pads[MAX_TYPE_C_PO
tcss_init_mux(i, &port_map[i]);
/* This should be performed before alternate modes are entered */
- tcss_configure_aux_bias_pads(aux_bias_pads);
+ if (tcss_ops.configure_aux_bias_pads)
+ tcss_ops.configure_aux_bias_pads(aux_bias_pads);
if (CONFIG(ENABLE_TCSS_DISPLAY_DETECTION))
tcss_configure_dp_mode(port_map, num_ports);
}
-uint32_t tcss_valid_tbt_auth(void)
+bool tcss_valid_tbt_auth(void)
{
- if (CONFIG(SOC_INTEL_COMMON_BLOCK_TCSS_REG_ACCESS_REGBAR)) {
- return REGBAR32(PID_IOM, IOM_CSME_IMR_TBT_STATUS) & TBT_VALID_AUTHENTICATION;
- } else {
- printk(BIOS_ERR, "%s: Error: No validation for Thunderbolt authentication!\n",
- __func__);
- return 0;
- }
+ return REGBAR32(PID_IOM, IOM_CSME_IMR_TBT_STATUS) & TBT_VALID_AUTHENTICATION;
}