Skip to content

Commit bd7a579

Browse files
maass-hamburghenrikbrixandersen
authored andcommitted
drivers: spi: litex: increase SPI_MAX_CS_SIZE to 32
LiteSPI now has support for multiple CS. Signed-off-by: Fin Maaß <[email protected]>
1 parent 1be193b commit bd7a579

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/spi/spi_litex_litespi.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ LOG_MODULE_REGISTER(spi_litex_litespi);
2121
#define SPIFLASH_MASTER_STATUS_RX_READY_OFFSET 0x1
2222

2323
#define SPI_MAX_WORD_SIZE 32
24-
#define SPI_MAX_CS_SIZE 4
24+
#define SPI_MAX_CS_SIZE 32
2525

2626
struct spi_litex_dev_config {
2727
uint32_t master_cs_addr;
@@ -60,11 +60,9 @@ static int spi_config(const struct device *dev, const struct spi_config *config)
6060
{
6161
struct spi_litex_data *dev_data = dev->data;
6262

63-
if (config->slave != 0) {
64-
if (config->slave >= SPI_MAX_CS_SIZE) {
65-
LOG_ERR("More slaves than supported");
66-
return -ENOTSUP;
67-
}
63+
if (config->slave >= SPI_MAX_CS_SIZE) {
64+
LOG_ERR("More slaves than supported");
65+
return -ENOTSUP;
6866
}
6967

7068
if (config->operation & SPI_HALF_DUPLEX) {

0 commit comments

Comments
 (0)