summaryrefslogtreecommitdiff
path: root/include/flash.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-07-20 14:35:28 -0700
committerGerrit <chrome-bot@google.com>2012-07-21 21:47:52 -0700
commitc26eb30863f5a2b9b28ba4e2eb97c53f57cd24d1 (patch)
tree8c5b8793654660ab9db81f581845632f3737f0e0 /include/flash.h
parentdde4e99faad63f0f5c4da0b4ef9ad92125051cfa (diff)
downloadchrome-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.h3
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);
}
/**