summaryrefslogtreecommitdiff
path: root/board/cr50
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-07-07 16:39:42 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-09 12:30:38 +0000
commit0eb88ff59bd9a07ba23fa25e8e1b966782b6de73 (patch)
treeacda8862d565eafbe509b4854618bc4329b16f5b /board/cr50
parent08593b8fe02244a976e2653d25cd433bc50ff396 (diff)
downloadchrome-ec-0eb88ff59bd9a07ba23fa25e8e1b966782b6de73.tar.gz
Cr50: Enable host commands over SPI bus
This enables the feature that lets the Cr50 receive host commands via the SPI (slave) interface. BUG=chrome-os-partner:40969 BRANCH=none TEST=make buildall CQ-DEPEND=CL:283998 This CL also adds a test example in the extra/ftdi_hostcmd/ directory. To use it, you need the Cr50 attached to the build host via an FTDI USB-to-SPI adapter. cd extra/ftdi_hostcmd make ./test_cmds Change-Id: Ia719b1c898afc45b3105a9cd573a8492178d9be2 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/284001
Diffstat (limited to 'board/cr50')
-rw-r--r--board/cr50/board.h7
-rw-r--r--board/cr50/ec.tasklist1
2 files changed, 7 insertions, 1 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 42fcaa74a8..e93ff03ff1 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -26,8 +26,13 @@
/* Enable SPI Slave (SPS) module */
#define CONFIG_SPI
+#define CONFIG_HOSTCMD_SPI
+
+/* We don't need to send events to the AP */
+#undef CONFIG_HOSTCMD_EVENTS
+
+#endif /* not A1 */
-#endif
/*
* Allow dangerous commands all the time, since we don't have a write protect
* switch.
diff --git a/board/cr50/ec.tasklist b/board/cr50/ec.tasklist
index 961b7750bd..98404b339a 100644
--- a/board/cr50/ec.tasklist
+++ b/board/cr50/ec.tasklist
@@ -19,4 +19,5 @@
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \
TASK_ALWAYS(BLOB, blob_task, NULL, TASK_STACK_SIZE) \
+ TASK_NOTEST(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE)