From 267f3e30dfd85cb8197144b8a08ad0f8a4f5d5ed Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 1 Sep 2020 12:27:43 +0200 Subject: [PATCH] integration/soc/add_spi_flash: update to use new API. --- litex/soc/integration/soc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index 32a6b6d53..b57d3984a 100644 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -1370,8 +1370,8 @@ class LiteXSoC(SoC): endianness = self.cpu.endianness) spiflash.add_clk_primitive(self.platform.device) setattr(self.submodules, name, spiflash) - self.add_memory_region(name, self.mem_map[name], 0x1000000) # FIXME: Get size from SPI Flash - self.add_wb_slave(self.mem_map[name], spiflash.bus) + spiflash_region = SoCRegion(origin=self.mem_map.get(name, None), size=0x1000000) # FIXME: Get size from SPI Flash + self.bus.add_slave(name=name, slave=spiflash.bus, region=spiflash_region) self.csr.add(name, use_loc_if_exists=True) # Add SPI SDCard -------------------------------------------------------------------------------