Skip to content

Commit 3b91d61

Browse files
committed
[MCUX-81258] drivers: usdhc: invalidate cache after blocking read
Cached should be invalidated after blocking read. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
1 parent d0a35e2 commit 3b91d61

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

drivers/usdhc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: BSD-3-Clause
44

55
if(CONFIG_MCUX_COMPONENT_driver.usdhc)
6-
mcux_component_version(2.8.5)
6+
mcux_component_version(2.8.6)
77

88
mcux_add_source(SOURCES fsl_usdhc.c fsl_usdhc.h)
99

drivers/usdhc/doxygen/ChangeLog_usdhc.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# USDHC
22

3+
## [2.8.6]
4+
5+
- Bug Fixes
6+
- Invalidate cache after blocking read.
7+
38
## [2.8.5]
49

510
- Improvements

drivers/usdhc/fsl_usdhc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,15 @@ static status_t USDHC_TransferDataBlocking(USDHC_Type *base, usdhc_data_t *data,
783783
*(data->rxData) = s_usdhcBootDummy;
784784
}
785785

786+
#if defined(FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL) && FSL_SDK_ENABLE_DRIVER_CACHE_CONTROL
787+
if (IS_USDHC_FLAG_SET(interruptStatus, kUSDHC_DataCompleteFlag))
788+
{
789+
if (data->rxData != NULL)
790+
{
791+
DCACHE_InvalidateByRange((uintptr_t)(data->rxData), (data->blockSize) * (data->blockCount));
792+
}
793+
}
794+
#endif
786795
USDHC_ClearInterruptStatusFlags(base, ((uint32_t)kUSDHC_DataDMAFlag | (uint32_t)kUSDHC_TuningErrorFlag));
787796
}
788797
else

0 commit comments

Comments
 (0)