summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-07-17 11:38:43 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-25 04:20:23 +0000
commit6f13628e7f29816abfe5108cdde55c00c36e990b (patch)
tree7f27dbe3f6365761b333473a1ae2373d84546ffd /include
parent24a0b31732d00fe24f288ad7d7900ab5ee2b40f6 (diff)
downloadchrome-ec-6f13628e7f29816abfe5108cdde55c00c36e990b.tar.gz
cr50: Use distinct configuration option for SPI Slave support
SPI slave and master interfaces require very different code to support, they should have separate configuration options. Host command code printouts should use their own console channel. Using SPS to designate SPI Slave interface is not universally acceptable, a bug has been opened to discuss the alternatives and clean up the code. BRANCH=none BUG=chromium:512613 TEST=make buildall -j Change-Id: I6683286a221c4689ecc247fdfe8ebca529f3f458 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/286469 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h14
-rw-r--r--include/console.h1
2 files changed, 12 insertions, 3 deletions
diff --git a/include/config.h b/include/config.h
index 8cd6e5a19b..17d0712b79 100644
--- a/include/config.h
+++ b/include/config.h
@@ -835,9 +835,9 @@
#undef CONFIG_HOSTCMD_I2C_SLAVE_ADDR
/*
- * Accept EC host commands over the SPI (slave) interface.
+ * Accept EC host commands over the SPI slave (SPS) interface.
*/
-#undef CONFIG_HOSTCMD_SPI
+#undef CONFIG_HOSTCMD_SPS
/*
* Host command rate limiting assures EC will have time to process lower
@@ -1343,9 +1343,17 @@
/* Support smbus interface */
#undef CONFIG_SMBUS
-/* Support SPI (slave) interfaces */
+/* Support SPI master interfaces */
#undef CONFIG_SPI
+/*
+ * Support SPI Slave interfaces. The first board supporting this is cr50 and
+ * in its parlance SPI_SLAVE is called SPS. This convention might be
+ * reconsidered later, and the use of "SPI" in different config options needs
+ * to be cleand up. (crbug.com/512613).
+ */
+#undef CONFIG_SPS
+
/* Define SPI chip select GPIO pin. */
#undef CONFIG_SPI_CS_GPIO
diff --git a/include/console.h b/include/console.h
index 00036d3632..91bd7783c8 100644
--- a/include/console.h
+++ b/include/console.h
@@ -49,6 +49,7 @@ enum console_channel {
CC_PORT80,
CC_PWM,
CC_SPI,
+ CC_SPS,
CC_SWITCH,
CC_SYSTEM,
CC_TASK,