summaryrefslogtreecommitdiff
path: root/src/soc/amd/sabrina/fsp_m_params.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/sabrina/fsp_m_params.c')
-rw-r--r--src/soc/amd/sabrina/fsp_m_params.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/soc/amd/sabrina/fsp_m_params.c b/src/soc/amd/sabrina/fsp_m_params.c
index c1f903b3bf..1a2f23bd51 100644
--- a/src/soc/amd/sabrina/fsp_m_params.c
+++ b/src/soc/amd/sabrina/fsp_m_params.c
@@ -143,7 +143,10 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
mcfg->hda_enable = is_dev_enabled(DEV_PTR(hda));
if (config->usb_phy_custom) {
- mcfg->usb_phy = (struct usb_phy_config *)&config->usb_phy;
+ /* devicetree config is const, use local copy */
+ static struct usb_phy_config lcl_usb_phy;
+ lcl_usb_phy = config->usb_phy;
+ 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);