diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-05-04 15:32:17 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-10 12:49:16 +0000 |
commit | 4f5169df5ff2b63a40d654ab133b8a3108b6a599 (patch) | |
tree | d345dd5f3068a2325298234e302988b0c82a62e3 /developerbox_spi.c | |
parent | 085db626fbf609704136aa3cc51c70325d0b40e2 (diff) | |
download | flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.gz flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.bz2 flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.zip |
programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'developerbox_spi.c')
-rw-r--r-- | developerbox_spi.c | 14 |
1 files changed, 12 insertions, 2 deletions
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, +}; |