Skip to content

Commit deb24ef

Browse files
JordanYateskartben
authored andcommitted
disk: sdmmc_stm32: explicit initialisation
Explicitly initialise the SDMMC initialisation struct to make it clear the configuration being applied. Signed-off-by: Jordan Yates <[email protected]>
1 parent 818e18e commit deb24ef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/disk/sdmmc_stm32.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,14 @@ static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = {
872872
.irq_config = stm32_sdmmc_irq_config_func,
873873
.hsd = {
874874
.Instance = (MMC_TypeDef *)DT_INST_REG_ADDR(0),
875-
.Init.BusWide = SDMMC_BUS_WIDTH,
876-
#if DT_INST_NODE_HAS_PROP(0, clk_div)
877-
.Init.ClockDiv = DT_INST_PROP(0, clk_div),
875+
.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING,
876+
#ifdef SDMMC_CLOCK_BYPASS_DISABLE
877+
.Init.ClockBypass = SDMMC_CLOCK_BYPASS_DISABLE,
878878
#endif
879+
.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE,
880+
.Init.BusWide = SDMMC_BUS_WIDTH,
881+
.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE,
882+
.Init.ClockDiv = DT_INST_PROP_OR(0, clk_div, 0),
879883
},
880884
#if DT_INST_NODE_HAS_PROP(0, cd_gpios)
881885
.cd = GPIO_DT_SPEC_INST_GET(0, cd_gpios),

0 commit comments

Comments
 (0)