soc/amd/*/fsp_m_params: rework local USB PHY table update

Update the fields that need to be updated directly in the local static
usb_phy_config struct instead of dereferencing the pointer written to
the corresponding UPD field. This will allow updating the type of UPD
field in a follow-up commit to enable 64 bit coreboot builds.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I44a9fe719e6803fc957fee3db13b261489ed313d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69896
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held 2022-11-22 17:05:05 +01:00
parent 3b89c95906
commit 75873dbf27
4 changed files with 12 additions and 12 deletions

View File

@ -153,10 +153,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
/* devicetree config is const, use local copy */
static struct usb_phy_config lcl_usb_phy;
lcl_usb_phy = config->usb_phy;
lcl_usb_phy.Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
lcl_usb_phy.Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
lcl_usb_phy.TableLength = sizeof(struct usb_phy_config);
mcfg->usb_phy = &lcl_usb_phy;
mcfg->usb_phy->Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
mcfg->usb_phy->Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
mcfg->usb_phy->TableLength = sizeof(struct usb_phy_config);
} else {
mcfg->usb_phy = NULL;
}

View File

@ -155,10 +155,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
/* devicetree config is const, use local copy */
static struct usb_phy_config lcl_usb_phy;
lcl_usb_phy = config->usb_phy;
lcl_usb_phy.Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
lcl_usb_phy.Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
lcl_usb_phy.TableLength = sizeof(struct usb_phy_config);
mcfg->usb_phy = &lcl_usb_phy;
mcfg->usb_phy->Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
mcfg->usb_phy->Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
mcfg->usb_phy->TableLength = sizeof(struct usb_phy_config);
} else {
mcfg->usb_phy = NULL;
}

View File

@ -154,10 +154,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
/* devicetree config is const, use local copy */
static struct usb_phy_config lcl_usb_phy;
lcl_usb_phy = config->usb_phy;
lcl_usb_phy.Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
lcl_usb_phy.Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
lcl_usb_phy.TableLength = sizeof(struct usb_phy_config);
mcfg->usb_phy = &lcl_usb_phy;
mcfg->usb_phy->Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
mcfg->usb_phy->Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
mcfg->usb_phy->TableLength = sizeof(struct usb_phy_config);
} else {
mcfg->usb_phy = NULL;
}

View File

@ -155,10 +155,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
/* devicetree config is const, use local copy */
static struct usb_phy_config lcl_usb_phy;
lcl_usb_phy = config->usb_phy;
lcl_usb_phy.Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
lcl_usb_phy.Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
lcl_usb_phy.TableLength = sizeof(struct usb_phy_config);
mcfg->usb_phy = &lcl_usb_phy;
mcfg->usb_phy->Version_Major = FSP_USB_STRUCT_MAJOR_VERSION;
mcfg->usb_phy->Version_Minor = FSP_USB_STRUCT_MINOR_VERSION;
mcfg->usb_phy->TableLength = sizeof(struct usb_phy_config);
} else {
mcfg->usb_phy = NULL;
}