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/satamv.c b/satamv.c
index 31265ea..0b667f8 100644
--- a/satamv.c
+++ b/satamv.c
@@ -25,7 +25,7 @@
static uint8_t *mv_bar;
static uint16_t mv_iobar;
-const struct dev_entry satas_mv[] = {
+static const struct dev_entry satas_mv[] = {
/* 88SX6041 and 88SX6042 are the same according to the datasheet. */
{0x11ab, 0x7042, OK, "Marvell", "88SX7042 PCI-e 4-port SATA-II"},
@@ -69,7 +69,7 @@
* 0xc08 PCI BAR2 (Flash/NVRAM) Control
* 0x1046c Flash Parameters
*/
-int satamv_init(void)
+static int satamv_init(void)
{
struct pci_dev *dev = NULL;
uintptr_t addr;
@@ -188,6 +188,16 @@
return satamv_indirect_chip_readb(addr);
}
+const struct programmer_entry programmer_satamv = {
+ .name = "satamv",
+ .type = PCI,
+ .devs.dev = satas_mv,
+ .init = satamv_init,
+ .map_flash_region = fallback_map,
+ .unmap_flash_region = fallback_unmap,
+ .delay = internal_delay,
+};
+
#else
#error PCI port I/O access is not supported on this architecture yet.
#endif