summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-01-05 15:22:13 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-06 23:06:19 +0000
commit7455cd65a5414875376292cf22c261a2f24a46ea (patch)
treea6ff79fd518bfad6079d512e8ef84b52423cf42a
parentcef8f9101e441836669e9884512653414407bd04 (diff)
downloadchrome-ec-7455cd65a5414875376292cf22c261a2f24a46ea.tar.gz
coil: remove espi
This code uses coil terms we're removing, but we don't use it in platform/cr50. Remove the code instead of replacing the terms. BUG=b:175244613 TEST=make buildall -j Change-Id: I9f154866d8f57f918188f8ad4f4fabcb051c5c46 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613143 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r--common/build.mk1
-rw-r--r--common/espi.c57
-rw-r--r--include/espi.h97
3 files changed, 0 insertions, 155 deletions
diff --git a/common/build.mk b/common/build.mk
index 07ffc9f2b4..324ff35e1a 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -59,7 +59,6 @@ common-$(CONFIG_DEVICE_STATE)+=device_state.o
common-$(CONFIG_DPTF)+=dptf.o
common-$(CONFIG_EC_EFS_SUPPORT)+=ec_comm.o ec_efs.o
common-$(CONFIG_EXTRACT_PRINTF_STRINGS)+=cmsg.o
-common-$(CONFIG_HOSTCMD_ESPI)+=espi.o
common-$(CONFIG_EXTENSION_COMMAND)+=extension.o
common-$(CONFIG_EXTPOWER_GPIO)+=extpower_gpio.o
common-$(CONFIG_FANS)+=fan.o pwm.o
diff --git a/common/espi.c b/common/espi.c
deleted file mode 100644
index 0904f102d7..0000000000
--- a/common/espi.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright 2017 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* eSPI common functionality for Chrome EC */
-
-#include "common.h"
-#include "gpio.h"
-#include "registers.h"
-#include "espi.h"
-#include "timer.h"
-#include "util.h"
-
-
-const char *espi_vw_names[] = {
- "VW_SLP_S3_L",
- "VW_SLP_S4_L",
- "VW_SLP_S5_L",
- "VW_SUS_STAT_L",
- "VW_PLTRST_L",
- "VW_OOB_RST_WARN",
- "VW_OOB_RST_ACK",
- "VW_WAKE_L",
- "VW_PME_L",
- "VW_ERROR_FATAL",
- "VW_ERROR_NON_FATAL",
- /* Merge bit 3/0 into one signal. Need to set them simultaneously */
- "VW_SLAVE_BTLD_STATUS_DONE",
- "VW_SCI_L",
- "VW_SMI_L",
- "VW_RCIN_L",
- "VW_HOST_RST_ACK",
- "VW_HOST_RST_WARN",
- "VW_SUS_ACK",
- "VW_SUS_WARN_L",
- "VW_SUS_PWRDN_ACK_L",
- "VW_SLP_A_L",
- "VW_SLP_LAN",
- "VW_SLP_WLAN",
-};
-BUILD_ASSERT(ARRAY_SIZE(espi_vw_names) == VW_SIGNAL_COUNT);
-
-
-const char *espi_vw_get_wire_name(enum espi_vw_signal signal)
-{
- if (espi_signal_is_vw(signal))
- return espi_vw_names[signal - VW_SIGNAL_START];
-
- return NULL;
-}
-
-
-int espi_signal_is_vw(int signal)
-{
- return ((signal >= VW_SIGNAL_START) && (signal < VW_SIGNAL_END));
-}
diff --git a/include/espi.h b/include/espi.h
deleted file mode 100644
index 6d4de73330..0000000000
--- a/include/espi.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright 2016 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* eSPI module for Chrome EC */
-
-#ifndef __CROS_EC_ESPI_H
-#define __CROS_EC_ESPI_H
-
-#include "gpio_signal.h"
-
-/* Signal through VW */
-enum espi_vw_signal {
- /* The first valid VW signal is 0x2000 */
- VW_SIGNAL_START = IOEX_LIMIT + 1,
- VW_SLP_S3_L = VW_SIGNAL_START, /* index 02h (In) */
- VW_SLP_S4_L,
- VW_SLP_S5_L,
- VW_SUS_STAT_L, /* index 03h (In) */
- VW_PLTRST_L,
- VW_OOB_RST_WARN,
- VW_OOB_RST_ACK, /* index 04h (Out) */
- VW_WAKE_L,
- VW_PME_L,
- VW_ERROR_FATAL, /* index 05h (Out) */
- VW_ERROR_NON_FATAL,
- /* Merge bit 3/0 into one signal. Need to set them simultaneously */
- VW_SLAVE_BTLD_STATUS_DONE,
- VW_SCI_L, /* index 06h (Out) */
- VW_SMI_L,
- VW_RCIN_L,
- VW_HOST_RST_ACK,
- VW_HOST_RST_WARN, /* index 07h (In) */
- VW_SUS_ACK, /* index 40h (Out) */
- VW_SUS_WARN_L, /* index 41h (In) */
- VW_SUS_PWRDN_ACK_L,
- VW_SLP_A_L,
- VW_SLP_LAN, /* index 42h (In) */
- VW_SLP_WLAN,
- VW_SIGNAL_END,
- VW_LIMIT = 0x2FFF
-};
-BUILD_ASSERT(VW_SIGNAL_END < VW_LIMIT);
-
-#define VW_SIGNAL_COUNT (VW_SIGNAL_END - VW_SIGNAL_START)
-
-/**
- * Set eSPI Virtual-Wire signal to Host
- *
- * @param signal vw signal needs to set
- * @param level level of vw signal
- * @return EC_SUCCESS, or non-zero if error.
- */
-int espi_vw_set_wire(enum espi_vw_signal signal, uint8_t level);
-
-/**
- * Get eSPI Virtual-Wire signal from host
- *
- * @param signal vw signal needs to get
- * @return 1: set by host, otherwise: no signal
- */
-int espi_vw_get_wire(enum espi_vw_signal signal);
-
-/**
- * Enable VW interrupt of power sequence signal
- *
- * @param signal vw signal needs to enable interrupt
- * @return EC_SUCCESS, or non-zero if error.
- */
-int espi_vw_enable_wire_int(enum espi_vw_signal signal);
-
-/**
- * Disable VW interrupt of power sequence signal
- *
- * @param signal vw signal needs to disable interrupt
- * @return EC_SUCCESS, or non-zero if error.
- */
-int espi_vw_disable_wire_int(enum espi_vw_signal signal);
-
-/**
- * Return pointer to constant eSPI virtual wire signal name
- *
- * @param signal virtual wire enum
- * @return pointer to string or NULL if signal out of range
- */
-const char *espi_vw_get_wire_name(enum espi_vw_signal signal);
-
-/**
- * Check if signal is an eSPI virtual wire
- * @param signal is gpio_signal or espi_vw_signal enum casted to int
- * @return 1 if signal is virtual wire else returns 0.
- */
-int espi_signal_is_vw(int signal);
-
-
-#endif /* __CROS_EC_ESPI_H */