UPSTREAM: mb/google/bluey: Implement soc_id() Implement soc_id() on Bluey using platform_get_soc_hw_id() to support dynamic SoC identification (e.g. x1p42100, Hamoa) for payloads. (cherry picked from commit 94bb5e1f89a7f3fae639fcf7c935f44b4fb5df2c) BUG=none TEST=Verify SoC ID on Google/Quenbi. Original-Change-Id: I611f9618387ff1ad5ce5dee13ab8c0c5ca8d3a81 Original-Signed-off-by: Kapil Porwal <kapilporwal@google.com> Original-Reviewed-on: https://review.coreboot.org/c/coreboot/+/95117 Original-Reviewed-by: Subrata Banik <subratabanik@google.com> Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org> GitOrigin-RevId: 94bb5e1f89a7f3fae639fcf7c935f44b4fb5df2c Cr-Build-Id: 8672210772258787265 Cr-Build-Url: https://cr-buildbucket.appspot.com/build/8672210772258787265 Copybot-Job-Name: coreboot-main-copybot-downstream Change-Id: I0271fa324037055ed707583d7e44d9ba94d02056 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/8310336 Tested-by: copybot@chops-service-accounts.iam.gserviceaccount.com <copybot@chops-service-accounts.iam.gserviceaccount.com> Bot-Commit: copybot@chops-service-accounts.iam.gserviceaccount.com <copybot@chops-service-accounts.iam.gserviceaccount.com> Commit-Queue: chromeos-auto-retry@chromeos-bot.iam.gserviceaccount.com <chromeos-auto-retry@chromeos-bot.iam.gserviceaccount.com>
diff --git a/src/mainboard/google/bluey/boardid.c b/src/mainboard/google/bluey/boardid.c index 4d4048a8..08e037c 100644 --- a/src/mainboard/google/bluey/boardid.c +++ b/src/mainboard/google/bluey/boardid.c
@@ -4,6 +4,7 @@ #include <ec/google/chromeec/ec.h> #include <gpio.h> #include <soc/cdt.h> +#include <soc/platform_info.h> uint32_t board_id(void) { @@ -43,3 +44,14 @@ return id; } + +uint32_t soc_id(void) +{ + static uint32_t id = UNDEFINED_STRAPPING_ID; + if (id != UNDEFINED_STRAPPING_ID) + return id; + + id = platform_get_soc_hw_id(); + + return id; +}