This fixes the patch:
"dm: sf: Add support for all targets which requires MANUAL_RELOC"
(sha1:
238448fed49cb1dae7ffd09939afeaa1918c408e)
to call the code only for manual relocation case.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
return device_remove(dev);
}
-static int reloc_done;
-
static int spi_flash_post_bind(struct udevice *dev)
{
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
struct dm_spi_flash_ops *ops = sf_get_ops(dev);
+ static int reloc_done = 0;
if (!reloc_done) {
if (ops->read)
reloc_done++;
}
+#endif
return 0;
}