From bfbec45de0963b76081f5ff95681ce887ba1ef90 Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Sun, 19 Dec 2021 18:45:16 +0200 Subject: writeprotect: add WPS bit and always set it to zero WPS bit controls use of individual block protection which is mutually exclusive with protection based on ranges. Proper support requires extension of the API as well as implementation, so here we're just making sure that range-based protection is enabled and our WP configuration is not ignored by the chip. Change-Id: I2c26ec65d64a3b6fb1f1a73690bc771415db2744 Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/flashrom/+/60231 Tested-by: build bot (Jenkins) Reviewed-by: Nikolai Artemiev Reviewed-by: Anastasia Klimchuk --- flash.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'flash.h') diff --git a/flash.h b/flash.h index 509f2266..9493fd21 100644 --- a/flash.h +++ b/flash.h @@ -307,6 +307,9 @@ struct flashchip { /* Complement bit (CMP) */ struct reg_bit_info cmp; + + /* Write Protect Selection (per sector protection when set) */ + struct reg_bit_info wps; } reg_bits; /* Function that takes a set of WP config bits (e.g. BP, SEC, TB, etc) */ -- cgit v1.2.3