From 00058f513e8a5005d566a927eca183d2123d3e19 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 6 Apr 2020 23:36:24 +0200 Subject: soc/amd/picasso: replace get_soc_config with config_of_soc get_soc_config was a reimplementation of config_of_soc, so drop get_soc_config and cfg_util.c. Change-Id: I007c83cfe5063130c18819925844b6c643cf0232 Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/c/coreboot/+/40246 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Marshall Dawson Reviewed-by: Furquan Shaikh Reviewed-by: Angel Pons --- src/soc/amd/picasso/i2c.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/soc/amd/picasso/i2c.c') diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 6bbc7a7adc..dec409f060 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -37,9 +38,8 @@ const struct dw_i2c_bus_config *dw_i2c_get_soc_cfg(unsigned int bus) if (bus < APU_I2C_MIN_BUS || bus > APU_I2C_MAX_BUS) return NULL; - config = get_soc_config(); - if (config == NULL) - return NULL; + /* config is not NULL; if it was, config_of_soc calls die() internally */ + config = config_of_soc(); return &config->i2c[bus]; } @@ -80,10 +80,8 @@ static void dw_i2c_soc_init(bool is_early_init) uint32_t pad_ctrl; int misc_reg; - config = get_soc_config(); - - if (config == NULL) - return; + /* config is not NULL; if it was, config_of_soc calls die() internally */ + config = config_of_soc(); for (i = 0; i < ARRAY_SIZE(config->i2c); i++) { const struct dw_i2c_bus_config *cfg = &config->i2c[i]; -- cgit v1.2.3