On 8 December 2016 at 17:20, Christophe Milard <[email protected] > wrote:
> The linux implementation for the enumerator class registration function, > enumerator instance registration function, > devio and driver registration functions (stub) > > Signed-off-by: Christophe Milard <[email protected]> > --- > include/odp_drv.h | 1 + > platform/linux-generic/Makefile.am | 2 ++ > platform/linux-generic/drv_driver.c | 43 > +++++++++++++++++++++++++ > platform/linux-generic/include/odp/drv/driver.h | 27 ++++++++++++++++ > 4 files changed, 73 insertions(+) > create mode 100644 platform/linux-generic/drv_driver.c > create mode 100644 platform/linux-generic/include/odp/drv/driver.h > > 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 adbe24d..2ed8043 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 \ > @@ -225,6 +226,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..c520d1d > --- /dev/null > +++ b/platform/linux-generic/drv_driver.c > @@ -0,0 +1,43 @@ > +/* 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 odrdrv_enum_class_register(odpdrv_enum_class_t *enum_class) > odrdrv_enum_ -> odpdrv_enum? > +{ > + ODP_ERR("NOT Supported yet! Enumerator Class %s Registration!\n.", > + enum_class->name); > + > + return 0; > +} > + > +int odpdrv_enum_register(odpdrv_enum_t *enumerator) > +{ > + ODP_ERR("NOT Supported yet! Enumerator instance %s > Registration!\n.", > + enumerator->class_name); > + > + return 0; > +} > + > +int odpdrv_devio_register(odpdrv_devio_t *devio) > +{ > + ODP_ERR("NOT Supported yet! Driver %s Registration!\n.", > + devio->devio_api_name); > + > + return 0; > +} > + > +int odpdrv_driver_register(odpdrv_driver_t *driver) > +{ > + ODP_ERR("NOT Supported yet! Driver %s Registration!\n.", > + driver->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 > -- > 2.7.4 > >
