From ea0f225249221edc75640756889f9e67992c4b90 Mon Sep 17 00:00:00 2001 From: Matt Papageorge Date: Tue, 30 Mar 2021 11:41:22 -0500 Subject: soc/amd/cezanne: Pass DXIO and DDI Descriptors to FSP This patch adds the functionality to write the DXIO and DDI descriptors to the UPD data structure to the SoC code and adds the mainboard_get_dxio_ddi_descriptors function to each mainboard using the Cezanne SoC that gets called to get the descriptors from the board code. Change-Id: I1cb36addcf0202cd56ce99e610a13d6d230bc981 Signed-off-by: Matt Papageorge Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/51948 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson --- src/mainboard/amd/majolica/Makefile.inc | 2 ++ src/mainboard/amd/majolica/port_descriptors.c | 20 ++++++++++++++++++++ src/mainboard/google/guybrush/Makefile.inc | 2 ++ src/mainboard/google/guybrush/port_descriptors.c | 20 ++++++++++++++++++++ src/mainboard/google/mancomb/Makefile.inc | 2 ++ src/mainboard/google/mancomb/port_descriptors.c | 20 ++++++++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 src/mainboard/amd/majolica/port_descriptors.c create mode 100644 src/mainboard/google/guybrush/port_descriptors.c create mode 100644 src/mainboard/google/mancomb/port_descriptors.c (limited to 'src/mainboard') diff --git a/src/mainboard/amd/majolica/Makefile.inc b/src/mainboard/amd/majolica/Makefile.inc index 7c146cf97e..23e9dd1b5e 100644 --- a/src/mainboard/amd/majolica/Makefile.inc +++ b/src/mainboard/amd/majolica/Makefile.inc @@ -3,6 +3,8 @@ bootblock-y += bootblock.c bootblock-y += early_gpio.c +romstage-y += port_descriptors.c + ramstage-y += chromeos.c APCB_SOURCES = $(MAINBOARD_BLOBS_DIR)/APCB_CZN_D4.bin diff --git a/src/mainboard/amd/majolica/port_descriptors.c b/src/mainboard/amd/majolica/port_descriptors.c new file mode 100644 index 0000000000..913e48bb60 --- /dev/null +++ b/src/mainboard/amd/majolica/port_descriptors.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = { +}; + +static const fsp_ddi_descriptor majolica_czn_ddi_descriptors[] = { +}; + +void mainboard_get_dxio_ddi_descriptors( + const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, + const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) +{ + *dxio_descs = majolica_czn_dxio_descriptors; + *dxio_num = ARRAY_SIZE(majolica_czn_dxio_descriptors); + *ddi_descs = majolica_czn_ddi_descriptors; + *ddi_num = ARRAY_SIZE(majolica_czn_ddi_descriptors); +} diff --git a/src/mainboard/google/guybrush/Makefile.inc b/src/mainboard/google/guybrush/Makefile.inc index 263483fd33..d4eeaf5e56 100644 --- a/src/mainboard/google/guybrush/Makefile.inc +++ b/src/mainboard/google/guybrush/Makefile.inc @@ -10,6 +10,8 @@ else $(info APCB sources not found. Skipping APCB.) endif +romstage-y += port_descriptors.c + ramstage-y += mainboard.c ramstage-y += ec.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c diff --git a/src/mainboard/google/guybrush/port_descriptors.c b/src/mainboard/google/guybrush/port_descriptors.c new file mode 100644 index 0000000000..d407fe9302 --- /dev/null +++ b/src/mainboard/google/guybrush/port_descriptors.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +static const fsp_dxio_descriptor guybrush_czn_dxio_descriptors[] = { +}; + +static const fsp_ddi_descriptor guybrush_czn_ddi_descriptors[] = { +}; + +void mainboard_get_dxio_ddi_descriptors( + const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, + const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) +{ + *dxio_descs = guybrush_czn_dxio_descriptors; + *dxio_num = ARRAY_SIZE(guybrush_czn_dxio_descriptors); + *ddi_descs = guybrush_czn_ddi_descriptors; + *ddi_num = ARRAY_SIZE(guybrush_czn_ddi_descriptors); +} diff --git a/src/mainboard/google/mancomb/Makefile.inc b/src/mainboard/google/mancomb/Makefile.inc index ccf90559c8..21e71d7a44 100644 --- a/src/mainboard/google/mancomb/Makefile.inc +++ b/src/mainboard/google/mancomb/Makefile.inc @@ -4,6 +4,8 @@ bootblock-y += bootblock.c verstage-y += verstage.c +romstage-y += port_descriptors.c + ramstage-y += ec.c ramstage-y += mainboard.c ramstage-$(CONFIG_CHROMEOS) += chromeos.c diff --git a/src/mainboard/google/mancomb/port_descriptors.c b/src/mainboard/google/mancomb/port_descriptors.c new file mode 100644 index 0000000000..8a761fecab --- /dev/null +++ b/src/mainboard/google/mancomb/port_descriptors.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +static const fsp_dxio_descriptor mancomb_czn_dxio_descriptors[] = { +}; + +static const fsp_ddi_descriptor mancomb_czn_ddi_descriptors[] = { +}; + +void mainboard_get_dxio_ddi_descriptors( + const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, + const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) +{ + *dxio_descs = mancomb_czn_dxio_descriptors; + *dxio_num = ARRAY_SIZE(mancomb_czn_dxio_descriptors); + *ddi_descs = mancomb_czn_ddi_descriptors; + *ddi_num = ARRAY_SIZE(mancomb_czn_ddi_descriptors); +} -- cgit v1.2.3