You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/02/21 17:28:03 UTC

[nuttx] 02/03: arch: imxrt: Enable IMXRT_ENET_ENHANCEDBD if !ARMV7M_DCACHE_WRITETHROUGH

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 69e6e17407da5df34a46328d7314bbc68c8a613e
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Feb 20 16:42:01 2023 +0900

    arch: imxrt: Enable IMXRT_ENET_ENHANCEDBD if !ARMV7M_DCACHE_WRITETHROUGH
    
    Summary:
    - I noticed that there are two kinds of descriptors for imxrt_enet.c
    - The first one is the legacy descriptor and its size is 8bytes.
    - The second one is the enhanced descriptor and its size is 32bytes.
    - In both cases, we can not use a descriptor chain like stm32.
    - Considering cache line alignment, the second one is perfect because
      one descriptor fits the Cortex-M7 cache line which would fix networking
      stability issues in d-cache write-back mode.
    
    Impact:
    - imxrt ethernet in d-cache write-back mode
    
    Testing:
    - Tested with ixmrt1060-evk:netnsh_dcache_wb (will be added later)
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 arch/arm/src/imxrt/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/src/imxrt/Kconfig b/arch/arm/src/imxrt/Kconfig
index ead7d7919d..5dc6c436cb 100644
--- a/arch/arm/src/imxrt/Kconfig
+++ b/arch/arm/src/imxrt/Kconfig
@@ -2070,7 +2070,8 @@ config IMXRT_ENET_NTXBUFFERS
 
 config IMXRT_ENET_ENHANCEDBD
 	bool # not optional
-	default n
+	default n if ARMV7M_DCACHE_WRITETHROUGH
+	default y if !ARMV7M_DCACHE_WRITETHROUGH
 
 config IMXRT_ENET_NETHIFS
 	int  # Not optional