gfxmatrox: Introduce new programmer driver for Matrox Millenium cards

Supports a 64KiB parallel flash. ROM BAR configuration is tricky: The
register is only accessible when a special `biosen` bit is set. An OS
might not know this and is then unable to assign an address. We'll of-
fer to re-purpose the MMIO BAR address, but one has to be sure that no
graphics driver is running.

Datasheet used:
https://www.vintage3d.org/doc/matrox/2164spec.pdf

Change-Id: Ief6c05c8fbf752814d436ac3b47e87de0c977047
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/532
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/Makefile b/Makefile
index a9f2429..11eb07b 100644
--- a/Makefile
+++ b/Makefile
@@ -113,6 +113,7 @@
 DEPENDS_ON_RAW_MEM_ACCESS := \
 	CONFIG_ATAPROMISE \
 	CONFIG_DRKAISER \
+	CONFIG_GFXMATROX \
 	CONFIG_GFXNVIDIA \
 	CONFIG_INTERNAL \
 	CONFIG_IT8212 \
@@ -143,6 +144,7 @@
 	CONFIG_ATAPROMISE \
 	CONFIG_ATAVIA \
 	CONFIG_DRKAISER \
+	CONFIG_GFXMATROX \
 	CONFIG_GFXNVIDIA \
 	CONFIG_INTERNAL \
 	CONFIG_IT8212 \
@@ -440,6 +442,9 @@
 # Always enable AMD NICs for now.
 CONFIG_NICAMD ?= yes
 
+# Enable Matrox graphics cards.
+CONFIG_GFXMATROX ?= yes
+
 # Enable NVIDIA graphics cards. Note: write and erase do not work properly.
 CONFIG_GFXNVIDIA ?= yes
 
@@ -657,6 +662,11 @@
 PROGRAMMER_OBJS += nicamd.o
 endif
 
+ifeq ($(CONFIG_GFXMATROX), yes)
+FEATURE_FLAGS += -D'CONFIG_GFXMATROX=1'
+PROGRAMMER_OBJS += gfxmatrox.o
+endif
+
 ifeq ($(CONFIG_GFXNVIDIA), yes)
 FEATURE_FLAGS += -D'CONFIG_GFXNVIDIA=1'
 PROGRAMMER_OBJS += gfxnvidia.o