diff options
author | Mary Ruthven <mruthven@chromium.org> | 2017-03-02 10:34:46 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-07 00:34:07 -0800 |
commit | 0f2b3d0ca31f6a470d4f9e353c13d1e69c90d564 (patch) | |
tree | ef7c0a4c35a29a7dd405831973318513658d7e37 | |
parent | 34ad58828dd8d8cf1c9f7cd9c7b9645a5466a81d (diff) | |
download | chrome-ec-0f2b3d0ca31f6a470d4f9e353c13d1e69c90d564.tar.gz |
init_chip: add comment document pmu scratch registers
If we are using more PWRDN or LONG_LIFE scratch registers we want to
make sure we don't clobber any existing uses. The use for each scratch
register is not documented anywhere. This change adds a comment to
init_chip with listing the uses for each long life and pwrdn scratch
register.
BUG=none
BRANCH=cr50
TEST=make buildall
Change-Id: I1e7d5b1f86dfa1a996671e864fe768976987a85e
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/448819
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | chip/g/init_chip.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chip/g/init_chip.h b/chip/g/init_chip.h index 104a07c558..b4501618b0 100644 --- a/chip/g/init_chip.h +++ b/chip/g/init_chip.h @@ -6,6 +6,27 @@ #ifndef __CROS_EC_INIT_CHIP_H #define __CROS_EC_INIT_CHIP_H +/** + * This is the current state of the PMU persistent registers. There are two + * types: long life and pwrdn scratch. Long life will persist through any + * reset other than POR. PWRDN scratch only survives deep sleep. + * + * LONG_LIFE_SCRATCH 0 - 2 + * SCRATCH0 - Rollback counter + * SCRATCH1 - Board properties + * SCRATCH2 + * + * PWRDN_SCRATCH 0 - 15 - Locked + * + * PWRDN_SCRATCH 16 - 27 - Can be used by RW + * SCRATCH16 - Indicator that firmware is running for debug purposes + * + * SCRATCH18 - Preserving USB_DCFG through deep sleep + * + * PWRDN_SCRATCH 28 - 31 - Reserved for boot rom + */ + + enum permission_level { PERMISSION_LOW = 0x00, PERMISSION_MEDIUM = 0x33, /* APPS run at medium */ |