diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-11-22 17:05:05 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-11-23 19:44:03 +0000 |
commit | 75873dbf27c3ae786c93b7bc55d40ea386441903 (patch) | |
tree | 629a7643eed92c6f8edfda1174cb0e918f1515a5 /src/soc | |
parent | 3b89c959061f878d96b7ae7b88c3a1386489a1b8 (diff) |
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>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/cezanne/fsp_m_params.c | 6 | ||||
-rw-r--r-- | src/soc/amd/glinda/fsp_m_params.c | 6 | ||||
-rw-r--r-- | src/soc/amd/mendocino/fsp_m_params.c | 6 | ||||
-rw-r--r-- | src/soc/amd/morgana/fsp_m_params.c | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/soc/amd/cezanne/fsp_m_params.c b/src/soc/amd/cezanne/fsp_m_params.c index ba2663a413..f370331764 100644 --- a/src/soc/amd/cezanne/fsp_m_params.c +++ b/src/soc/amd/cezanne/fsp_m_params.c @@ -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; } diff --git a/src/soc/amd/glinda/fsp_m_params.c b/src/soc/amd/glinda/fsp_m_params.c index 7e78287c78..d8de742fef 100644 --- a/src/soc/amd/glinda/fsp_m_params.c +++ b/src/soc/amd/glinda/fsp_m_params.c @@ -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; } diff --git a/src/soc/amd/mendocino/fsp_m_params.c b/src/soc/amd/mendocino/fsp_m_params.c index ed8be664d8..8cbea5d6a5 100644 --- a/src/soc/amd/mendocino/fsp_m_params.c +++ b/src/soc/amd/mendocino/fsp_m_params.c @@ -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; } diff --git a/src/soc/amd/morgana/fsp_m_params.c b/src/soc/amd/morgana/fsp_m_params.c index e1e8c26caa..0c51c1afb8 100644 --- a/src/soc/amd/morgana/fsp_m_params.c +++ b/src/soc/amd/morgana/fsp_m_params.c @@ -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; } |