Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc/intel/meteorlake: Set UsbTcPortEn based on tcss_port[x] (ported from alderlake) #230

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/soc/intel/meteorlake/fsp_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,6 @@ static void fill_fsps_igd_params(FSP_S_CONFIG *s_cfg,
static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg,
const struct soc_intel_meteorlake_config *config)
{
const struct device *tcss_port_arr[] = {
DEV_PTR(tcss_usb3_port0),
DEV_PTR(tcss_usb3_port1),
DEV_PTR(tcss_usb3_port2),
DEV_PTR(tcss_usb3_port3),
};

s_cfg->TcssAuxOri = config->tcss_aux_ori;

/* Explicitly clear this field to avoid using defaults */
Expand All @@ -438,8 +431,8 @@ static void fill_fsps_tcss_params(FSP_S_CONFIG *s_cfg,
s_cfg->D3ColdEnable = CONFIG(D3COLD_SUPPORT);
s_cfg->UsbTcPortEn = 0;

for (int i = 0; i < MAX_TYPE_C_PORTS; i++) {
if (is_dev_enabled(tcss_port_arr[i]))
for (int i = 0; i < ARRAY_SIZE(config->tcss_ports); i++) {
if (config->tcss_ports[i].enable)
s_cfg->UsbTcPortEn |= BIT(i);
}

Expand Down