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/linux_spi.c b/linux_spi.c
index 1ef8f2b..b0a2801 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -69,7 +69,7 @@
 	.write_aai	= default_spi_write_aai,
 };
 
-int linux_spi_init(void)
+static int linux_spi_init(void)
 {
 	char *p, *endp, *dev;
 	uint32_t speed_hz = 2 * 1000 * 1000;
@@ -234,4 +234,14 @@
 	return spi_write_chunked(flash, buf, start, len, max_kernel_buf_size - 5);
 }
 
+const struct programmer_entry programmer_linux_spi = {
+	.name			= "linux_spi",
+	.type			= OTHER,
+	.devs.note		= "Device files /dev/spidev*.*\n",
+	.init			= linux_spi_init,
+	.map_flash_region	= fallback_map,
+	.unmap_flash_region	= fallback_unmap,
+	.delay			= internal_delay,
+};
+
 #endif // CONFIG_LINUX_SPI == 1