diff options
author | Jes B. Klinke <jbk@chromium.org> | 2023-03-24 11:05:43 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-03 22:29:10 +0000 |
commit | fda81700ebb777cd61100eeaa7b8b0b1202473d6 (patch) | |
tree | 925f3b3668632bf6011966897b0cf537841cbd3e /board | |
parent | 310b3033ac604b87256b2bb2a99eabc5993d70fd (diff) | |
download | chrome-ec-fda81700ebb777cd61100eeaa7b8b0b1202473d6.tar.gz |
chip/stm32: Simplify usb_spi.c macro use
Moving the body of the USB_SPI_CONFIG() macro into usb_spi.c allows
eliminating the "trampoline functions", for a slight performance
improvement, and simplification of the code.
BUG=b:273601311
TEST=HyperDebug still able to forward SPI requests
Change-Id: Id64c0a30c791962dbe4360c92dc512e6c2adc2f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4370998
Tested-by: Jes Klinke <jbk@chromium.org>
Reviewed-by: Brian Nemec <bnemec@google.com>
Commit-Queue: Jes Klinke <jbk@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/c2d2/board.c | 2 | ||||
-rw-r--r-- | board/discovery-stm32f072/board.c | 2 | ||||
-rw-r--r-- | board/hammer/board.c | 1 | ||||
-rw-r--r-- | board/hyperdebug/board.c | 7 | ||||
-rw-r--r-- | board/servo_micro/board.c | 2 |
5 files changed, 0 insertions, 14 deletions
diff --git a/board/c2d2/board.c b/board/c2d2/board.c index f2184d1ce8..d8cf0f0e0a 100644 --- a/board/c2d2/board.c +++ b/board/c2d2/board.c @@ -329,8 +329,6 @@ void usb_spi_board_disable(void) STM32_GPIO_OSPEEDR(GPIO_B) &= ~0xff000000; } -USB_SPI_CONFIG(USB_IFACE_SPI, USB_EP_SPI); - /****************************************************************************** * Check parity setting on usarts. */ diff --git a/board/discovery-stm32f072/board.c b/board/discovery-stm32f072/board.c index b7e8d0f31d..1ba70c99d9 100644 --- a/board/discovery-stm32f072/board.c +++ b/board/discovery-stm32f072/board.c @@ -164,8 +164,6 @@ void usb_spi_board_disable(void) gpio_config_module(MODULE_SPI_FLASH, 0); } -USB_SPI_CONFIG(USB_IFACE_SPI, USB_EP_SPI); - /****************************************************************************** * Initialize board. */ diff --git a/board/hammer/board.c b/board/hammer/board.c index cf1aa842dc..2e46a636f3 100644 --- a/board/hammer/board.c +++ b/board/hammer/board.c @@ -84,7 +84,6 @@ const struct spi_device_t spi_devices[] = { }; const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); -USB_SPI_CONFIG(USB_IFACE_SPI, USB_EP_SPI); /* SPI interface is always enabled, no need to do anything. */ void usb_spi_board_enable(void) { diff --git a/board/hyperdebug/board.c b/board/hyperdebug/board.c index d685c37964..50d7855b1e 100644 --- a/board/hyperdebug/board.c +++ b/board/hyperdebug/board.c @@ -119,13 +119,6 @@ USB_STREAM_CONFIG(usart5_usb, USB_IFACE_USART5_STREAM, usart5_to_usb) /****************************************************************************** - * Support SPI bridging over USB, this requires usb_spi_board_enable and - * usb_spi_board_disable to be defined to enable and disable the SPI bridge. - */ - -USB_SPI_CONFIG(USB_IFACE_SPI, USB_EP_SPI); - -/****************************************************************************** * Define the strings used in our USB descriptors. */ diff --git a/board/servo_micro/board.c b/board/servo_micro/board.c index 6abe6dee3d..5f8bf1066f 100644 --- a/board/servo_micro/board.c +++ b/board/servo_micro/board.c @@ -331,8 +331,6 @@ void usb_spi_board_disable(void) gpio_config_module(MODULE_SPI_FLASH, 0); } -USB_SPI_CONFIG(USB_IFACE_SPI, USB_EP_SPI); - /****************************************************************************** * Support I2C bridging over USB. */ |