summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2022-11-14 12:04:19 +1100
committerFelix Singer <felixsinger@posteo.net>2022-12-01 10:10:24 +0000
commit7955239b2cd5ba3397bc06353d7e60b37a7de6de (patch)
treecc9e0301a694238d9cb90d46272f4b407e3c2874
parenta415a5d996550ee3b0e60ef5fc0b0fbd87e7d13d (diff)
downloadflashrom-7955239b2cd5ba3397bc06353d7e60b37a7de6de.tar.gz
flashrom-7955239b2cd5ba3397bc06353d7e60b37a7de6de.tar.bz2
flashrom-7955239b2cd5ba3397bc06353d7e60b37a7de6de.zip
linux_mtd: Mark Opaque chip as tested for WP
Since linux_mtd supports write-protect, its probe function needs to mark Opaque chip as tested for WP. Programmers which are opaque masters are responsible for populating flashchip#tested struct in probe function. Without the patch, any operation running via linux_mtd displays a message "This flash part has status UNTESTED for operations: WP". With the patch, the message is not displayed anymore. BUG=b:258755442 BRANCH=none TEST=flashrom -p host on ARM dut Found Programmer flash chip "Opaque flash chip" (8192 kB, Programmer-specific) on host. No operations were specified. Original-Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/69518 Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Original-Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Change-Id: Icc0521c28555a93f26ce66bdbeaa68590f10c358 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/69996 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
-rw-r--r--linux_mtd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux_mtd.c b/linux_mtd.c
index 5a1360e95..c49b14a7f 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -179,7 +179,7 @@ static int linux_mtd_probe(struct flashctx *flash)
if (data->no_erase)
flash->chip->feature_bits |= FEATURE_NO_ERASE;
- flash->chip->tested = TEST_OK_PREW;
+ flash->chip->tested = TEST_OK_PREWB;
flash->chip->total_size = data->total_size / 1024; /* bytes -> kB */
flash->chip->block_erasers[0].eraseblocks[0].size = data->erasesize;
flash->chip->block_erasers[0].eraseblocks[0].count =