memory_bus: Drop stale `size == 0` workaround and FIXME
All chips using the prepare_memory_mapping() function have a size set.
Change-Id: Id5c56a1ebd00563de162b74f762c23aaa0e6d824
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/72524
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/memory_bus.c b/memory_bus.c
index 9c57d3b..ff6799e 100644
--- a/memory_bus.c
+++ b/memory_bus.c
@@ -48,14 +48,6 @@
flash->virtual_memory = (chipaddr)ERROR_PTR;
flash->virtual_registers = (chipaddr)ERROR_PTR;
- /*
- * FIXME: This avoids mapping (and unmapping) of flash chip definitions with size 0.
- * These are used for various probing-related hacks that would not map successfully
- * anyway and should be removed ASAP.
- */
- if (flash->chip->total_size == 0)
- return 0;
-
const chipsize_t size = flash->chip->total_size * 1024;
const uintptr_t base = flashbase ? flashbase : (0xffffffff - size + 1);
void *const addr = programmer_map_flash_region(flash, flash->chip->name, base, size);