summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Sanders <nsanders@chromium.org>2017-11-01 22:15:32 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-11-04 00:31:47 -0700
commit1f9b681ac16fd60c245ecd86391f883035cb1037 (patch)
tree218d69aa3455cbbb7dcd05d7387bf00e534ad1b5
parentc7914f2ec03e94b871052b6893da0ef088bccb40 (diff)
downloadchrome-ec-1f9b681ac16fd60c245ecd86391f883035cb1037.tar.gz
servo_v4: remove gpio endpoint.
We have an ec3po gpio driver that also works. Let's save some flash space by using that instead, and deleting the gpio usb endpoint. Saves 448 bytes. BUG=None BRANCH=servo TEST=servod still runs. Signed-off-by: Nick Sanders <nsanders@chromium.org> Change-Id: If1c764c97fba4798f8501a0c0364d2690d2fd2f0 Reviewed-on: https://chromium-review.googlesource.com/750593 Commit-Ready: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/servo_v4/board.c56
-rw-r--r--board/servo_v4/board.h6
2 files changed, 4 insertions, 58 deletions
diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c
index 337d9a1fba..eaf0a58b28 100644
--- a/board/servo_v4/board.c
+++ b/board/servo_v4/board.c
@@ -28,6 +28,8 @@
#include "usb-stream.h"
#include "util.h"
+#include "gpio_list.h"
+
#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args)
/******************************************************************************
@@ -66,60 +68,6 @@ void board_config_pre_init(void)
}
/******************************************************************************
- * Build GPIO tables and expose a subset of the GPIOs over USB.
- */
-
-#include "gpio_list.h"
-
-static enum gpio_signal const usb_gpio_list[] = {
-/* Outputs */
-GPIO_DUT_CHG_EN, /* 0 */
-GPIO_HOST_OR_CHG_CTL,
-GPIO_DP_HPD,
-GPIO_SBU_UART_SEL,
-GPIO_HOST_USB_HUB_RESET_L,
-GPIO_FASTBOOT_DUTHUB_MUX_SEL, /* 5 */
-GPIO_SBU_MUX_EN,
-GPIO_FASTBOOT_DUTHUB_MUX_EN_L,
-GPIO_DUT_HUB_USB_RESET_L,
-GPIO_ATMEL_HWB_L,
-GPIO_CMUX_EN, /* 10 */
-GPIO_EMMC_MUX_EN_L,
-GPIO_EMMC_PWR_EN,
-
-
-/* Inputs */
-GPIO_USERVO_FAULT_L,
-GPIO_USB_FAULT_L,
-GPIO_DONGLE_DET, /* 15 */
-
-GPIO_USB_DET_PP_DUT,
-GPIO_USB_DET_PP_CHG,
-
-GPIO_USB_DUT_CC2_RPUSB,
-GPIO_USB_DUT_CC2_RD,
-GPIO_USB_DUT_CC2_RA, /* 20 */
-GPIO_USB_DUT_CC1_RP3A0,
-GPIO_USB_DUT_CC1_RP1A5,
-GPIO_USB_DUT_CC1_RPUSB,
-GPIO_USB_DUT_CC1_RD,
-GPIO_USB_DUT_CC1_RA, /* 25 */
-GPIO_USB_DUT_CC2_RP3A0,
-GPIO_USB_DUT_CC2_RP1A5,
-
-};
-
-/*
- * This instantiates struct usb_gpio_config const usb_gpio, plus several other
- * variables, all named something beginning with usb_gpio_
- */
-USB_GPIO_CONFIG(usb_gpio,
- usb_gpio_list,
- USB_IFACE_GPIO,
- USB_EP_GPIO);
-
-
-/******************************************************************************
* Set up USB PD
*/
diff --git a/board/servo_v4/board.h b/board/servo_v4/board.h
index aef30865b6..2b027af5c1 100644
--- a/board/servo_v4/board.h
+++ b/board/servo_v4/board.h
@@ -46,7 +46,7 @@
/* USB interface indexes (use define rather than enum to expand them) */
#define USB_IFACE_CONSOLE 0
-#define USB_IFACE_GPIO 1
+#define USB_IFACE_EMPTY 1
#define USB_IFACE_I2C 2
#define USB_IFACE_USART3_STREAM 3
#define USB_IFACE_USART4_STREAM 4
@@ -56,15 +56,13 @@
/* USB endpoint indexes (use define rather than enum to expand them) */
#define USB_EP_CONTROL 0
#define USB_EP_CONSOLE 1
-#define USB_EP_GPIO 2
+#define USB_EP_EMPTY 2
#define USB_EP_I2C 3
#define USB_EP_USART3_STREAM 4
#define USB_EP_USART4_STREAM 5
#define USB_EP_UPDATE 6
#define USB_EP_COUNT 7
-/* Enable control of GPIOs over USB */
-#define CONFIG_USB_GPIO
/* Enable console recasting of GPIO type. */
#define CONFIG_CMD_GPIO_EXTENDED