pkarashchenko commented on code in PR #7784:
URL: https://github.com/apache/nuttx/pull/7784#discussion_r1039368470


##########
arch/arm/src/s32k3xx/s32k3xx_edma.c:
##########
@@ -154,6 +154,12 @@ struct s32k3xx_edma_s
   struct s32k3xx_dmach_s dmach[S32K3XX_EDMA_NCHANNELS];
 };
 
+#ifdef CONFIG_S32K3XX_DTCM_HEAP
+extern uint8_t DTCM_BASE_ADDR[];
+extern uint8_t DTCM_END_ADDR[];
+#define DTCM_BACKDOOR_OFFSET 0x1000000

Review Comment:
   I understand that this is grouped based on Kconfig flag, but can define be 
moved to `Pre-processor Definitions` section?



##########
arch/arm/src/s32k3xx/s32k3xx_edma.c:
##########
@@ -614,6 +620,22 @@ static inline void s32k3xx_tcd_configure(struct 
s32k3xx_edmatcd_s *tcd,
                                   EDMA_TCD_CSR_INTHALF : 0;
   tcd->dlastsga = config->flags & EDMA_CONFIG_LOOPDEST ? -config->iter : 0;
 
+#ifdef CONFIG_S32K3XX_DTCM_HEAP
+  /* Remap address to backdoor address for eDMA */
+
+  if (tcd->saddr >= (uint32_t)DTCM_BASE_ADDR
+      && tcd->saddr < (uint32_t)DTCM_END_ADDR)

Review Comment:
   I'm not sure which of this or
   ```suggestion
     if (tcd->saddr >= (uint32_t)DTCM_BASE_ADDR &&
         tcd->saddr < (uint32_t)DTCM_END_ADDR)
   ```
   is recommended by code style. Let me check



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to