diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-09-04 19:09:33 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-16 14:49:31 -0700 |
commit | d58e54730c03290296df5bb65cb84264e4b2facc (patch) | |
tree | d736570c84a0e9737b8881ec68b073327a5c2ae5 /include | |
parent | 4b3c13ddfefd229dde49fb4cbf5a6bfc49f64973 (diff) | |
download | chrome-ec-d58e54730c03290296df5bb65cb84264e4b2facc.tar.gz |
cleanup: Rename geometry constants
Rename and add geometry constants to match spec doc -
https://goo.gl/fnzTvr.
CONFIG_FLASH_BASE becomes CONFIG_PROGRAM_MEMORY_BASE
CONFIG_FLASH_MAPPED becomes CONFIG_MAPPED_STORAGE
Add CONFIG_INTERNAL_STORAGE, CONFIG_EXTERNAL_STORAGE and
CONFIG_MAPPED_STORAGE_BASE where appropriate.
This CL leaves chip/npcx in a broken state -- it's fixed in a follow-up
CL.
BRANCH=None
BUG=chrome-os-partner:23796
TEST=With entire patch series, on both Samus and Glados:
- Verify 'version' EC console command is correct
- Verify 'flashrom -p ec -r read.bin' reads back EC image
- Verify software sync correctly flashes both EC and PD RW images
Change-Id: Idb3c4ed9f7f6edd0a6d49ad11753eba713e67a80
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/297484
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 19 | ||||
-rw-r--r-- | include/config_std_internal_flash.h | 6 | ||||
-rw-r--r-- | include/flash.h | 2 |
3 files changed, 23 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h index c14af4bf7d..248c7c4813 100644 --- a/include/config.h +++ b/include/config.h @@ -689,15 +689,30 @@ #define CONFIG_FLASH #undef CONFIG_FLASH_BANK_SIZE -#undef CONFIG_FLASH_BASE #undef CONFIG_FLASH_ERASED_VALUE32 #undef CONFIG_FLASH_ERASE_SIZE +/* Base address of program memory */ +#undef CONFIG_PROGRAM_MEMORY_BASE + +/* + * EC code can reside on internal or external storage. Only one of these + * CONFIGs should be defined. + */ +#undef CONFIG_EXTERNAL_STORAGE +#undef CONFIG_INTERNAL_STORAGE + /* * Flash is directly mapped into the EC's address space. If this is not * defined, the flash driver must implement flash_physical_read(). */ -#define CONFIG_FLASH_MAPPED +#define CONFIG_MAPPED_STORAGE + +/* + * Base address of memory-mapped flash storage, for platforms which define + * CONFIG_MAPPED_STORAGE. + */ +#undef CONFIG_MAPPED_STORAGE_BASE #undef CONFIG_FLASH_PHYSICAL_SIZE #undef CONFIG_FLASH_PROTECT_NEXT_BOOT diff --git a/include/config_std_internal_flash.h b/include/config_std_internal_flash.h index 10cd5baf5c..51bd011304 100644 --- a/include/config_std_internal_flash.h +++ b/include/config_std_internal_flash.h @@ -33,9 +33,13 @@ */ /* Memory-mapped internal flash w/ PSTATE */ -#define CONFIG_FLASH_MAPPED +#define CONFIG_INTERNAL_STORAGE +#define CONFIG_MAPPED_STORAGE #define CONFIG_FLASH_PSTATE +/* Program is run directly from storage */ +#define CONFIG_MAPPED_STORAGE_BASE CONFIG_PROGRAM_MEMORY_BASE + /* * The EC uses the one bank of flash to emulate a SPI-like write protect * register with persistent state. diff --git a/include/flash.h b/include/flash.h index 0c3d12e1e1..24922e04dc 100644 --- a/include/flash.h +++ b/include/flash.h @@ -201,7 +201,7 @@ int flash_dataptr(int offset, int size_req, int align, const char **ptrp); /** * Read from flash. * - * If flash is mapped (CONFIG_FLASH_MAPPED), it is usually more efficient to + * If flash is mapped (CONFIG_MAPPED_STORAGE), it is usually more efficient to * use flash_dataptr() to get a pointer directly to the flash memory rather * than use flash_read(), since the former saves a memcpy() operation. * |