aboutsummaryrefslogtreecommitdiffstats
path: root/sources/xdma_driver/xdma/xdma_cdev.h
diff options
context:
space:
mode:
authorAtaberk <olgunataberk@gmail.com>2022-09-25 17:22:03 +0200
committerAtaberk <olgunataberk@gmail.com>2022-09-25 17:22:03 +0200
commitdc0b3db1b4f1895a07e5fe280ee3790e87f97b9f (patch)
treeb47203aa281bdd959def4451c84d310cd9cf2e12 /sources/xdma_driver/xdma/xdma_cdev.h
downloaddram-bender-dc0b3db1b4f1895a07e5fe280ee3790e87f97b9f.tar.gz
Initial commit
Diffstat (limited to 'sources/xdma_driver/xdma/xdma_cdev.h')
-rw-r--r--sources/xdma_driver/xdma/xdma_cdev.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/sources/xdma_driver/xdma/xdma_cdev.h b/sources/xdma_driver/xdma/xdma_cdev.h
new file mode 100644
index 0000000..9570066
--- /dev/null
+++ b/sources/xdma_driver/xdma/xdma_cdev.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the Xilinx DMA IP Core driver for Linux
+ *
+ * Copyright (c) 2016-present, Xilinx, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under both the BSD-style license (found in the
+ * LICENSE file in the root directory of this source tree) and the GPLv2 (found
+ * in the COPYING file in the root directory of this source tree).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+#ifndef __XDMA_CHRDEV_H__
+#define __XDMA_CHRDEV_H__
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/uaccess.h>
+#include <linux/errno.h>
+#include "xdma_mod.h"
+
+#define XDMA_NODE_NAME "xdma"
+#define XDMA_MINOR_BASE (0)
+#define XDMA_MINOR_COUNT (255)
+
+void xdma_cdev_cleanup(void);
+int xdma_cdev_init(void);
+
+int char_open(struct inode *inode, struct file *file);
+int char_close(struct inode *inode, struct file *file);
+int xcdev_check(const char *, struct xdma_cdev *, bool);
+
+void cdev_ctrl_init(struct xdma_cdev *xcdev);
+void cdev_xvc_init(struct xdma_cdev *xcdev);
+void cdev_event_init(struct xdma_cdev *xcdev);
+void cdev_sgdma_init(struct xdma_cdev *xcdev);
+void cdev_bypass_init(struct xdma_cdev *xcdev);
+
+void xpdev_destroy_interfaces(struct xdma_pci_dev *xpdev);
+int xpdev_create_interfaces(struct xdma_pci_dev *xpdev);
+
+int bridge_mmap(struct file *file, struct vm_area_struct *vma);
+
+#endif /* __XDMA_CHRDEV_H__ */