From c8272783db8b8a8fe66e1bd1fe60a37532b6b071 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Sat, 5 Dec 2020 01:39:28 +0100 Subject: soc/amd/cezanne: add config.c and minimal chip.h Change-Id: I89f08c201bd7d9a11b186ef960abe9714a76fb97 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/48317 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/soc/amd/cezanne/Makefile.inc | 2 ++ src/soc/amd/cezanne/chip.c | 1 + src/soc/amd/cezanne/chip.h | 12 ++++++++++++ src/soc/amd/cezanne/config.c | 12 ++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 src/soc/amd/cezanne/chip.h create mode 100644 src/soc/amd/cezanne/config.c (limited to 'src/soc') diff --git a/src/soc/amd/cezanne/Makefile.inc b/src/soc/amd/cezanne/Makefile.inc index d4f585fed8..df3355e77b 100644 --- a/src/soc/amd/cezanne/Makefile.inc +++ b/src/soc/amd/cezanne/Makefile.inc @@ -2,6 +2,8 @@ ifeq ($(CONFIG_SOC_AMD_CEZANNE),y) +all-y += config.c + bootblock-y += bootblock.c romstage-y += romstage.c diff --git a/src/soc/amd/cezanne/chip.c b/src/soc/amd/cezanne/chip.c index 357d745b6b..39c7083768 100644 --- a/src/soc/amd/cezanne/chip.c +++ b/src/soc/amd/cezanne/chip.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include "chip.h" struct chip_operations soc_amd_cezanne_ops = { NULL }; diff --git a/src/soc/amd/cezanne/chip.h b/src/soc/amd/cezanne/chip.h new file mode 100644 index 0000000000..b4e94a4478 --- /dev/null +++ b/src/soc/amd/cezanne/chip.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef CEZANNE_CHIP_H +#define CEZANNE_CHIP_H + +#include + +struct soc_amd_cezanne_config { + struct soc_amd_common_config common_config; +}; + +#endif /* CEZANNE_CHIP_H */ diff --git a/src/soc/amd/cezanne/config.c b/src/soc/amd/cezanne/config.c new file mode 100644 index 0000000000..b5855eb40f --- /dev/null +++ b/src/soc/amd/cezanne/config.c @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include "chip.h" + +const struct soc_amd_common_config *soc_get_common_config() +{ + /* config_of_soc calls die() internally if cfg was NULL, so no need to re-check */ + const struct soc_amd_cezanne_config *cfg = config_of_soc(); + return &cfg->common_config; +} -- cgit v1.2.3