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 2021/11/28 14:17:38 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #4900: Add Board IOCTL for DMA buffer allocation

pkarashchenko commented on a change in pull request #4900:
URL: https://github.com/apache/incubator-nuttx/pull/4900#discussion_r757902423



##########
File path: include/sys/boardctl.h
##########
@@ -404,6 +420,18 @@ struct boardioc_boot_info_s
 };
 #endif
 
+#ifdef CONFIG_BOARDCTL_FATDMAMEMORY
+/* Arguments passed with the BOARDIOC_FATDMAMEM command */
+
+struct boardioc_dmafatmemory_ioctl_s
+{
+  size_t  size;                   /* Allocation size */
+  uint8_t *pmemory;               /* pointer to allocated mem on NULL
+                                   * non-null to be freed
+                                   */

Review comment:
       ```suggestion
                                      * non-null to be freed */
   ```

##########
File path: boards/boardctl.c
##########
@@ -777,6 +781,41 @@ int boardctl(unsigned int cmd, uintptr_t arg)
         break;
 #endif
 
+#ifdef CONFIG_BOARDCTL_FATDMAMEMORY
+        /* CMD:           BOARDIOC_FATDMAMEM
+         * DESCRIPTION:   Allocate or free a DMA capable buffer.
+         * ARG:           A pointer to an boardioc_dmafatmemory_ioctl_s
+         *                object.
+         *                If the pmemory is NULL an allocation of size is
+         *                returned in pmemory.
+         *                If the pmemory is non-NULL the block is freed.
+         * CONFIGURATION: CONFIG_BOARDCTL_FATDMAMEMORY
+         * DEPENDENCIES:  Board specific logic provides
+         *                   void *fat_dma_alloc(size_t size)
+         *                   void fat_dma_free(FAR void *memory, size_t size)

Review comment:
       ```suggestion
            *                   void *fat_dma_alloc(size_t size);
            *                   void fat_dma_free(FAR void *memory, size_t size);
   ```

##########
File path: boards/boardctl.c
##########
@@ -777,6 +781,41 @@ int boardctl(unsigned int cmd, uintptr_t arg)
         break;
 #endif
 
+#ifdef CONFIG_BOARDCTL_FATDMAMEMORY
+        /* CMD:           BOARDIOC_FATDMAMEM
+         * DESCRIPTION:   Allocate or free a DMA capable buffer.
+         * ARG:           A pointer to an boardioc_dmafatmemory_ioctl_s
+         *                object.
+         *                If the pmemory is NULL an allocation of size is
+         *                returned in pmemory.
+         *                If the pmemory is non-NULL the block is freed.
+         * CONFIGURATION: CONFIG_BOARDCTL_FATDMAMEMORY
+         * DEPENDENCIES:  Board specific logic provides
+         *                   void *fat_dma_alloc(size_t size)
+         *                   void fat_dma_free(FAR void *memory, size_t size)

Review comment:
       or remove `;` at file include/sys/boardctl.h line 197 and 198




-- 
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-unsubscribe@nuttx.apache.org

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