mirror of
https://review.coreboot.org/flashrom.git
synced 2025-11-06 16:01:28 +01:00
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 <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58474
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
This commit is contained in:
committed by
Anastasia Klimchuk
parent
8d50fad443
commit
4571361d0e
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user