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/atavia.c b/atavia.c
index b407a30..529f02f 100644
--- a/atavia.c
+++ b/atavia.c
@@ -48,7 +48,7 @@
 #define ENABLE_BYTE(address)	((~(1 << ((address) & 3))) & BROM_BYTE_ENABLE_MASK)
 #define BYTE_OFFSET(address)	(((addr) & 3) * 8)
 
-const struct dev_entry ata_via[] = {
+static const struct dev_entry ata_via[] = {
 	{PCI_VENDOR_ID_VIA, 0x3249, DEP, "VIA", "VT6421A"},
 
 	{0},
@@ -114,12 +114,12 @@
 	return ready;
 }
 
-void *atavia_map(const char *descr, uintptr_t phys_addr, size_t len)
+static void *atavia_map(const char *descr, uintptr_t phys_addr, size_t len)
 {
 	return (atavia_offset != 0) ? atavia_offset : (void *)phys_addr;
 }
 
-int atavia_init(void)
+static int atavia_init(void)
 {
 	char *arg = extract_programmer_param("offset");
 	if (arg) {
@@ -190,3 +190,13 @@
 	msg_pspew("%s: 0x%02x from 0x%*" PRIxPTR ".\n", __func__, val, PRIxPTR_WIDTH, addr);
 	return val;
 }
+
+const struct programmer_entry programmer_atavia = {
+	.name			= "atavia",
+	.type			= PCI,
+	.devs.dev		= ata_via,
+	.init			= atavia_init,
+	.map_flash_region	= atavia_map,
+	.unmap_flash_region	= fallback_unmap,
+	.delay			= internal_delay,
+};