Skip to content

Commit 46e47cb

Browse files
committed
drivers: mspi: mspi_dw: Fix api_timing_config to not be dependant on XiP
api_timing_config function placed within #if defined(CONFIG_MSPI_XIP) when it shouldn't be. Signed-off-by: David Jewsbury <[email protected]>
1 parent 9aa0ed3 commit 46e47cb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

drivers/mspi/mspi_dw.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,20 @@ static int api_register_callback(const struct device *dev,
16651665
return 0;
16661666
}
16671667

1668+
static int api_timing_config(const struct device *dev,
1669+
const struct mspi_dev_id *dev_id,
1670+
const uint32_t param_mask, void *cfg)
1671+
{
1672+
struct mspi_dw_data *dev_data = dev->data;
1673+
struct mspi_dw_timing_cfg *config = cfg;
1674+
1675+
if (param_mask & MSPI_DW_RX_TIMING_CFG) {
1676+
dev_data->rx_sample_dly = config->rx_sample_dly;
1677+
return 0;
1678+
}
1679+
return -ENOTSUP;
1680+
}
1681+
16681682
#if defined(CONFIG_MSPI_XIP)
16691683
static int _api_xip_config(const struct device *dev,
16701684
const struct mspi_dev_id *dev_id,
@@ -1771,20 +1785,6 @@ static int _api_xip_config(const struct device *dev,
17711785
return 0;
17721786
}
17731787

1774-
static int api_timing_config(const struct device *dev,
1775-
const struct mspi_dev_id *dev_id,
1776-
const uint32_t param_mask, void *cfg)
1777-
{
1778-
struct mspi_dw_data *dev_data = dev->data;
1779-
struct mspi_dw_timing_cfg *config = cfg;
1780-
1781-
if (param_mask & MSPI_DW_RX_TIMING_CFG) {
1782-
dev_data->rx_sample_dly = config->rx_sample_dly;
1783-
return 0;
1784-
}
1785-
return -ENOTSUP;
1786-
}
1787-
17881788
static int api_xip_config(const struct device *dev,
17891789
const struct mspi_dev_id *dev_id,
17901790
const struct mspi_xip_cfg *cfg)

0 commit comments

Comments
 (0)