memory_bus: Turn flashbase into a par_master member `rom_base`
Get rid of the global `flashbase`. Treat overrides for the `rom_base`
similar to `max_rom_decode`: Gather the information in `internal_data`
and then pass it to register_par_master().
Change-Id: Ib9ed7234a849fe3550200fd602226d0036da15f0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/436
diff --git a/nicnatsemi.c b/nicnatsemi.c
index 44c7ef4..57a326a 100644
--- a/nicnatsemi.c
+++ b/nicnatsemi.c
@@ -70,7 +70,7 @@
* to be 64KiB; and the mask in the read/write functions below wants
* to be 0x0000FFFF.
*/
- return register_par_master(&par_master_nicnatsemi, BUS_PARALLEL, 128*KiB, NULL);
+ return register_par_master(&par_master_nicnatsemi, BUS_PARALLEL, 0, 128*KiB, NULL);
}
static void nicnatsemi_chip_writeb(const struct flashctx *flash, uint8_t val,