snikeguo commented on code in PR #16463:
URL: https://github.com/apache/nuttx/pull/16463#discussion_r2118937063


##########
drivers/dma/dma_align_manager.c:
##########
@@ -0,0 +1,30 @@
+#include <nuttx/dma/dma_align_manager.h>
+#include <sys/types.h>
+int dma_align_manager_init(struct dma_align_manager_s *manager,struct 
dma_align_manager_init_s *initcfg)

Review Comment:
   > merge the alignment code into sdmmc common code, the code is too simple to 
become a manager.
   
   Consider the following requirement:
   
   User layer:
   write(serial port fd, user buffer, ...)
   {....
      serial_port_write(buf, len)
      ....
   }
   
   Driver framework layer:
   ```
   serial_port_write(buf, len)
   {
       align_buffer = buf;
       if (buf address is not aligned)
       {
           align_buffer = alloc aligned buffer;
       }
       call chip_driver(align_buffer, len);
   }
   ```
   Therefore, anything involving DMA transfers will need to use this mechanism.



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