From 4f5169df5ff2b63a40d654ab133b8a3108b6a599 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 4 May 2021 15:32:17 +0200 Subject: programmer_table: move each entry to the associated programmer source Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921 Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Nico Huber --- developerbox_spi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'developerbox_spi.c') diff --git a/developerbox_spi.c b/developerbox_spi.c index e4ab6f6f..5573d6fc 100644 --- a/developerbox_spi.c +++ b/developerbox_spi.c @@ -55,7 +55,7 @@ #define CP210X_WRITE_LATCH 0x37e1 #define CP210X_READ_LATCH 0x00c2 -const struct dev_entry devs_developerbox_spi[] = { +static const struct dev_entry devs_developerbox_spi[] = { {0x10c4, 0xea60, OK, "Silicon Labs", "CP2102N USB to UART Bridge Controller"}, {0}, }; @@ -144,7 +144,7 @@ static int developerbox_spi_shutdown(void *spi_data) return 0; } -int developerbox_spi_init(void) +static int developerbox_spi_init(void) { struct libusb_context *usb_ctx; libusb_device_handle *cp210x_handle; @@ -190,3 +190,13 @@ err_exit: libusb_exit(usb_ctx); return 1; } + +const struct programmer_entry programmer_developerbox = { + .name = "developerbox", + .type = USB, + .devs.dev = devs_developerbox_spi, + .init = developerbox_spi_init, + .map_flash_region = fallback_map, + .unmap_flash_region = fallback_unmap, + .delay = internal_delay, +}; -- cgit v1.2.3