Skip to content

Commit

Permalink
soc/add_spi_flash: Revert PHY_FREQUENCY definition and use in BIOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Feb 20, 2024
1 parent 03340bc commit d78dbd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions litex/soc/integration/soc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,6 +1955,7 @@ def add_spi_flash(self, name="spiflash", mode="4x", clk_freq=20e6, module=None,
self.bus.add_slave(name=name, slave=spiflash_core.bus, region=spiflash_region)

# Constants.
self.add_constant(f"{name}_PHY_FREQUENCY", clk_freq)
self.add_constant(f"{name}_MODULE_NAME", module.name)
self.add_constant(f"{name}_MODULE_TOTAL_SIZE", module.total_size)
self.add_constant(f"{name}_MODULE_PAGE_SIZE", module.page_size)
Expand Down
2 changes: 1 addition & 1 deletion litex/soc/software/liblitespi/spiflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int spiflash_freq_init(void)

#else

printf("SPI Flash clk configured to %ld MHz\n", CONFIG_CLOCK_FREQUENCY/1000000);
printf("SPI Flash clk configured to %ld MHz\n", SPIFLASH_PHY_FREQUENCY/1000000);

#endif

Expand Down

0 comments on commit d78dbd6

Please sign in to comment.