From 4f5169df5ff2b63a40d654ab133b8a3108b6a599 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Tue, 4 May 2021 15:32:17 +0200 Subject: programmer_table: move each entry to the associated programmer source Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921 Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Nico Huber --- atahpt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'atahpt.c') diff --git a/atahpt.c b/atahpt.c index 327d74bd..0da39e0d 100644 --- a/atahpt.c +++ b/atahpt.c @@ -31,7 +31,7 @@ static uint32_t io_base_addr = 0; -const struct dev_entry ata_hpt[] = { +static const struct dev_entry ata_hpt[] = { {0x1103, 0x0004, NT, "Highpoint", "HPT366/368/370/370A/372/372N"}, {0x1103, 0x0005, NT, "Highpoint", "HPT372A/372N"}, {0x1103, 0x0006, NT, "Highpoint", "HPT302/302N"}, @@ -64,7 +64,7 @@ static const struct par_master par_master_atahpt = { .chip_writen = fallback_chip_writen, }; -int atahpt_init(void) +static int atahpt_init(void) { struct pci_dev *dev = NULL; uint32_t reg32; @@ -90,6 +90,16 @@ int atahpt_init(void) return 0; } +const struct programmer_entry programmer_atahpt = { + .name = "atahpt", + .type = PCI, + .devs.dev = ata_hpt, + .init = atahpt_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 -- cgit v1.2.3