From d614eaf1bf1f22b8a4bec8139a94fafd3e3328b0 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Thu, 18 Aug 2016 15:58:09 -0700 Subject: [PATCH] g: Remove obsolete spstpm command At one time we could switch between TPM and HC protocols on the SPI slave bus. We disabled the HC protocol long ago with commit e4690f61524e. This CL removes the spstpm command, since there's no longer any point to having a console command to disable the TPM protocol too (which would leave us with nothing listening to incoming traffic on the SPI bus). BUG=none BRANCH=none TEST=make buildall; test on Cr50 hardware Change-Id: Ic5028dfc1631fab4ddf2584635cb48be50d05d4d Signed-off-by: Bill Richardson Reviewed-on: https://chromium-review.googlesource.com/373638 Reviewed-by: Vadim Bendebury --- chip/g/sps_tpm.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/chip/g/sps_tpm.c b/chip/g/sps_tpm.c index 8af3765642..054697f545 100644 --- a/chip/g/sps_tpm.c +++ b/chip/g/sps_tpm.c @@ -267,33 +267,3 @@ void sps_tpm_enable(void) sps_register_rx_handler(SPS_GENERIC_MODE, tpm_rx_handler, 3); init_new_cycle(); } - -static void sps_tpm_disable(void) -{ - sps_tpm_state = SPS_TPM_STATE_PONDERING; - sps_unregister_rx_handler(); - /* We don't care anymore, so we can sleep whenever */ - delay_sleep_by(0); - enable_sleep(SLEEP_MASK_SPI); -} - -static int command_sps_tpm(int argc, char **argv) -{ - if (argc > 1) { - if (0 != strcasecmp(argv[1], "off")) - return EC_ERROR_PARAM1; - - sps_tpm_disable(); - ccprintf("TPM SPI protocol disabled\n"); - return EC_SUCCESS; - } - - sps_tpm_enable(); - ccprintf("TPM SPI protocol enabled\n"); - return EC_SUCCESS; -} - -DECLARE_CONSOLE_COMMAND(spstpm, command_sps_tpm, - "[off]", - "Not sure yet...", - NULL);