From patchwork Mon Jan 2 16:09:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 89524 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp7652418qgi; Mon, 2 Jan 2017 08:11:45 -0800 (PST) X-Received: by 10.55.189.135 with SMTP id n129mr55428338qkf.150.1483373504978; Mon, 02 Jan 2017 08:11:44 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id k37si40832288qte.244.2017.01.02.08.11.44; Mon, 02 Jan 2017 08:11:44 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9D8DB608B4; Mon, 2 Jan 2017 16:11:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 768B160B2C; Mon, 2 Jan 2017 16:10:19 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A0E27608B4; Mon, 2 Jan 2017 16:10:09 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id 77D6D608B4 for ; Mon, 2 Jan 2017 16:10:07 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id t196so272486162lff.3 for ; Mon, 02 Jan 2017 08:10:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/M/R+a6iXuClf+KJS+w0B1syJVaC6awT2d6cxgI8vsc=; b=IBH23eVvwG74N6a0gzneiife3QaK3c1+h1CdZ/gQQKZ4Ojw/qIlqTl6yZdmb4m6qDh Q5kjiB8Id0hVMyUFEG9/kDRAkepMKtO4QCFO+6KJwqmjnF+2HXWLjR2eVhIPpT5GY+ew CmCefvld3bHzW9dCV6ZByrUtdRGBzL3I/RAG8pf+6Go2yfHU+r/pqecObk8AfF5O5SgA bKsCN2ERn454XbgoJU7vZoINlryhneknniN69dtWuw0/umZ1yJBmOuAaJo80BxoV9Wf3 xiqjVL6y9ZCHsOLZLHoAo+imNod9kQLHj0cCxFAB1pU1NorjAljAdBds9mMx8cTIwGFI 0VNg== X-Gm-Message-State: AIkVDXJksOdjLZQHQs+n5YMW5H6qTqXC4rBPQw1oOHdOvASVSSjhVOyhZnfCsp+GdSE4PeiS9Fo= X-Received: by 10.25.196.136 with SMTP id u130mr20454906lff.62.1483373406214; Mon, 02 Jan 2017 08:10:06 -0800 (PST) Received: from localhost.localdomain (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id z1sm15899128lja.27.2017.01.02.08.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jan 2017 08:10:05 -0800 (PST) From: Christophe Milard To: francois.ozog@linaro.org, forrest.shi@linaro.org, mike.holmes@linaro.org, yi.he@linaro.org, bill.fischofer@linaro.org, lng-odp@lists.linaro.org Date: Mon, 2 Jan 2017 17:09:58 +0100 Message-Id: <1483373401-20012-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483373401-20012-1-git-send-email-christophe.milard@linaro.org> References: <1483373401-20012-1-git-send-email-christophe.milard@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv9 2/5] linux-gen: adding enum, devio and driver registration interface (stub) X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The linux implementation for the enumerator class registration function, enumerator instance registration function, devio and driver registration functions (stub) Signed-off-by: Christophe Milard --- include/odp_drv.h | 1 + platform/linux-generic/Makefile.am | 2 ++ platform/linux-generic/drv_driver.c | 44 +++++++++++++++++++++++++ platform/linux-generic/include/odp/drv/driver.h | 27 +++++++++++++++ 4 files changed, 74 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 --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 #include #include +#include #include #include #include diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 999a7f5..9d219da 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -109,6 +109,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..533ffd0 --- /dev/null +++ b/platform/linux-generic/drv_driver.c @@ -0,0 +1,44 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +#include +#include +#include +#include + +int odpdrv_enumr_class_register(odpdrv_enumr_class_t *enumr_class) +{ + ODP_ERR("NOT Supported yet! Enumerator Class %s Registration!\n.", + enumr_class->name); + + return 0; +} + +int odpdrv_enumr_register(odpdrv_enumr_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->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..31d5063 --- /dev/null +++ b/platform/linux-generic/include/odp/drv/driver.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2017, 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 +#include + +#ifdef __cplusplus +} +#endif + +#endif