diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-07-11 14:10:05 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-12 11:32:06 -0700 |
commit | 347b5062a429922cabfa49de8f11fe8cebf8f9f1 (patch) | |
tree | 2727d5c48b8312cfab04805294a11f2c5de47626 /common/temp_sensor.c | |
parent | 0398874210b52d48c52ac95601a504fbf1b61e59 (diff) | |
download | chrome-ec-347b5062a429922cabfa49de8f11fe8cebf8f9f1.tar.gz |
Initialize memory mapped data and add data versions
BUG=chrome-os-partner:11275
TEST=manual
localhost ~ # io_read8 0x920
0x45 // 'E'
localhost ~ # io_read8 0x921
0x43 // 'C'
localhost ~ # io_read8 0x922
0x01 // version 1
localhost ~ # io_read8 0x9fe
0x00 // unused data initialized to 0
Change-Id: If8de85ddc0e5f99b7c4213214d4b2d30b1439da8
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27196
Diffstat (limited to 'common/temp_sensor.c')
-rw-r--r-- | common/temp_sensor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/temp_sensor.c b/common/temp_sensor.c index 257b1a372b..5579683aa8 100644 --- a/common/temp_sensor.c +++ b/common/temp_sensor.c @@ -97,6 +97,10 @@ static void update_mapped_memory(void) void temp_sensor_task(void) { int i; + + /* Switch data is now present */ + *host_get_memmap(EC_MEMMAP_THERMAL_VERSION) = 1; + while (1) { for (i = 0; i < 4; ++i) { usleep(250000); |