From 4571361d0e2b11f43b2de5390c90705d4e8cce4a Mon Sep 17 00:00:00 2001 From: Nikolai Artemiev Date: Wed, 20 Oct 2021 22:11:32 +1100 Subject: writeprotect, cli_classic: delete old writeprotect code Delete writeprotect code that was previously extracted from the cros tree. This is the first of a series of commits adding writeprotect support. Following commits incrementally implement writeprotect operations, culminating in writeprotect support for three example chips: GD25LQ128, GD25Q32, and GD25Q256. BUG=b:195381327,b:153800563 BRANCH=none TEST=flashrom -{r,w,E} TEST=flashrom --wp-{enable,disable,range,list,status} at end of patch series Change-Id: I67e9b31f86465e5a8f7d3def637198671ee818a8 Signed-off-by: Nikolai Artemiev Reviewed-on: https://review.coreboot.org/c/flashrom/+/58474 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Anastasia Klimchuk --- writeprotect.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'writeprotect.h') diff --git a/writeprotect.h b/writeprotect.h index bded4c85..2d99897f 100644 --- a/writeprotect.h +++ b/writeprotect.h @@ -18,34 +18,4 @@ #ifndef __WRITEPROTECT_H__ #define __WRITEPROTECT_H__ 1 -enum wp_mode { - WP_MODE_UNKNOWN = -1, - WP_MODE_HARDWARE, /* hardware WP pin determines status */ - WP_MODE_POWER_CYCLE, /* WP active until power off/on cycle */ - WP_MODE_PERMANENT, /* status register permanently locked, - WP permanently enabled */ -}; - -struct wp { - int (*list_ranges)(const struct flashctx *flash); - int (*set_range)(const struct flashctx *flash, - unsigned int start, unsigned int len); - int (*enable)(const struct flashctx *flash, enum wp_mode mode); - int (*disable)(const struct flashctx *flash); - int (*wp_status)(const struct flashctx *flash); -}; - -extern struct wp wp_generic; - -enum wp_mode get_wp_mode(const char *mode_str); - -/* - * Generic write-protect stuff - */ - -struct modifier_bits { - int sec; /* if 1, bp bits describe sectors */ - int tb; /* value of top/bottom select bit */ -}; - #endif /* !__WRITEPROTECT_H__ */ -- cgit v1.2.3