summaryrefslogtreecommitdiffstats
path: root/atapromise.c
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.de>2021-05-04 15:32:17 +0200
committerNico Huber <nico.h@gmx.de>2021-06-10 12:49:16 +0000
commit4f5169df5ff2b63a40d654ab133b8a3108b6a599 (patch)
treed345dd5f3068a2325298234e302988b0c82a62e3 /atapromise.c
parent085db626fbf609704136aa3cc51c70325d0b40e2 (diff)
downloadflashrom-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 'atapromise.c')
-rw-r--r--atapromise.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/atapromise.c b/atapromise.c
index 4941a7c28..171b22f56 100644
--- a/atapromise.c
+++ b/atapromise.c
@@ -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