diff options
author | Vic Yang <victoryang@chromium.org> | 2012-07-20 14:35:28 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-21 21:47:52 -0700 |
commit | c26eb30863f5a2b9b28ba4e2eb97c53f57cd24d1 (patch) | |
tree | 8c5b8793654660ab9db81f581845632f3737f0e0 /include/flash.h | |
parent | dde4e99faad63f0f5c4da0b4ef9ad92125051cfa (diff) | |
download | chrome-ec-c26eb30863f5a2b9b28ba4e2eb97c53f57cd24d1.tar.gz |
stm32f: Fix some error in flash write protect
And also add a fake write protect pin command for futher development and
testing.
BUG=chrome-os-partner:11595
TEST=Enable pstate read/write for stm32f.
1. 'flashinfo' -> WP pin deasserted. No blocks protected.
2. 'flashwp enable' -> Nothing changes.
3. 'fakewp 1'; 'flashinfo' -> WP pin asserted. No blocks
protected.
4. 'flashwp enable'; 'flashinfo' -> RO protected.
Change-Id: Id5b1997442d9104d9cb254a295e0bd2f8c83bc78
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28062
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/flash.h')
-rw-r--r-- | include/flash.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/flash.h b/include/flash.h index 617259f0c9..d74ae19c7b 100644 --- a/include/flash.h +++ b/include/flash.h @@ -9,6 +9,7 @@ #define __CROS_EC_FLASH_H #include "common.h" +#include "config.h" #include "ec_commands.h" /* For EC_FLASH_PROTECT_* flags */ /*****************************************************************************/ @@ -41,7 +42,7 @@ int flash_physical_size(void); */ static inline char *flash_physical_dataptr(int offset) { - return (char *)offset; + return (char *)(CONFIG_FLASH_BASE + offset); } /** |