mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
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>
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user