summaryrefslogtreecommitdiff
path: root/board/hammer/board.c
diff options
context:
space:
mode:
authorJes B. Klinke <jbk@chromium.org>2023-03-19 20:19:33 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-28 22:01:27 +0000
commit3d67ca20c4432a7258d4710c0be07d344998c992 (patch)
tree1d716eb70ba3e9a58e2944bc2170db5b53a59c2b /board/hammer/board.c
parent625d268fbd803a8af8d65f38aa60ec5d910feb69 (diff)
downloadchrome-ec-3d67ca20c4432a7258d4710c0be07d344998c992.tar.gz
chip/stm32: Eliminate support for multiple USB->SPI instances
For some reason, all methods in usb_spi.c pass along pointers to config and state, as if prepared to have multiple USB interfaces each implementing their own instance of the SPI->USB bridge protocol. Doing so would make little sense, as a single instance is already able to manipulate multiple SPI busses. This CL eliminates the pointer parameters, for a tiny performance improvement, and code simplification. BUG=b:273601311 TEST=none Change-Id: Ifbfdb18b4a2ba656732e4eb143de9f678416067a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4352128 Reviewed-by: Brian Nemec <bnemec@google.com> Tested-by: Jes Klinke <jbk@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org>
Diffstat (limited to 'board/hammer/board.c')
-rw-r--r--board/hammer/board.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/hammer/board.c b/board/hammer/board.c
index 85be6a0449..cfd953990d 100644
--- a/board/hammer/board.c
+++ b/board/hammer/board.c
@@ -84,12 +84,12 @@ const struct spi_device_t spi_devices[] = {
};
const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices);
-USB_SPI_CONFIG(usb_spi, USB_IFACE_I2C_SPI, USB_EP_I2C_SPI, 0);
+USB_SPI_CONFIG(USB_IFACE_I2C_SPI, USB_EP_I2C_SPI, 0);
/* SPI interface is always enabled, no need to do anything. */
-void usb_spi_board_enable(struct usb_spi_config const *config)
+void usb_spi_board_enable(void)
{
}
-void usb_spi_board_disable(struct usb_spi_config const *config)
+void usb_spi_board_disable(void)
{
}
#endif /* !HAS_SPI_TOUCHPAD */
@@ -206,7 +206,7 @@ static void board_init(void)
spi_enable(&spi_devices[SPI_ST_TP_DEVICE_ID], 0);
/* Disable SPI passthrough when the system is locked */
- usb_spi_enable(&usb_spi, system_is_locked());
+ usb_spi_enable(system_is_locked());
/* Set all four SPI pins to high speed */
/* pins B3/5, A15 */