Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mcux/mcux-sdk-ng/drivers/xspi/fsl_xspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@ void XSPI_Cache64_InvalidateCacheByRange(uint32_t address, size_t size)
{
if (size > 0UL)
{
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size - 0x01U);
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size);
uint32_t pccReg = 0;
/* Align address to cache line size. */
uint32_t startAddr = MSDK_REG_SECURE_ADDR(address & ~((uint32_t)FSL_FEATURE_CACHE64_LINESIZE_BYTE - 1U));
Expand All @@ -3070,7 +3070,7 @@ void XSPI_Cache64_InvalidateCacheByRange(uint32_t address, size_t size)
return;
}
base = s_xspi_cache64ctrlBases[instance];
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance] - 0x01U);
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance]);
endAddr = endAddr > endLim ? endLim : endAddr;

/* Set the invalidate by line command and use the physical address. */
Expand Down Expand Up @@ -3120,7 +3120,7 @@ void XSPI_Cache64_CleanCacheByRange(uint32_t address, size_t size)
{
if (size > 0UL)
{
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size - 0x01U);
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size);
uint32_t pccReg = 0;
/* Align address to cache line size. */
uint32_t startAddr = MSDK_REG_SECURE_ADDR(address & ~((uint32_t)FSL_FEATURE_CACHE64_LINESIZE_BYTE - 1U));
Expand All @@ -3136,7 +3136,7 @@ void XSPI_Cache64_CleanCacheByRange(uint32_t address, size_t size)
return;
}
base = s_xspi_cache64ctrlBases[instance];
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance] - 0x01U);
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance]);
endAddr = endAddr > endLim ? endLim : endAddr;

/* Set the push by line command. */
Expand Down Expand Up @@ -3188,7 +3188,7 @@ void XSPI_Cache64_CleanInvalidateByRange(uint32_t address, size_t size)
{
if (size > 0UL)
{
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size - 0x01U);
uint32_t endAddr = MSDK_REG_SECURE_ADDR(address + size);
uint32_t pccReg = 0;
/* Align address to cache line size. */
uint32_t startAddr = MSDK_REG_SECURE_ADDR(address & ~((uint32_t)FSL_FEATURE_CACHE64_LINESIZE_BYTE - 1U));
Expand All @@ -3204,7 +3204,7 @@ void XSPI_Cache64_CleanInvalidateByRange(uint32_t address, size_t size)
return;
}
base = s_xspi_cache64ctrlBases[instance];
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance] - 0x01U);
endLim = MSDK_REG_SECURE_ADDR(phyMemBase[instance] + phyMemSize[instance]);
endAddr = endAddr > endLim ? endLim : endAddr;

/* Set the push by line command. */
Expand Down