soc/amd/sabrina/fsp_m_params: don't hard-code USB PHY config table size

Use sizeof instead of having a hard-coded struct length.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3c39d770a7719e30572e71b6a6c24fa2ad4a9426
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
Felix Held 2022-05-06 17:50:07 +02:00 committed by Tim Wawrzynczak
parent 3dc89c5bd7
commit 68aaa8cc26
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@
#include <soc/pci_devs.h> #include <soc/pci_devs.h>
#include <string.h> #include <string.h>
#include <types.h> #include <types.h>
#include <vendorcode/amd/fsp/sabrina/FspUsb.h>
#include "chip.h" #include "chip.h"
__weak void mb_pre_fspm(void) __weak void mb_pre_fspm(void)
@ -145,7 +146,7 @@ void platform_fsp_memory_init_params_cb(FSPM_UPD *mupd, uint32_t version)
mcfg->usb_phy = (struct usb_phy_config *)&config->usb_phy; mcfg->usb_phy = (struct usb_phy_config *)&config->usb_phy;
mcfg->usb_phy->Version_Major = 0xd; mcfg->usb_phy->Version_Major = 0xd;
mcfg->usb_phy->Version_Minor = 0x6; mcfg->usb_phy->Version_Minor = 0x6;
mcfg->usb_phy->TableLength = 100; mcfg->usb_phy->TableLength = sizeof(struct usb_phy_config);
} else { } else {
mcfg->usb_phy = NULL; mcfg->usb_phy = NULL;
} }