nicamd: Introduce new programmer driver for AMD NICs
On a PCnet32 FAST card with a nice PLCC32 socket, only 18 of the 20 ad-
dress lines were connected. It's not easy to detect this, but we'll do
our best: Check the ROM contents for repeating patterns, and allow the
user to override the guessed size. We use the ROM BAR here, though not
for the actual flash reading / writing. According to the datasheet the
ROM BAR interface always reads four bytes, and doesn't seem to support
writes.
Otherwise tested successfully with the first 256KiB of an SST39VF040.
Datasheet used:
https://www.amd.com/content/dam/amd/en/documents/archived-tech-docs/datasheets/20550.pdf
Change-Id: I3bddfcd1e242d28790a0916197ebd8b8bba5a70a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/530
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/include/programmer.h b/include/programmer.h
index a2de74e..1aa57b4 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -82,6 +82,7 @@
extern const struct programmer_entry programmer_mstarddc_spi;
extern const struct programmer_entry programmer_ni845x_spi;
extern const struct programmer_entry programmer_nic3com;
+extern const struct programmer_entry programmer_nicamd;
extern const struct programmer_entry programmer_nicintel;
extern const struct programmer_entry programmer_nicintel_eeprom;
extern const struct programmer_entry programmer_nicintel_spi;