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/meson.build b/meson.build
index 940f113..f1905f8 100644
--- a/meson.build
+++ b/meson.build
@@ -61,6 +61,7 @@
'jedec.c',
'layout.c',
'libflashprog.c',
+ 'memory_bus.c',
'opaque.c',
'parallel.c',
'print.c',