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/atapromise.c b/atapromise.c
index ab34a1e..747a7fb 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -46,7 +46,7 @@
static uint8_t *atapromise_bar = NULL;
static size_t rom_size = 0;
-const struct dev_entry ata_promise[] = {
+static const struct dev_entry ata_promise[] = {
{0x105a, 0x4d38, NT, "Promise", "PDC20262 (FastTrak66/Ultra66)"},
{0x105a, 0x0d30, NT, "Promise", "PDC20265 (FastTrak100 Lite/Ultra100)"},
{0x105a, 0x4d30, OK, "Promise", "PDC20267 (FastTrak100/Ultra100)"},
@@ -67,7 +67,7 @@
.chip_writen = fallback_chip_writen,
};
-void *atapromise_map(const char *descr, uintptr_t phys_addr, size_t len)
+static void *atapromise_map(const char *descr, uintptr_t phys_addr, size_t len)
{
/* In case fallback_map ever returns something other than NULL. */
return NULL;
@@ -106,7 +106,7 @@
}
}
-int atapromise_init(void)
+static int atapromise_init(void)
{
struct pci_dev *dev = NULL;
@@ -165,6 +165,16 @@
return pci_mmio_readb(atapromise_bar + (addr & ADDR_MASK));
}
+const struct programmer_entry programmer_atapromise = {
+ .name = "atapromise",
+ .type = PCI,
+ .devs.dev = ata_promise,
+ .init = atapromise_init,
+ .map_flash_region = atapromise_map,
+ .unmap_flash_region = fallback_unmap,
+ .delay = internal_delay,
+};
+
#else
#error PCI port I/O access is not supported on this architecture yet.
#endif