From 220a51948649c316ba34cdbd33aa7913966b80f4 Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Wed, 1 Nov 2017 22:15:32 -0700 Subject: 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 Change-Id: I47ecb3250083e0e84d4cfae189858494814a48b4 Reviewed-on: https://chromium-review.googlesource.com/750593 Commit-Ready: Nick Sanders Tested-by: Nick Sanders Reviewed-by: Scott Collyer Reviewed-by: Wai-Hong Tam Reviewed-by: Shawn N Reviewed-on: https://chromium-review.googlesource.com/756256 Commit-Queue: Nick Sanders --- board/servo_v4/board.c | 56 ++------------------------------------------------ board/servo_v4/board.h | 6 ++---- 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/board/servo_v4/board.c b/board/servo_v4/board.c index 3e8a59f8f5..f4842d2a6c 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) /****************************************************************************** @@ -65,60 +67,6 @@ void board_config_pre_init(void) STM32_SYSCFG_CFGR1 |= (1 << 24); } -/****************************************************************************** - * 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 729051c73f..eae492e9a6 100644 --- a/board/servo_v4/board.h +++ b/board/servo_v4/board.h @@ -44,7 +44,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 @@ -54,15 +54,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 -- cgit v1.2.1