programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946
Original-Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71373
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/pickit2_spi.c b/pickit2_spi.c
index 0bc17af..0e189a9 100644
--- a/pickit2_spi.c
+++ b/pickit2_spi.c
@@ -46,7 +46,7 @@
#include "programmer.h"
#include "spi.h"
-const struct dev_entry devs_pickit2_spi[] = {
+static const struct dev_entry devs_pickit2_spi[] = {
{0x04D8, 0x0033, OK, "Microchip", "PICkit 2"},
{0}
@@ -378,7 +378,7 @@
return ret;
}
-int pickit2_spi_init(void)
+static int pickit2_spi_init(void)
{
uint8_t buf[CMD_LENGTH] = {
CMD_EXEC_SCRIPT,
@@ -489,3 +489,13 @@
return 0;
}
+
+const struct programmer_entry programmer_pickit2_spi = {
+ .name = "pickit2_spi",
+ .type = USB,
+ .devs.dev = devs_pickit2_spi,
+ .init = pickit2_spi_init,
+ .map_flash_region = fallback_map,
+ .unmap_flash_region = fallback_unmap,
+ .delay = internal_delay,
+};