You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/07/22 14:20:39 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #338: fsutils/mkfatfs: use DMA memory for mkfatfs when needed

xiaoxiang781216 commented on a change in pull request #338:
URL: https://github.com/apache/incubator-nuttx-apps/pull/338#discussion_r458828914



##########
File path: fsutils/mkfatfs/mkfatfs.c
##########
@@ -337,7 +338,11 @@ int mkfatfs(FAR const char *pathname, FAR struct fat_format_s *fmt)
 
   /* Allocate a buffer that will be working sector memory */
 
+#ifdef CONFIG_FAT_DMAMEMORY
+  var.fv_sect = (FAR uint8_t *)fat_dma_alloc(var.fv_sectorsize);
+#else

Review comment:
       @povauboin the better fix is at SPI/DMA driver since the limitation origins from there. SPI/DMA driver should check whether the address is outside it's capability and if so it should utilize(alloc and copy) the special memory internally.
   The design of fat_dma_alloc/fat_dma_free is totally wrong:
   1.How to handle other file system(e.g. NXFFS, SmartFS, LittleFS...)
   2.How to handle the block level access
   We should remove them even inside the kernel.




----------------------------------------------------------------
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.

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