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

@ -46,14 +46,14 @@ static uint32_t rom_base_addr = 0;
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)"},
{0},
};
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;
@ -118,7 +118,7 @@ static const struct par_master par_master_atapromise = {
.chip_writen = fallback_chip_writen,
};
int atapromise_init(void)
static int atapromise_init(void)
{
struct pci_dev *dev = NULL;
@ -162,6 +162,16 @@ int atapromise_init(void)
return 0;
}
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