diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-06-07 16:14:23 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-06-07 13:39:25 -0700 |
commit | d5679c9adc651870b7401b20d46ff685797bdde3 (patch) | |
tree | c0bcab444530716847eebe60828999b5b61af603 | |
parent | ac85bc50f073c037a96e5183a27962ee9f4d6ec9 (diff) | |
download | chrome-ec-d5679c9adc651870b7401b20d46ff685797bdde3.tar.gz |
stm32: de-activate all flash accesses for pstate
This feature is not implemented and accessing random flash addresses.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:10237
TEST=on Snow, run flashrom -p internal:bus=lpc --wp-status
Change-Id: Idd2b6610f387e42deac97cdbdfefc7ea33c7e62d
Reviewed-on: https://gerrit.chromium.org/gerrit/24726
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/flash_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/flash_common.c b/common/flash_common.c index e79b4d9d79..d9eb666ff9 100644 --- a/common/flash_common.c +++ b/common/flash_common.c @@ -41,6 +41,7 @@ static int wp_pin_asserted(void) /* Read persistent state into pstate. */ static int read_pstate(void) { +#ifndef CHIP_stm32 int i; int rv = flash_physical_read(usable_flash_size, sizeof(pstate), (char *)&pstate); @@ -58,6 +59,7 @@ static int read_pstate(void) for (i = 0; i < MAX_BANKS; i++) pstate.blocks[i] &= FLASH_PROTECT_PERSISTENT; +#endif return EC_SUCCESS; } @@ -65,6 +67,7 @@ static int read_pstate(void) /* Write persistent state from pstate, erasing if necessary. */ static int write_pstate(void) { +#ifndef CHIP_stm32 int rv; /* Erase top protection block. Assumes pstate size is less than @@ -84,6 +87,9 @@ static int write_pstate(void) /* Rewrite the data */ return flash_physical_write(usable_flash_size, sizeof(pstate), (const char *)&pstate); +#else + return EC_SUCCESS; +#endif } |