1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

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>
This commit is contained in:
Thomas Heijligen
2021-05-04 15:32:17 +02:00
committed by Nico Huber
parent 085db626fb
commit 4f5169df5f
41 changed files with 506 additions and 617 deletions

View File

@ -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,
};