Skip to content

Commit 0d61895

Browse files
XenuIsWatchingdkalowsk
authored andcommitted
drivers: spi: cdns: fix missing fifo config
This adds the missing fifo config from the dts which was missed in the initial revision. This also adds the spi rtio fallback api. Signed-off-by: Ryan McClelland <[email protected]>
1 parent a760ba7 commit 0d61895

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/spi/Kconfig.cdns

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
config SPI_CDNS
55
bool "Cadence SPI controller driver"
6+
default y
67
depends on DT_HAS_CDNS_SPI_ENABLED
78
help
89
Enable the SPI peripherals based on Cadence IP6524

drivers/spi/spi_cdns.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,10 +837,13 @@ static DEVICE_API(spi, spi_cdns_api) = {
837837
.transceive_async = spi_cdns_transceive_async,
838838
#endif /* CONFIG_SPI_ASYNC */
839839
.release = spi_cdns_release,
840+
#ifdef CONFIG_SPI_RTIO
841+
.iodev_submit = spi_rtio_iodev_default_submit,
842+
#endif /* CONFIG_SPI_RTIO */
840843
};
841844

842845
/* Set clock-frequency-ext to pclk / 5 if there is no clock-frequency-ext */
843-
#define SPI_CLOCK_FREQUENCY_EXT(n) \
846+
#define SPI_CLOCK_FREQUENCY_EXT(n) \
844847
COND_CODE_1(DT_INST_NODE_HAS_PROP(n, clock_frequency_ext), \
845848
(DT_INST_PROP(n, clock_frequency_ext)), \
846849
(DT_INST_PROP(n, clock_frequency) / 5))
@@ -856,6 +859,9 @@ static DEVICE_API(spi, spi_cdns_api) = {
856859
.irq_config = spi_cdns_irq_config_##n, \
857860
.clock_frequency = DT_INST_PROP(n, clock_frequency), \
858861
.ext_clock = SPI_CLOCK_FREQUENCY_EXT(n), \
862+
.fifo_width = DT_INST_PROP(n, fifo_width), \
863+
.tx_fifo_depth = DT_INST_PROP(n, tx_fifo_depth), \
864+
.rx_fifo_depth = DT_INST_PROP(n, rx_fifo_depth), \
859865
}; \
860866
SPI_DEVICE_DT_INST_DEFINE(n, spi_cdns_init, spi_cdns_pm_action, &spi_cdns_data_##n, \
861867
&spi_cdns_cfg_##n, POST_KERNEL, CONFIG_SPI_INIT_PRIORITY, \

0 commit comments

Comments
 (0)