intel/common/block: Move mainboard api to tcss common block
As per the comments in CB:54090 mainboard api mainboard_tcss_get_port_info() is simplified and moved to tcss common block code. Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.com> Change-Id: I7894363df4862f7cfe733d93e6160677fb8a9e31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/54733 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
This commit is contained in:
committed by
Patrick Georgi
parent
7014efd8cf
commit
c146daf8a3
@@ -23,4 +23,12 @@ struct drivers_intel_pmc_mux_conn_config {
|
||||
enum typec_orientation hsl_orientation;
|
||||
};
|
||||
|
||||
/*
|
||||
* Method verifies input "conn" device.
|
||||
* Returns 'true' if device passed is Intel PMC MUX Conn device else returns 'false'.
|
||||
* Method also outputs the usb2 and usb3 port numbers associated with the 'conn' device
|
||||
*/
|
||||
bool intel_pmc_mux_conn_get_ports(const struct device *conn, unsigned int *usb2_port,
|
||||
unsigned int *usb3_port);
|
||||
|
||||
#endif /* __DRIVERS_INTEL_PMC_MUX_CONN_H__ */
|
||||
|
@@ -85,3 +85,18 @@ struct chip_operations drivers_intel_pmc_mux_conn_ops = {
|
||||
CHIP_NAME("Intel PMC MUX CONN Driver")
|
||||
.enable_dev = conn_enable,
|
||||
};
|
||||
|
||||
bool intel_pmc_mux_conn_get_ports(const struct device *conn, unsigned int *usb2_port,
|
||||
unsigned int *usb3_port)
|
||||
{
|
||||
const struct drivers_intel_pmc_mux_conn_config *mux_config;
|
||||
|
||||
if (!conn->chip_info || conn->chip_ops != &drivers_intel_pmc_mux_conn_ops)
|
||||
return false;
|
||||
|
||||
mux_config = conn->chip_info;
|
||||
*usb2_port = mux_config->usb2_port_number;
|
||||
*usb3_port = mux_config->usb3_port_number;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user