targets: Ensure litex.soc.cores.spi_flash is no longer imported/used.

This commit is contained in:
Florent Kermarrec 2022-01-07 19:07:14 +01:00
parent 4b6a9b2cf0
commit 8a33c2aa31
3 changed files with 5 additions and 4 deletions

View File

@ -90,7 +90,7 @@ class BaseSoC(SoCCore):
self.icap.add_reload() self.icap.add_reload()
self.icap.add_timing_constraints(platform, sys_clk_freq, self.crg.cd_sys.clk) self.icap.add_timing_constraints(platform, sys_clk_freq, self.crg.cd_sys.clk)
# Flash (For SPIFlash update over PCIe). FIXME: Should probably be updated to use SpiFlashSingle/SpiFlashDualQuad (so MMAPed and do the update with bit-banging) # Flash (For SPIFlash update over PCIe).
from litex.soc.cores.gpio import GPIOOut from litex.soc.cores.gpio import GPIOOut
from litex.soc.cores.spi_flash import S7SPIFlash from litex.soc.cores.spi_flash import S7SPIFlash
self.submodules.flash_cs_n = GPIOOut(platform.request("flash_cs_n")) self.submodules.flash_cs_n = GPIOOut(platform.request("flash_cs_n"))

View File

@ -21,7 +21,6 @@ from litex.soc.cores.clock import iCE40PLL
from litex.soc.integration.soc_core import * from litex.soc.integration.soc_core import *
from litex.soc.integration.soc import SoCRegion from litex.soc.integration.soc import SoCRegion
from litex.soc.integration.builder import * from litex.soc.integration.builder import *
from litex.soc.cores.spi_flash import SpiFlash
from litex.soc.cores.led import LedChaser from litex.soc.cores.led import LedChaser
from litex.soc.cores.uart import UARTWishboneBridge from litex.soc.cores.uart import UARTWishboneBridge
@ -92,7 +91,9 @@ class BaseSoC(SoCCore):
) )
# SPI Flash -------------------------------------------------------------------------------- # SPI Flash --------------------------------------------------------------------------------
self.add_spi_flash(mode="1x", dummy_cycles=8) from litespi.modules import M25PX32
from litespi.opcodes import SpiNorFlashOpCodes as Codes
self.add_spi_flash(mode="1x", module=M25PX32(Codes.READ_1_1_1), with_master=False)
# Add ROM linker region -------------------------------------------------------------------- # Add ROM linker region --------------------------------------------------------------------
self.bus.add_region("rom", SoCRegion( self.bus.add_region("rom", SoCRegion(

View File

@ -117,7 +117,7 @@ class BaseSoC(SoCCore):
self.icap.add_reload() self.icap.add_reload()
self.icap.add_timing_constraints(platform, sys_clk_freq, self.crg.cd_sys.clk) self.icap.add_timing_constraints(platform, sys_clk_freq, self.crg.cd_sys.clk)
# Flash (For SPIFlash update over PCIe). FIXME: Should probably be updated to use SpiFlashSingle/SpiFlashDualQuad (so MMAPed and do the update with bit-banging) # Flash (For SPIFlash update over PCIe).
from litex.soc.cores.gpio import GPIOOut from litex.soc.cores.gpio import GPIOOut
from litex.soc.cores.spi_flash import S7SPIFlash from litex.soc.cores.spi_flash import S7SPIFlash
self.submodules.flash_cs_n = GPIOOut(platform.request("flash_cs_n")) self.submodules.flash_cs_n = GPIOOut(platform.request("flash_cs_n"))