Skip to content

Commit cec116c

Browse files
erwangokartben
authored andcommitted
drivers: flash: xspi: Put delay block config under specific bit
On some series, use of Delay Block could be possible on OSPI device but not on HSPI one (which uses this drivers). As a quick fix check the presence of XSPI Delay Block by-pass configuration bit instead of the Delay Block presence. Note: This fix works because we don't have cases today where this driver is used for OSPI and HSPI instances with mixed DLYB compatibility. This may have to be reviewed one day and may require a more complex fix with instantiable configuration, but this day may never come as well. Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
1 parent 9c1ab4f commit cec116c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/flash/flash_stm32_xspi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ static int flash_stm32_xspi_init(const struct device *dev)
21872187

21882188
#endif /* XSPIM */
21892189

2190-
#if defined(DLYB_XSPI1) || defined(DLYB_XSPI2) || defined(DLYB_OCTOSPI1) || defined(DLYB_OCTOSPI2)
2190+
#if defined(XSPI_DCR1_DLYBYP)
21912191
/* XSPI delay block init Function */
21922192
HAL_XSPI_DLYB_CfgTypeDef xspi_delay_block_cfg = {0};
21932193

@@ -2201,7 +2201,7 @@ static int flash_stm32_xspi_init(const struct device *dev)
22012201
}
22022202

22032203
LOG_DBG("Delay Block Init");
2204-
#endif /* DLYB_ */
2204+
#endif /* XSPI_DCR1_DLYBYP */
22052205

22062206
#if STM32_XSPI_USE_DMA
22072207
/* Configure and enable the DMA channels after XSPI config */

0 commit comments

Comments
 (0)