From patchwork Mon Oct 31 18:58:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Milard X-Patchwork-Id: 80259 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp268167qge; Mon, 31 Oct 2016 11:59:33 -0700 (PDT) X-Received: by 10.237.35.53 with SMTP id h50mr27537640qtc.101.1477940373452; Mon, 31 Oct 2016 11:59:33 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id e5si13882682qtc.144.2016.10.31.11.59.33; Mon, 31 Oct 2016 11:59:33 -0700 (PDT) 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 264B661791; Mon, 31 Oct 2016 18:59:33 +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 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 ADBE760EF0; Mon, 31 Oct 2016 18:58:58 +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 6CD7B6097E; Mon, 31 Oct 2016 18:58:53 +0000 (UTC) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by lists.linaro.org (Postfix) with ESMTPS id 096FA60976 for ; Mon, 31 Oct 2016 18:58:52 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id f134so105649708lfg.2 for ; Mon, 31 Oct 2016 11:58:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kHlcWVLMHxT4g19nCesHT9LOZgoKU/Y4LkNrwtNk0QI=; b=SQwUAZ3uIr1FPc0gyJ3TSl/g66fzO4oDtTD7Gi8cjO8z+6g+Yj2V6T0hD9lLcOcbJj DstxXTOZ01TG0zpOnW7GbL16BJf5jEh7hmmK0qW5oXf+X2XPcCdiLTsXfTIj2rHTOBSH 8bjkzJZVUVMDhD0cWgT+6l1/ctGpuCo9PONMbK2EKCu6X0UzIQbmk07ihUFBIRSMwput Z7apnL3GEw4tDuSR8EfnlWRFmBOgMhc7WNB8c6Bq1MERRBE+MjVsthcPXOUvfBIUpS8p DYJ7dkPxxyLtp7Fw5XEbpKQ9buCp20pZ5zyG1GOpVwdbqlexmpi4EvowOhB3ITr3znhW /t5g== X-Gm-Message-State: ABUngvfldnT5NZzSnaAIyFIgtTsB/XBynsvNT20S/g982/vf1Su4cBWSU8ODgxeAvllssbU2t7Y= X-Received: by 10.25.210.198 with SMTP id j189mr16047873lfg.165.1477940330786; Mon, 31 Oct 2016 11:58:50 -0700 (PDT) Received: from localhost.localdomain (c-83-233-76-66.cust.bredband2.com. [83.233.76.66]) by smtp.gmail.com with ESMTPSA id b29sm4792417lfh.8.2016.10.31.11.58.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 11:58:50 -0700 (PDT) From: Christophe Milard To: mike.holmes@linaro.org, bill.fischofer@linaro.org, brian.brooks@linaro.org, lng-odp@lists.linaro.org Date: Mon, 31 Oct 2016 19:58:40 +0100 Message-Id: <1477940323-7278-3-git-send-email-christophe.milard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477940323-7278-1-git-send-email-christophe.milard@linaro.org> References: <1477940323-7278-1-git-send-email-christophe.milard@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 2/5] linux-gen: adding 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 driver registration interface (stub) Signed-off-by: Christophe Milard --- 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 --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 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 +#include +#include +#include +#include + +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 +#include + +#ifdef __cplusplus +} +#endif + +#endif