From d5679c9adc651870b7401b20d46ff685797bdde3 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 7 Jun 2012 16:14:23 +0000 Subject: stm32: de-activate all flash accesses for pstate This feature is not implemented and accessing random flash addresses. Signed-off-by: Vincent Palatin 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 Reviewed-by: Vincent Palatin Tested-by: Vincent Palatin --- common/flash_common.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 } -- cgit v1.2.1