software/liblitespi: Remove manual mode control.

This commit is contained in:
Vegard Storheil Eriksen 2021-05-17 13:36:22 +02:00
parent 13979a43b7
commit 422c356930
2 changed files with 0 additions and 19 deletions
litex/soc/software/liblitespi

View File

@ -17,16 +17,6 @@
#define DEBUG 0
#define USER_DEFINED_DUMMY_BITS 0
static spi_mode spi_get_mode(void)
{
return (spi_mode)spiflash_mmap_cfg_read();
}
static void spi_set_mode(spi_mode mode)
{
spiflash_mmap_cfg_write((unsigned char)mode);
}
int spiflash_freq_init(void)
{
unsigned int lowest_div = spiflash_phy_clk_divisor_read();
@ -37,10 +27,6 @@ int spiflash_freq_init(void)
printf("Testing against CRC32: %08x\n\r", crc);
#endif
if(spi_get_mode() != SPI_MODE_MMAP) {
spi_set_mode(SPI_MODE_MMAP);
}
/* Check if block is erased (filled with 0xFF) */
if(crc == CRC32_ERASED_FLASH) {
printf("Block of size %d, started on address 0x%lx is erased. Cannot proceed with SPI frequency test.\n\r", SPI_FLASH_BLOCK_SIZE, SPIFLASH_BASE);

View File

@ -6,11 +6,6 @@
#define SPI_FLASH_BLOCK_SIZE 256
#define CRC32_ERASED_FLASH 0xFEA8A821
typedef enum {
SPI_MODE_MMAP = 0,
SPI_MODE_MASTER = 1,
} spi_mode;
int spiflash_freq_init(void);
void spiflash_dummy_bits_setup(unsigned int dummy_bits);
void spiflash_init(void);