memory_bus: Move (un)map_flash_region into par master
Now that the map/unmap_flash functions are only called from memory-
mapped chip drivers, we can safely move the hooks into the parallel
masters.
This also allows us to move the code away from the globals in
`flashprog.c` into a new `memory_bus.c`.
Change-Id: Ic476cf4d96200232900537b997e1d07bb4e8b809
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72522
Reviewed-by: Riku Viitanen <riku.viitanen@protonmail.com>
diff --git a/Makefile b/Makefile
index 1a9fb47..6da3458 100644
--- a/Makefile
+++ b/Makefile
@@ -383,7 +383,7 @@
###############################################################################
# Flash chip drivers and bus support infrastructure.
-CHIP_OBJS = jedec.o stm50.o w39.o w29ee011.o \
+CHIP_OBJS = memory_bus.o jedec.o stm50.o w39.o w29ee011.o \
sst28sf040.o 82802ab.o \
sst49lfxxxc.o sst_fwhub.o edi.o flashchips.o spi.o spi25.o spi25_statusreg.o \
spi95.o opaque.o sfdp.o en29lv640b.o at45db.o \