soc/tigerlake: Fix TCSS code to calling back and forth to mainboard and soc
The original implementation of early tcss resulted in calling to mainboard then back to soc then back to mainboard to properly configure the muxes. This patch addresses that issue and instead just gets all the mux information from mainboard and does all config in the soc code. BUG=none BRANCH=firmware-volteer-13672.B TEST=Verified functionality is not effected and early TCSS still functions Change-Id: Idd50b0ffe1d56dffc3698e07c6e4bc4540d45e73 Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47684 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
338d668b6f
commit
29144554fb
|
@ -1,8 +1,10 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <bootmode.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <intelblocks/pmc_ipc.h>
|
#include <intelblocks/pmc_ipc.h>
|
||||||
|
#include <security/vboot/vboot_common.h>
|
||||||
#include <soc/early_tcss.h>
|
#include <soc/early_tcss.h>
|
||||||
#include <soc/pci_devs.h>
|
#include <soc/pci_devs.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -237,7 +239,7 @@ static int send_pmc_dp_mode_request(int port, struct tcss_mux mux_data)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_tcss_mux(int port, struct tcss_mux mux_data)
|
static void update_tcss_mux(int port, struct tcss_mux mux_data)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -261,7 +263,18 @@ void update_tcss_mux(int port, struct tcss_mux mux_data)
|
||||||
printk(BIOS_ERR, "Port C%d mux set failed with error %d\n", port, ret);
|
printk(BIOS_ERR, "Port C%d mux set failed with error %d\n", port, ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
__weak void mainboard_early_tcss_enable(void)
|
void tcss_early_configure(void)
|
||||||
{
|
{
|
||||||
/* to be overwritten by each mainboard that needs early tcss */
|
const struct tcss_mux *mux_info;
|
||||||
|
size_t num_ports;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!display_init_required())
|
||||||
|
return;
|
||||||
|
|
||||||
|
mux_info = mainboard_tcss_fill_mux_info(&num_ports);
|
||||||
|
|
||||||
|
for (i = 0; i < num_ports; i++)
|
||||||
|
update_tcss_mux(i, mux_info[i]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -462,9 +462,8 @@ void platform_fsp_multi_phase_init_cb(uint32_t phase_index)
|
||||||
/* TCSS specific initialization here */
|
/* TCSS specific initialization here */
|
||||||
printk(BIOS_DEBUG, "FSP MultiPhaseSiInit %s/%s called\n",
|
printk(BIOS_DEBUG, "FSP MultiPhaseSiInit %s/%s called\n",
|
||||||
__FILE__, __func__);
|
__FILE__, __func__);
|
||||||
if (CONFIG(EARLY_TCSS_DISPLAY) && (vboot_recovery_mode_enabled() ||
|
if (CONFIG(EARLY_TCSS_DISPLAY))
|
||||||
vboot_developer_mode_enabled()))
|
tcss_early_configure();
|
||||||
mainboard_early_tcss_enable();
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -126,14 +126,14 @@ struct tcss_mux {
|
||||||
uint8_t usb2_port; /* USB3 Port Number */
|
uint8_t usb2_port; /* USB3 Port Number */
|
||||||
};
|
};
|
||||||
|
|
||||||
void update_tcss_mux(int port, struct tcss_mux mux_data);
|
void tcss_early_configure(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Weak mainboard method to setup any mux configuration needed for early TCSS operations.
|
* Mainboard method to setup any mux configuration needed for early TCSS operations.
|
||||||
* This function will need to obtain any mux data needed to forward to IOM/PMC and call
|
* This function will need to obtain any mux data needed to forward to IOM/PMC.
|
||||||
* the update_tcss_mux method which will call any PMC commands needed to connect the
|
* Since the mux data may be stored differently by different mainboards this
|
||||||
* ports. Since the mux data may be stored differently by different mainboards this
|
* must be defined by the mainboard with its specific mux data stored in a struct tcss_mux
|
||||||
* must be overridden by the mainboard with its specific mux data stored in a struct tcss_mux
|
* as defined above.
|
||||||
* struct as defined above.
|
* Returns completed tcss_mux structure
|
||||||
*/
|
*/
|
||||||
void mainboard_early_tcss_enable(void);
|
const struct tcss_mux *mainboard_tcss_fill_mux_info(size_t *num_ports);
|
||||||
|
|
Loading…
Reference in New Issue