diff options
author | Peter Marheine <pmarheine@chromium.org> | 2020-03-16 16:26:07 +1100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-19 01:41:12 +0000 |
commit | 124b2a8654b1bca281277b581fb79daeb1bdadde (patch) | |
tree | 30b050c1fa60306a0b61ad0d567d5f824853b2ae /chip | |
parent | 2a379727777f88266a3fb45e765863c5892d65f3 (diff) | |
download | chrome-ec-124b2a8654b1bca281277b581fb79daeb1bdadde.tar.gz |
Rename Cortex-M MMFS to CFSR
Taken as as 32-bit register, ARM call the register at 0xe000ed28 CFSR;
the Configurable Fault Status Register. MMFS is the low byte of this
value, so it's misleading to refer to the whole 32-bit value as MMFS;
instead call it CFSR to make it clear that the value we store
encompasses the MMFSR, BFSR and UFSR.
BUG=None
BRANCH=None
TEST=make buildall
Change-Id: Ifd62e0a6f27a2e6ddfa509b84c389d960347ff85
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2104807
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/npcx/system.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chip/npcx/system.c b/chip/npcx/system.c index 48422902e0..d6d2c3b0b2 100644 --- a/chip/npcx/system.c +++ b/chip/npcx/system.c @@ -238,7 +238,7 @@ void system_set_rtc(uint32_t seconds) * * index | data * ==========|============= - * 36 | MMFS + * 36 | CFSR * 40 | HFSR * 44 | BFAR * 48 | LREG1 @@ -247,11 +247,11 @@ void system_set_rtc(uint32_t seconds) * 60 | reserved * * Above registers are chosen to be saved in case of panic because: - * 1. MMFS, HFSR and BFAR seem to provide more information about the fault. + * 1. CFSR, HFSR and BFAR seem to provide more information about the fault. * 2. LREG1, LREG3 and LREG4 store exception, reason and info in case of * software panic. */ -#define BKUP_MMFS (BBRM_DATA_INDEX_PANIC_BKUP + 0) +#define BKUP_CFSR (BBRM_DATA_INDEX_PANIC_BKUP + 0) #define BKUP_HFSR (BBRM_DATA_INDEX_PANIC_BKUP + 4) #define BKUP_BFAR (BBRM_DATA_INDEX_PANIC_BKUP + 8) #define BKUP_LREG1 (BBRM_DATA_INDEX_PANIC_BKUP + 12) @@ -267,7 +267,7 @@ void chip_panic_data_backup(void) if (!d) return; - bbram_data_write(BKUP_MMFS, d->cm.mmfs); + bbram_data_write(BKUP_CFSR, d->cm.cfsr); bbram_data_write(BKUP_HFSR, d->cm.hfsr); bbram_data_write(BKUP_BFAR, d->cm.dfsr); bbram_data_write(BKUP_LREG1, d->cm.regs[1]); @@ -281,7 +281,7 @@ static void chip_panic_data_restore(void) struct panic_data *d = PANIC_DATA_PTR; /* Ensure BBRAM is valid. */ - if (!bbram_valid(BKUP_MMFS, 4)) + if (!bbram_valid(BKUP_CFSR, 4)) return; /* Ensure Panic data in BBRAM is valid. */ @@ -295,7 +295,7 @@ static void chip_panic_data_restore(void) d->struct_version = 2; d->arch = PANIC_ARCH_CORTEX_M; - d->cm.mmfs = bbram_data_read(BKUP_MMFS); + d->cm.cfsr = bbram_data_read(BKUP_CFSR); d->cm.hfsr = bbram_data_read(BKUP_HFSR); d->cm.dfsr = bbram_data_read(BKUP_BFAR); |