diff options
author | Louis Yung-Chieh Lo <yjlou@chromium.org> | 2012-08-23 15:30:05 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-25 15:12:41 -0700 |
commit | b11c1e234b86498311c340bd8b9b51b8d22e2ff5 (patch) | |
tree | 45100ad8096956ad5b7722df9ba593a9d654e515 /chip/stm32 | |
parent | 26f45005642527e51f6814ac8e98544651a8fba5 (diff) | |
download | chrome-ec-b11c1e234b86498311c340bd8b9b51b8d22e2ff5.tar.gz |
Rename EC_FLASH_PROTECT_RW_* flags to EC_FLASH_PROTECT_ALL_*.
Current *_RW_NOW/RW_AT_BOOT is used to lock the entire flash. This could
lead confusion in the future. So, rename them.
Since the bit definition is unchanged, thus the callers (u-boot, flashrom)
is fine if they don't change the name.
BUG=chrome-os-partner:12951
BRANCH=snow,link
TEST=build in chroot only:daisy,snow,link,bds
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Change-Id: I2395e93793f590e6fb8aae7006eb8e5c836002bc
Reviewed-on: https://gerrit.chromium.org/gerrit/31199
Commit-Ready: Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-by: Yung-Chieh Lo <yjlou@chromium.org>
Tested-by: Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'chip/stm32')
-rw-r--r-- | chip/stm32/flash-stm32f100.c | 11 | ||||
-rw-r--r-- | chip/stm32/flash-stm32l15x.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/chip/stm32/flash-stm32f100.c b/chip/stm32/flash-stm32f100.c index b42400ec7a..1221bf1b50 100644 --- a/chip/stm32/flash-stm32f100.c +++ b/chip/stm32/flash-stm32f100.c @@ -496,7 +496,7 @@ static int protect_entire_flash_until_reboot(void) /** * Determine if write protect register is inconsistent with RO_AT_BOOT and - * RW_AT_BOOT state. + * ALL_AT_BOOT state. */ static int register_need_reset(void) { @@ -589,8 +589,9 @@ uint32_t flash_get_protect(void) if (pstate.flags & PERSIST_FLAG_PROTECT_RO) flags |= EC_FLASH_PROTECT_RO_AT_BOOT; - if (entire_flash_locked) - flags |= EC_FLASH_PROTECT_RW_NOW; + if (entire_flash_locked) { + flags |= EC_FLASH_PROTECT_ALL_NOW; + } /* Scan flash protection */ for (i = 0; i < PHYSICAL_BANKS; i++) { @@ -599,7 +600,7 @@ uint32_t flash_get_protect(void) i < RO_BANK_OFFSET + RO_BANK_COUNT + PSTATE_BANK_COUNT) ? 1 : 0; int bank_flag = (is_ro ? EC_FLASH_PROTECT_RO_NOW : - EC_FLASH_PROTECT_RW_NOW); + EC_FLASH_PROTECT_ALL_NOW); if (flash_physical_get_protect(i)) { flags |= bank_flag; @@ -640,7 +641,7 @@ int flash_set_protect(uint32_t mask, uint32_t flags) EC_FLASH_PROTECT_RO_AT_BOOT)) return retval; - if (mask & EC_FLASH_PROTECT_RW_NOW) { + if (mask & EC_FLASH_PROTECT_ALL_NOW) { /* * Since RO is already protected, protecting entire flash * is effectively protecting RW. diff --git a/chip/stm32/flash-stm32l15x.c b/chip/stm32/flash-stm32l15x.c index 4ba2c66940..885047a032 100644 --- a/chip/stm32/flash-stm32l15x.c +++ b/chip/stm32/flash-stm32l15x.c @@ -315,7 +315,7 @@ uint32_t flash_get_protect(void) int is_ro = (i >= RO_BANK_OFFSET && i < RO_BANK_OFFSET + RO_BANK_COUNT); int bank_flag = (is_ro ? EC_FLASH_PROTECT_RO_NOW : - EC_FLASH_PROTECT_RW_NOW); + EC_FLASH_PROTECT_ALL_NOW); if (flash_physical_get_protect(i)) { /* At least one bank in the region is protected */ |