From 93930eac90da17b5e8b8fe6e3b33efa6b723ce3d Mon Sep 17 00:00:00 2001 From: Brandon Del Bel Date: Mon, 10 Apr 2023 15:13:24 -0500 Subject: [PATCH] drivers: spi: sam0: fix DMA init for parts with MCLK peripheral The spi-sam0 driver does not initialize DMA parameters when the MCLK peripheral is defined in the microcontroller header file. Fix it by copying the initialization code from the non-MCLK case. Signed-off-by: Brandon Del Bel --- drivers/spi/spi_sam0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi_sam0.c b/drivers/spi/spi_sam0.c index 4a3188272cf..16b64639f96 100644 --- a/drivers/spi/spi_sam0.c +++ b/drivers/spi/spi_sam0.c @@ -721,7 +721,8 @@ static const struct spi_sam0_config spi_sam0_config_##n = { \ .mclk_mask = BIT(DT_INST_CLOCKS_CELL_BY_NAME(n, mclk, bit)), \ .gclk_core_id = DT_INST_CLOCKS_CELL_BY_NAME(n, gclk, periph_ch),\ .pads = SPI_SAM0_SERCOM_PADS(n), \ - .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n) \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \ + SPI_SAM0_DMA_CHANNELS(n) \ } #else #define SPI_SAM0_DEFINE_CONFIG(n) \