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/it8212.c b/it8212.c
index 8158a95..5daeb3b 100644
--- a/it8212.c
+++ b/it8212.c
@@ -64,7 +64,7 @@
/* Restore ROM BAR decode state automatically at shutdown. */
rpci_write_long(dev, PCI_ROM_ADDRESS, io_base_addr | 0x01);
- return register_par_master(&par_master_it8212, BUS_PARALLEL, IT8212_MEMMAP_SIZE, NULL);
+ return register_par_master(&par_master_it8212, BUS_PARALLEL, 0, IT8212_MEMMAP_SIZE, NULL);
}
static void it8212_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr)