summaryrefslogtreecommitdiff
path: root/chip
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 /chip
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 'chip')
-rw-r--r--chip/g/build.mk4
-rw-r--r--chip/g/sps.c4
-rw-r--r--chip/g/sps_hc.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/chip/g/build.mk b/chip/g/build.mk
index 40a9ed2ba8..a9747d3aea 100644
--- a/chip/g/build.mk
+++ b/chip/g/build.mk
@@ -18,8 +18,8 @@ CPPFLAGS+= -DGC_REVISION="$(ver_str)"
# Required chip modules
chip-y=clock.o gpio.o hwtimer.o jtag.o system.o uart.o
chip-y+= pmu.o
-chip-$(CONFIG_SPI)+= sps.o
-chip-$(CONFIG_HOSTCMD_SPI)+=sps_hc.o
+chip-$(CONFIG_SPS)+= sps.o
+chip-$(CONFIG_HOSTCMD_SPS)+=sps_hc.o
chip-$(CONFIG_WATCHDOG)+=watchdog.o
chip-$(CONFIG_USB)+=usb.o usb_endpoints.o
diff --git a/chip/g/sps.c b/chip/g/sps.c
index faeb43ccb2..9e1bccea2c 100644
--- a/chip/g/sps.c
+++ b/chip/g/sps.c
@@ -57,8 +57,8 @@
static uint32_t sps_tx_count, sps_rx_count, tx_empty_count, max_rx_batch;
/* Console output macros */
-#define CPUTS(outstr) cputs(CC_SPI, outstr)
-#define CPRINTS(format, args...) cprints(CC_SPI, format, ## args)
+#define CPUTS(outstr) cputs(CC_SPS, outstr)
+#define CPRINTS(format, args...) cprints(CC_SPS, format, ## args)
void sps_tx_status(uint8_t byte)
{
diff --git a/chip/g/sps_hc.c b/chip/g/sps_hc.c
index d046117549..d99e095ab9 100644
--- a/chip/g/sps_hc.c
+++ b/chip/g/sps_hc.c
@@ -32,9 +32,9 @@
*/
/* Console output macros */
-#define CPUTS(outstr) cputs(CC_SPI, outstr)
-#define CPRINTS(format, args...) cprints(CC_SPI, format, ## args)
-#define CPRINTF(format, args...) cprintf(CC_SPI, format, ## args)
+#define CPUTS(outstr) cputs(CC_HOSTCMD, outstr)
+#define CPRINTS(format, args...) cprints(CC_HOSTCMD, format, ## args)
+#define CPRINTF(format, args...) cprintf(CC_HOSTCMD, format, ## args)
/*
* Incoming messages are collected here until they're ready to process. The