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 <delbel@umn.edu>
This commit is contained in:
Brandon Del Bel 2023-04-10 15:13:24 -05:00 committed by Carles Cufí
parent c8c67feab0
commit 93930eac90

View file

@ -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) \