Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
soc/amd/picasso: add get_soc_config to chip.h
Change-Id: I007c83cfe5063130c18819925844b6c643cf0232 Signed-off-by: Felix Held felix-coreboot@felixheld.de --- M src/soc/amd/picasso/chip.h 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/40246/1
diff --git a/src/soc/amd/picasso/chip.h b/src/soc/amd/picasso/chip.h index 53c0329..be58a79 100644 --- a/src/soc/amd/picasso/chip.h +++ b/src/soc/amd/picasso/chip.h @@ -36,6 +36,8 @@
typedef struct soc_amd_picasso_config config_t;
+const config_t *get_soc_config(void); + extern struct device_operations pci_domain_ops;
#endif /* __PICASSO_CHIP_H__ */
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1:
How does this differ from config_of_soc() (device.h)?
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1:
Patch Set 1:
How does this differ from config_of_soc() (device.h)?
seems to be the same functionality, but with better error handling. i'll test if using config_of_soc works and then add an error message to config_of_soc in a separate patch
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1: Code-Review+2
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1:
How does this differ from config_of_soc() (device.h)?
I hadn't noticed that Kyösti added config_of_soc(). We should convert both stoneyridge and picasso to use config_of_soc()that one, I think. I still think this change is fine, as it corrects for a missing prototype.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: add get_soc_config to chip.h ......................................................................
Patch Set 1:
Patch Set 1:
How does this differ from config_of_soc() (device.h)?
I hadn't noticed that Kyösti added config_of_soc(). We should convert both stoneyridge and picasso to use config_of_soc()that one, I think. I still think this change is fine, as it corrects for a missing prototype.
i fixed that for both stoneyridge and picasso; will push later when i've done some other fixes to create not too much noise
Hello build bot (Jenkins), Raul Rangel, Marshall Dawson, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40246
to look at the new patch set (#2).
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
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 felix-coreboot@felixheld.de --- M src/soc/amd/picasso/Makefile.inc D src/soc/amd/picasso/cfg_util.c M src/soc/amd/picasso/i2c.c 3 files changed, 5 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/40246/2
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 2:
i fixed that for both stoneyridge and picasso; will push later when i've done some other fixes to create not too much noise
done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 2: Code-Review+2
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 2: Code-Review+2
(2 comments)
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c File src/soc/amd/picasso/i2c.c:
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c@4... PS2, Line 41: it if
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c@8... PS2, Line 83: it if
Hello build bot (Jenkins), Raul Rangel, Patrick Georgi, Martin Roth, Marshall Dawson, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40246
to look at the new patch set (#3).
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
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 felix-coreboot@felixheld.de --- M src/soc/amd/picasso/Makefile.inc D src/soc/amd/picasso/cfg_util.c M src/soc/amd/picasso/i2c.c 3 files changed, 5 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/40246/3
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c File src/soc/amd/picasso/i2c.c:
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c@4... PS2, Line 41: it
if
Done
https://review.coreboot.org/c/coreboot/+/40246/2/src/soc/amd/picasso/i2c.c@8... PS2, Line 83: it
if
Done
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 3: Code-Review+2
Marshall Dawson has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 3: Code-Review+2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 3: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 3: Code-Review+2
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
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 felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/40246 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Raul Rangel rrangel@chromium.org Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com Reviewed-by: Furquan Shaikh furquan@google.com Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/soc/amd/picasso/Makefile.inc D src/soc/amd/picasso/cfg_util.c M src/soc/amd/picasso/i2c.c 3 files changed, 5 insertions(+), 28 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved Marshall Dawson: Looks good to me, approved Raul Rangel: Looks good to me, approved Angel Pons: Looks good to me, approved
diff --git a/src/soc/amd/picasso/Makefile.inc b/src/soc/amd/picasso/Makefile.inc index 6b32c6e..2f4f00b 100644 --- a/src/soc/amd/picasso/Makefile.inc +++ b/src/soc/amd/picasso/Makefile.inc @@ -77,7 +77,6 @@ ramstage-y += finalize.c ramstage-y += soc_util.c
-all-y += cfg_util.c all-y += reset.c
smm-y += smihandler.c diff --git a/src/soc/amd/picasso/cfg_util.c b/src/soc/amd/picasso/cfg_util.c deleted file mode 100644 index b0b0652..0000000 --- a/src/soc/amd/picasso/cfg_util.c +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* This file is part of the coreboot project. */ - -#include <console/console.h> -#include <device/device.h> -#include <soc/pci_devs.h> -#include "chip.h" - -const config_t *get_soc_config(void) -{ - const struct device *dev = pcidev_path_on_root(GNB_DEVFN); - - if (!dev || !dev->chip_info) { - printk(BIOS_ERR, "%s: Could not find SoC devicetree config!\n", - __func__); - return NULL; - } - - return dev->chip_info; -} diff --git a/src/soc/amd/picasso/i2c.c b/src/soc/amd/picasso/i2c.c index 6bbc7a7..dec409f 100644 --- a/src/soc/amd/picasso/i2c.c +++ b/src/soc/amd/picasso/i2c.c @@ -5,6 +5,7 @@ #include <arch/acpi.h> #include <console/console.h> #include <delay.h> +#include <device/device.h> #include <drivers/i2c/designware/dw_i2c.h> #include <amdblocks/acpimmio.h> #include <soc/iomap.h> @@ -37,9 +38,8 @@ 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 @@ 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];
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40246 )
Change subject: soc/amd/picasso: replace get_soc_config with config_of_soc ......................................................................
Patch Set 4:
Automatic boot test returned (PASS/FAIL/TOTAL): 3/0/3 Emulation targets: EMULATION_QEMU_X86_Q35 using payload TianoCore : SUCCESS : https://lava.9esec.io/r/2184 EMULATION_QEMU_X86_Q35 using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2183 EMULATION_QEMU_X86_I440FX using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/2182
Please note: This test is under development and might not be accurate at all!