summaryrefslogtreecommitdiff
path: root/common/host_command.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-11 14:10:05 -0700
committerGerrit <chrome-bot@google.com>2012-07-12 11:32:06 -0700
commit347b5062a429922cabfa49de8f11fe8cebf8f9f1 (patch)
tree2727d5c48b8312cfab04805294a11f2c5de47626 /common/host_command.c
parent0398874210b52d48c52ac95601a504fbf1b61e59 (diff)
downloadchrome-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/host_command.c')
-rw-r--r--common/host_command.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/host_command.c b/common/host_command.c
index a5feb73653..716119b909 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -202,6 +202,13 @@ enum ec_status host_command_process(struct host_cmd_handler_args *args)
static int host_command_init(void)
{
+ /* Initialize memory map ID area */
+ host_get_memmap(EC_MEMMAP_ID)[0] = 'E';
+ host_get_memmap(EC_MEMMAP_ID)[1] = 'C';
+ *host_get_memmap(EC_MEMMAP_ID_VERSION) = 1;
+ *host_get_memmap(EC_MEMMAP_EVENTS_VERSION) = 1;
+
+
host_set_single_event(EC_HOST_EVENT_INTERFACE_READY);
CPRINTF("[%T hostcmd init 0x%x]\n", host_get_events());