summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-06-17 18:53:23 -0600
committerCommit Bot <commit-bot@chromium.org>2020-06-18 19:30:47 +0000
commitf20a27dafac8852d919392f8fba95fb0b220ee48 (patch)
tree4674a4972ade7ca5deb62a150f0210d17ea89f79 /host
parentc1710bbb52a365c819e4b25fa502e732c2b48375 (diff)
downloadvboot-f20a27dafac8852d919392f8fba95fb0b220ee48.tar.gz
crossystem: arm: reland nvstorage using flashrom
This relands CL:2218891, which was reverted as the "mkbp" case was forgotten, and lit all sorts of stuff on fire when the CQ skipped hardware tests and the lab was accidentally soaked in gasoline. The devices which this affected are re-enabled in the lab, the CQ is now configured to enable hardware tests, so let's land it again ;) BUG=chromium:1032351,chromium:1030473,chromium:789276 BRANCH=none TEST=On scarlet and nyan_kitty, read and write using crossystem Change-Id: Ife4d17eeca484a2784f7e2b2f7c22fef27b9d083 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2251049 Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/arch/arm/lib/crossystem_arch.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c
index 3a1876ec..d16012a2 100644
--- a/host/arch/arm/lib/crossystem_arch.c
+++ b/host/arch/arm/lib/crossystem_arch.c
@@ -433,9 +433,10 @@ int vb2_read_nv_storage(struct vb2_context *ctx)
media = ReadFdtString(FDT_NVSTORAGE_TYPE_PROP);
if (!strcmp(media, "disk"))
return vb2_read_nv_storage_disk(ctx);
- if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp") ||
- !strcmp(media, "flash"))
+ if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp"))
return vb2_read_nv_storage_mosys(ctx);
+ if (!strcmp(media, "flash"))
+ return vb2_read_nv_storage_flashrom(ctx);
return -1;
}
@@ -449,9 +450,10 @@ int vb2_write_nv_storage(struct vb2_context *ctx)
media = ReadFdtString(FDT_NVSTORAGE_TYPE_PROP);
if (!strcmp(media, "disk"))
return vb2_write_nv_storage_disk(ctx);
- if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp") ||
- !strcmp(media, "flash"))
+ if (!strcmp(media, "cros-ec") || !strcmp(media, "mkbp"))
return vb2_write_nv_storage_mosys(ctx);
+ if (!strcmp(media, "flash"))
+ return vb2_write_nv_storage_flashrom(ctx);
return -1;
}