diff options
author | Thomas Heijligen <thomas.heijligen@secunet.de> | 2021-05-04 15:32:17 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-10 12:49:16 +0000 |
commit | 4f5169df5ff2b63a40d654ab133b8a3108b6a599 (patch) | |
tree | d345dd5f3068a2325298234e302988b0c82a62e3 /atavia.c | |
parent | 085db626fbf609704136aa3cc51c70325d0b40e2 (diff) | |
download | flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.gz flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.tar.bz2 flashrom-4f5169df5ff2b63a40d654ab133b8a3108b6a599.zip |
programmer_table: move each entry to the associated programmer source
Change-Id: I3d02bd789f0299e936eb86819b3b15b5ea2bb921
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/52946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'atavia.c')
-rw-r--r-- | atavia.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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}, @@ -101,7 +101,7 @@ static bool atavia_ready(struct pci_dev *pcidev_dev) 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; } @@ -143,7 +143,7 @@ static const struct par_master lpc_master_atavia = { .chip_writen = fallback_chip_writen, }; -int atavia_init(void) +static int atavia_init(void) { char *arg = extract_programmer_param("offset"); if (arg) { @@ -188,3 +188,13 @@ int atavia_init(void) return 0; } + +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, +}; |