lipengfei28 commented on code in PR #16767:
URL: https://github.com/apache/nuttx/pull/16767#discussion_r2230241127


##########
drivers/pci/pci_epc.c:
##########
@@ -1036,3 +1054,92 @@ void pci_epc_destroy(FAR struct pci_epc_ctrl_s *epc)
   nxmutex_destroy(&epc->lock);
   kmm_free(epc);
 }
+
+/****************************************************************************
+ * Name: pci_epc_dma_alloc
+ *
+ * Description:
+ *   This function is used to create a new endpoint controller (EPC) device.
+ *
+ *   Invoke to destroy the PCI EPC device.
+ *
+ * Input Parameters:
+ *   epc  - The EPC device that has to be destroyed
+ *   size - The dma memory size
+ *
+ * Returned Value:
+ *   The point of dma memory if success, NULL if failed
+ *
+ ****************************************************************************/
+
+FAR void *pci_epc_dma_alloc(FAR struct pci_epc_ctrl_s *epc, size_t size)
+{
+  if (epc->dmaheap)
+    {
+      return mm_malloc(epc->dmaheap, size);
+    }
+  else
+    {
+      return kmm_zalloc(size);

Review Comment:
   done



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