diff options
author | Bill Richardson <wfrichar@chromium.org> | 2016-09-29 23:48:45 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-02 15:19:21 -0700 |
commit | fd88db3e9a9b922fd73ebb4a446f0289bd7ab8f5 (patch) | |
tree | 355b43f6038165ee0a7590b1105972aefe7a5a47 /common/main.c | |
parent | 0a4bb34bcdde39f1cd21dd555d7284a8b1ce9cca (diff) | |
download | chrome-ec-fd88db3e9a9b922fd73ebb4a446f0289bd7ab8f5.tar.gz |
g: CONFIG_FLASH should be optional
The application may need to read/write/erase the flash memory,
but we not want console users to do so. This CL adds
CONFIG_FLASH_PHYSICAL, which allows the higher-level CONFIG_FLASH
to be undefined while still providing the chip-specific
flash_physical_* accessor functions.
There aren't many board.h files that needed changes, since
CONFIG_FLASH_PHYSICAL is enabled by default, just like CONFIG_FLASH.
BUG=chrome-os-partner:57408
BRANCH=none
TEST=make buildall; try on Gru with and without CR50_DEV=1
See that it still boots, updates, wipes, restores, etc. without
linking common/flash.o in the production image; and that the
flash commands are still there in the dev build.
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I7eb1bbcb414b1c70ee427c4fcb5cea899dbb9e93
Reviewed-on: https://chromium-review.googlesource.com/391188
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/main.c b/common/main.c index 4b537a79da..4c5d580ddd 100644 --- a/common/main.c +++ b/common/main.c @@ -79,7 +79,7 @@ test_mockable __keep int main(void) system_pre_init(); system_common_pre_init(); -#ifdef CONFIG_FLASH +#if defined(CONFIG_FLASH_PHYSICAL) /* * Initialize flash and apply write protect if necessary. Requires * the reset flags calculated by system initialization. |