drivers/intel/usb4: Move log message from SoC code to driver code
This patch moves the debug print which prints the mapping between CPU Type-C port and EC Type-C port from SoC code to generic driver code. BUG=b:399032094 TEST=Check the Type-C port and EC port mapping in coreboot log Change-Id: Iaef5813cc825569a53feba975258f7d5fadecfab Signed-off-by: Derek Huang <derekhuang@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86704 Reviewed-by: Subrata Banik <subratabanik@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
c53b3efa4e
commit
c5db254b12
5 changed files with 5 additions and 16 deletions
|
|
@ -409,6 +409,7 @@ static void usb4_retimer_fill_ssdt(const struct device *dev)
|
|||
__func__, usb_port);
|
||||
continue;
|
||||
}
|
||||
printk(BIOS_INFO, "USB Type-C %d mapped to EC port %d\n", usb_port, ec_port);
|
||||
/* DFPx */
|
||||
snprintf(dfp, sizeof(dfp), "DFP%1d", ec_port);
|
||||
acpigen_write_device(dfp);
|
||||
|
|
|
|||
|
|
@ -18,11 +18,8 @@ int retimer_get_index_for_typec(uint8_t typec_port)
|
|||
};
|
||||
|
||||
for (uint8_t i = 0; i < MAX_TYPE_C_PORTS; i++) {
|
||||
if (i == typec_port) {
|
||||
printk(BIOS_INFO, "USB Type-C %d mapped to EC port %d\n", typec_port,
|
||||
ec_port);
|
||||
if (i == typec_port)
|
||||
return ec_port;
|
||||
}
|
||||
|
||||
if (is_dev_enabled(tcss_port_arr[i]))
|
||||
ec_port++;
|
||||
|
|
|
|||
|
|
@ -18,11 +18,8 @@ int retimer_get_index_for_typec(uint8_t typec_port)
|
|||
};
|
||||
|
||||
for (uint8_t i = 0; i < MAX_TYPE_C_PORTS; i++) {
|
||||
if (i == typec_port) {
|
||||
printk(BIOS_INFO, "USB Type-C %d mapped to EC port %d\n", typec_port,
|
||||
ec_port);
|
||||
if (i == typec_port)
|
||||
return ec_port;
|
||||
}
|
||||
|
||||
if (is_dev_enabled(tcss_port_arr[i]))
|
||||
ec_port++;
|
||||
|
|
|
|||
|
|
@ -16,11 +16,8 @@ int retimer_get_index_for_typec(uint8_t typec_port)
|
|||
};
|
||||
|
||||
for (int i = 0, ec_port = 0; i < MAX_TYPE_C_PORTS; i++) {
|
||||
if (i == typec_port) {
|
||||
printk(BIOS_INFO, "USB Type-C %d mapped to EC port %d\n", typec_port,
|
||||
ec_port);
|
||||
if (i == typec_port)
|
||||
return ec_port;
|
||||
}
|
||||
|
||||
if (is_dev_enabled(tcss_port_arr[i]))
|
||||
ec_port++;
|
||||
|
|
|
|||
|
|
@ -19,11 +19,8 @@ int retimer_get_index_for_typec(uint8_t typec_port)
|
|||
};
|
||||
|
||||
for (uint8_t i = 0; i < MAX_TYPE_C_PORTS; i++) {
|
||||
if (i == typec_port) {
|
||||
printk(BIOS_ERR, "USB Type-C %d mapped to EC port %d\n", typec_port,
|
||||
ec_port);
|
||||
if (i == typec_port)
|
||||
return ec_port;
|
||||
}
|
||||
|
||||
if (is_dev_enabled(tcss_port_arr[i]))
|
||||
ec_port++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue