diff mbox

[API-NEXT,PATCHv2,2/5] linux-gen: adding driver registration interface (stub)

Message ID 1478517324-11324-3-git-send-email-christophe.milard@linaro.org
State New
Headers show

Commit Message

Christophe Milard Nov. 7, 2016, 11:15 a.m. UTC
The linux implementation for the driver registration interface (stub)

Signed-off-by: Christophe Milard <christophe.milard@linaro.org>

---
 include/odp_drv.h                               |  1 +
 platform/linux-generic/Makefile.am              |  2 ++
 platform/linux-generic/drv_driver.c             | 19 +++++++++++++++++
 platform/linux-generic/include/odp/drv/driver.h | 27 +++++++++++++++++++++++++
 4 files changed, 49 insertions(+)
 create mode 100644 platform/linux-generic/drv_driver.c
 create mode 100644 platform/linux-generic/include/odp/drv/driver.h

-- 
2.7.4
diff mbox

Patch

diff --git a/include/odp_drv.h b/include/odp_drv.h
index 0959879..96d81ba 100644
--- a/include/odp_drv.h
+++ b/include/odp_drv.h
@@ -23,6 +23,7 @@  extern C {
 #include <odp/drv/barrier.h>
 #include <odp/drv/byteorder.h>
 #include <odp/drv/compiler.h>
+#include <odp/drv/driver.h>
 #include <odp/drv/shm.h>
 #include <odp/drv/spinlock.h>
 #include <odp/drv/std_types.h>
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 19dc0ba..b5baf17 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -107,6 +107,7 @@  odpdrvinclude_HEADERS = \
 		  $(srcdir)/include/odp/drv/barrier.h \
 		  $(srcdir)/include/odp/drv/byteorder.h \
 		  $(srcdir)/include/odp/drv/compiler.h \
+		  $(srcdir)/include/odp/drv/driver.h \
 		  $(srcdir)/include/odp/drv/shm.h \
 		  $(srcdir)/include/odp/drv/spinlock.h \
 		  $(srcdir)/include/odp/drv/std_types.h \
@@ -227,6 +228,7 @@  __LIB__libodp_linux_la_SOURCES = \
 			   odp_weak.c \
 			   drv_atomic.c \
 			   drv_barrier.c \
+			   drv_driver.c \
 			   drv_shm.c \
 			   drv_spinlock.c \
 			   arch/@ARCH_DIR@/odp_cpu_arch.c \
diff --git a/platform/linux-generic/drv_driver.c b/platform/linux-generic/drv_driver.c
new file mode 100644
index 0000000..9021a4c
--- /dev/null
+++ b/platform/linux-generic/drv_driver.c
@@ -0,0 +1,19 @@ 
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+#include <odp_config_internal.h>
+#include <odp/api/std_types.h>
+#include <odp/api/debug.h>
+#include <odp_debug_internal.h>
+#include <odp/drv/driver.h>
+
+int odpdrv_driver_register(odpdrv_driver_param_t *drv_param)
+{
+	ODP_ERR("NOT Supported yet! Driver %s Registration!\n.",
+		drv_param->name);
+
+	return 0;
+}
diff --git a/platform/linux-generic/include/odp/drv/driver.h b/platform/linux-generic/include/odp/drv/driver.h
new file mode 100644
index 0000000..9eb6962
--- /dev/null
+++ b/platform/linux-generic/include/odp/drv/driver.h
@@ -0,0 +1,27 @@ 
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODPDRV drivers
+ */
+
+#ifndef ODPDRV_PLAT_DRIVER_H_
+#define ODPDRV_PLAT_DRIVER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/drv/std_types.h>
+#include <odp/drv/spec/driver.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif