Received: by 10.223.185.116 with SMTP id b49csp7714071wrg; Thu, 1 Mar 2018 09:50:28 -0800 (PST) X-Google-Smtp-Source: AG47ELuC2uAFcHY/XhDwcLDKWMPbW/5wCVa0ZFFvXGihUKNfRtIhLqoSaGaagAFlH2c7AzasGxLV X-Received: by 2002:a17:902:904b:: with SMTP id w11-v6mr2656098plz.11.1519926628093; Thu, 01 Mar 2018 09:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519926628; cv=none; d=google.com; s=arc-20160816; b=l7coE9UDn3YW5XPR77LjT51piwxoOuNLZNoc693p4wEI3sNy0Ji9fv6Kte8APY2Rig Sq1OPCMMWbOBAbqQ1xqioM/fdtXOjIJwoNZ0D83T5JOx3N+y0P9IcyIZtdyZELTddBhq aAi9lGJjcoOirikO+EG3UzefWzkrr3LfWwmJLqk/d4FSaosTwqfI4ylDo+M0FP99V5LR UlQ3KmBk4dslzWR31nZ2u/7cVBub3CobrkgHA4IHeqFyjiIh3zd3hHAHbjQOPPXeCNIf qnFHc5asTvNYS2BSx2qr5eAeYpjivMjIKB8rzRj5F1NB2uOSGZaEmxVAxHncCqi1vTrZ zMVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=68niz3rw3xAAIQY3hctrqlEno/5wU0BMOsyOx9BJ6oA=; b=TSr9OOaTPEu/4XSDbGx3pXN6rsJZ1G1GmhK21mRUQLydt2rDtWjS/7h1EZ8cB3SXUU cetNokoghxorizHHCBTdRygqREUGCZGrZmJOZIXneuLZ1GpFKQ/kLZ426psttpoqhXoB pEcxhpd6XCjHhg2cYEfDwj61gVfTdXCDKcGgCgY3NgaNvnJ+THxfOu3Ropi3EeAQq3Nm l8ECQN1dytv0D1mUWApxDxR5Qo01EiEZf7N6v03l1niAtlxK55FZ9/fU/Hy7Jzd5721H 904/0ItrMYp3sV7ikDXXSwGHGwEfLQTTmYKgDmzaN5tLAydQ6LFiYJ2ofYebx2fx1UTn EowA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=mgYUVIQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si1888590plr.365.2018.03.01.09.50.13; Thu, 01 Mar 2018 09:50:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=mgYUVIQ2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033680AbeCARsC (ORCPT + 99 others); Thu, 1 Mar 2018 12:48:02 -0500 Received: from mail-he1eur01on0052.outbound.protection.outlook.com ([104.47.0.52]:30784 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1033627AbeCARr4 (ORCPT ); Thu, 1 Mar 2018 12:47:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=68niz3rw3xAAIQY3hctrqlEno/5wU0BMOsyOx9BJ6oA=; b=mgYUVIQ2HCvBBRrOb/3GtkRezLaMFISNtfP9He6Df2V4mRgwUTAVrusQndhBHxr3tMBVSU9a83IGk4FfoHVAt+E4Tagpff9J4sh6hoqKJOWsqg5GM2capEhsgXpoEhttUCWyFj7JaCWj10Z2seJtanztE3+WZ5uKq7l/OUsFA1k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bogdan.purcareata@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by AM0PR0402MB3650.eurprd04.prod.outlook.com (2603:10a6:208:d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Thu, 1 Mar 2018 17:47:52 +0000 From: Bogdan Purcareata To: gregkh@linuxfoundation.org, laurentiu.tudor@nxp.com, ruxandra.radulescu@nxp.com Cc: stuyoder@gmail.com, ioana.ciornei@nxp.com, nipun.gupta@nxp.com, roy.pledge@nxp.com, horia.geanta@nxp.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bogdan Purcareata Subject: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging Date: Thu, 1 Mar 2018 11:47:11 -0600 Message-Id: <20180301174712.2660-3-bogdan.purcareata@nxp.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180301174712.2660-1-bogdan.purcareata@nxp.com> References: <20180301174712.2660-1-bogdan.purcareata@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: SN6PR0102CA0030.prod.exchangelabs.com (2603:10b6:805:1::43) To AM0PR0402MB3650.eurprd04.prod.outlook.com (2603:10a6:208:d::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8e1ecf3a-e5e2-4538-9226-08d57f9c8f6a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:AM0PR0402MB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lKz78lD1zj72m7Ye0FTO5cJVVek1qtCqbcSp/37i4ubGwM4PVn2joDqJfbYGl5KNr7mLHyK14bixfRUQBy8Qu18/66UNtq1RRBkl9/Q+gHSR8/bWqXTK4yQ//WmWDgJytmFohdvhOD4fRG2FetzO6z0WS2sk3UyH80DfOaKmS4TEC03tQE+R+xyEFFBaLKbUzU1jbVHd32bWy4L6qCUE2zA/4iL18nvPXBdoWiYHrosKlkB8l+8/iaU8mQrr5CK2fvWmx4oVlZVFgAfOi2tJh336iSfxbKEza3k6YiMZiy7mxMZSO6aPChjN1rxuJrfMdxghEP/ie7Dije7XpRjcxkUMmUeG96KCRh8k03JjhOW8JvRKzfg5x7ltD9u58Dl0du2TQwCXG;4:+J2UF7Yzj8WLFQeUzIz2C6Pd4uBsYde90cP/ls13oXgdFmN40OcWdNM7ZZviS3RfPmBG1Ek48dR56cWM66+HdvUd8f09dRPeR1QW95p8crVRN9jAMW7/88A1jg9XNiMN0kmJmV1uiW2CU+hpqyb8jtg32gFSj8wSo5z5dtNXNG798QkMt5cG5o1piv6eIzI73TLgo+tlnLbWQ4qMwMBFzfxxwZccwmWQomQxf0TlpvyF1WklN5c/SqV+D75Ys75YRiz+Dhi1OGeHt82lIErJZ+D07ebIORzNbYoiDVu/Arjv64hgC0uBvvAce9AeHQYm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231220)(944501230)(52105095)(10201501046)(6055026)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:AM0PR0402MB3650;BCL:0;PCL:0;RULEID:;SRVR:AM0PR0402MB3650; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(39380400002)(366004)(376002)(346002)(189003)(199004)(36756003)(16586007)(2906002)(6666003)(2950100002)(106356001)(316002)(6636002)(26005)(186003)(6116002)(16526019)(59450400001)(3846002)(25786009)(76176011)(51416003)(52116002)(6506007)(386003)(50466002)(48376002)(53936002)(5660300001)(478600001)(47776003)(6486002)(8936002)(1076002)(6512007)(86362001)(4326008)(305945005)(97736004)(68736007)(81156014)(50226002)(7736002)(105586002)(8676002)(81166006)(66066001)(39060400002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR0402MB3650;H:rhuath.am.freescale.net;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM0PR0402MB3650;23:bS0HGkY8o6X1uwwvdTtxswclUFOOlK55IPXPE66?= =?us-ascii?Q?zEjiTsZV4zYTxp4IqTMig7JX0jhxvVbec/YCQPmLuyqHvHkGSxXM93a5BSgo?= =?us-ascii?Q?+qbv9tU6LpfAde1RMjDNGM6u/Mf6vBH0ghHoLm3vBi8tcVP63XbYwcR3e7jb?= =?us-ascii?Q?BDlmPGpsMpDqTmJnfvvtRh68lxYd/O6TnnnbZ5ZlI617zGZWNGn78u5DPRMf?= =?us-ascii?Q?fztDVWRjipIEUn/TTVeE2IKKJkm5dSH1cZ64OS1uQzFaHOA8vqr0+l0qr0a1?= =?us-ascii?Q?BWhfqM2DT3CiUShmU7neUCfXheAHBVR0iDd7rh01EuWudrsB0QSRaGLbJZCn?= =?us-ascii?Q?ZpnkczJ4MaBQnFth3ZpAhcfB3OBTPdchMgTpI0zLAOINVen8FVhPoMESaFTK?= =?us-ascii?Q?ewRcRxIFnrHvUb81CMOYfUKTnVuepgvULkQD+UX4iLTr01KcpHCqhGzgE2LT?= =?us-ascii?Q?pq1cKHTWNFwuC2CnP2oJ95+BUkYjRY5aD6OyFMeGA73hFjBruNKGEL3VCtbs?= =?us-ascii?Q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gLjx1bxEXHcoLA5mHG98uomIGszFgRx7UaeoNa+N/hU2gVgvf6jL/iG3PkG5kSEOCJYfZXvJM3HZi1ZTHNupWTtzLGK74+et9WKdnsGsC2Pp219ojnXv5uKzu8Teie8PMJoVVdsRbe8=;5:g38V9nT7It5L44ZGBaI9zaNWi6q0I6cp2pDe/BUaoM4oCsIPvNVIEqqy7GYJT4x7Xq/V2RDTnF/accCMI6b/JcbEIEDlxuwsoaDZxN+FcDE4ojoF+Fvz2BZKrm4oq4Xlu7mU5iBk1T+wkHuzgONfgYDTFmqeSq7s6Y1zMlb4cxw=;24:2nsxTDhzk+NaScmennlqr17w/RWlBzvXM3QmhCNKbryxRgiJ8/94BujlxcpFjuHFg8vdSKXOmcMBkTY4wLwkia7YCtv+oE1BsCo+VLBY3Ww=;7:gwPL5DPjuZISh+uz4ehFCe+Q0mXYgSbC1BDu22JLsk/Dppg9sGk5v6uZBFfKCN00VklL+UNqiGdqBVW3kIUh+adeHueoT//xqIHG92WkBvp9Pu5UEYsTXD15ajY+dZNpd9ugrav/IxOr+I6O7hEvF/D+wDNYWlbtz9G/Nu/N3VRBv/MPUZCJKCLBFikgCJ8MuRPpIHufzcYgkwsABuFEbJeCe48dTTrHmIN/w7OxUJkXc7NbjeyNu0+MD7JeDYOc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 17:47:52.1326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e1ecf3a-e5e2-4538-9226-08d57f9c8f6a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3650 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the source files out of staging into their final locations: - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPBP stands for Data Path Buffer Pool - you can read more about the object in Documentation/networking/dpaa2/overview.rst Signed-off-by: Bogdan Purcareata --- drivers/bus/fsl-mc/Makefile | 1 + drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c | 4 +- drivers/bus/fsl-mc/fsl-mc-private.h | 39 +++++++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 2 +- drivers/staging/fsl-mc/bus/Makefile | 3 +- drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ------------------- drivers/staging/fsl-mc/include/dpbp.h | 53 ----------------------- include/linux/fsl/mc.h | 42 ++++++++++++++++++ 8 files changed, 86 insertions(+), 102 deletions(-) rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%) delete mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h delete mode 100644 drivers/staging/fsl-mc/include/dpbp.h diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile index 6a97f2c..da26e52 100644 --- a/drivers/bus/fsl-mc/Makefile +++ b/drivers/bus/fsl-mc/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o mc-bus-driver-objs := fsl-mc-bus.o \ mc-sys.o \ mc-io.o \ + dpbp.o \ dprc.o \ dprc-driver.o \ fsl-mc-allocator.o \ diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c similarity index 98% rename from drivers/staging/fsl-mc/bus/dpbp.c rename to drivers/bus/fsl-mc/dpbp.c index 85735bb..31a360b 100644 --- a/drivers/staging/fsl-mc/bus/dpbp.c +++ b/drivers/bus/fsl-mc/dpbp.c @@ -5,9 +5,9 @@ */ #include #include -#include "../include/dpbp.h" +#include "linux/fsl/mc.h" -#include "dpbp-cmd.h" +#include "fsl-mc-private.h" /** * dpbp_open() - Open a control session for the specified object. diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-mc-private.h index bed990c..4ef8d7e 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -379,6 +379,45 @@ int dprc_get_container_id(struct fsl_mc_io *mc_io, u32 cmd_flags, int *container_id); +/* + * Data Path Buffer Pool (DPBP) API + */ + +/* DPBP Version */ +#define DPBP_VER_MAJOR 3 +#define DPBP_VER_MINOR 2 + +/* Command versioning */ +#define DPBP_CMD_BASE_VERSION 1 +#define DPBP_CMD_ID_OFFSET 4 + +#define DPBP_CMD(id) (((id) << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION) + +/* Command IDs */ +#define DPBP_CMDID_CLOSE DPBP_CMD(0x800) +#define DPBP_CMDID_OPEN DPBP_CMD(0x804) + +#define DPBP_CMDID_ENABLE DPBP_CMD(0x002) +#define DPBP_CMDID_DISABLE DPBP_CMD(0x003) +#define DPBP_CMDID_GET_ATTR DPBP_CMD(0x004) +#define DPBP_CMDID_RESET DPBP_CMD(0x005) + +struct dpbp_cmd_open { + __le32 dpbp_id; +}; + +#define DPBP_ENABLE 0x1 + +struct dpbp_rsp_get_attributes { + /* response word 0 */ + __le16 pad; + __le16 bpid; + __le32 id; + /* response word 1 */ + __le16 version_major; + __le16 version_minor; +}; + /** * Maximum number of total IRQs that can be pre-allocated for an MC bus' * IRQ pool diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index e577410..ce864ee 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -35,10 +35,10 @@ #include #include +#include #include "../../fsl-mc/include/dpaa2-io.h" #include "../../fsl-mc/include/dpaa2-fd.h" -#include "../../fsl-mc/include/dpbp.h" #include "../../fsl-mc/include/dpcon.h" #include "dpni.h" #include "dpni-cmd.h" diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile index b67889e..ea6479f 100644 --- a/drivers/staging/fsl-mc/bus/Makefile +++ b/drivers/staging/fsl-mc/bus/Makefile @@ -4,8 +4,7 @@ # # Copyright (C) 2014 Freescale Semiconductor, Inc. # -obj-$(CONFIG_FSL_MC_BUS) += dpbp.o \ - dpcon.o +obj-$(CONFIG_FSL_MC_BUS) += dpcon.o # MC DPIO driver obj-$(CONFIG_FSL_MC_DPIO) += dpio/ diff --git a/drivers/staging/fsl-mc/bus/dpbp-cmd.h b/drivers/staging/fsl-mc/bus/dpbp-cmd.h deleted file mode 100644 index 3340021..0000000 --- a/drivers/staging/fsl-mc/bus/dpbp-cmd.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ -/* - * Copyright 2013-2016 Freescale Semiconductor Inc. - * - */ -#ifndef _FSL_DPBP_CMD_H -#define _FSL_DPBP_CMD_H - -/* DPBP Version */ -#define DPBP_VER_MAJOR 3 -#define DPBP_VER_MINOR 2 - -/* Command versioning */ -#define DPBP_CMD_BASE_VERSION 1 -#define DPBP_CMD_ID_OFFSET 4 - -#define DPBP_CMD(id) (((id) << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION) - -/* Command IDs */ -#define DPBP_CMDID_CLOSE DPBP_CMD(0x800) -#define DPBP_CMDID_OPEN DPBP_CMD(0x804) - -#define DPBP_CMDID_ENABLE DPBP_CMD(0x002) -#define DPBP_CMDID_DISABLE DPBP_CMD(0x003) -#define DPBP_CMDID_GET_ATTR DPBP_CMD(0x004) -#define DPBP_CMDID_RESET DPBP_CMD(0x005) - -struct dpbp_cmd_open { - __le32 dpbp_id; -}; - -#define DPBP_ENABLE 0x1 - -struct dpbp_rsp_get_attributes { - /* response word 0 */ - __le16 pad; - __le16 bpid; - __le32 id; - /* response word 1 */ - __le16 version_major; - __le16 version_minor; -}; - -#endif /* _FSL_DPBP_CMD_H */ diff --git a/drivers/staging/fsl-mc/include/dpbp.h b/drivers/staging/fsl-mc/include/dpbp.h deleted file mode 100644 index 7b9f7ad..0000000 --- a/drivers/staging/fsl-mc/include/dpbp.h +++ /dev/null @@ -1,53 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ -/* - * Copyright 2013-2016 Freescale Semiconductor Inc. - * - */ -#ifndef __FSL_DPBP_H -#define __FSL_DPBP_H - -/* - * Data Path Buffer Pool API - * Contains initialization APIs and runtime control APIs for DPBP - */ - -struct fsl_mc_io; - -int dpbp_open(struct fsl_mc_io *mc_io, - u32 cmd_flags, - int dpbp_id, - u16 *token); - -int dpbp_close(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpbp_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpbp_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpbp_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -/** - * struct dpbp_attr - Structure representing DPBP attributes - * @id: DPBP object ID - * @bpid: Hardware buffer pool ID; should be used as an argument in - * acquire/release operations on buffers - */ -struct dpbp_attr { - int id; - u16 bpid; -}; - -int dpbp_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - struct dpbp_attr *attr); - -#endif /* __FSL_DPBP_H */ diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index 765ba41..66118e1 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -451,4 +451,46 @@ static inline bool is_fsl_mc_bus_dprtc(const struct fsl_mc_device *mc_dev) return mc_dev->dev.type == &fsl_mc_bus_dprtc_type; } +/* + * Data Path Buffer Pool (DPBP) API + * Contains initialization APIs and runtime control APIs for DPBP + */ + +int dpbp_open(struct fsl_mc_io *mc_io, + u32 cmd_flags, + int dpbp_id, + u16 *token); + +int dpbp_close(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpbp_enable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpbp_disable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpbp_reset(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +/** + * struct dpbp_attr - Structure representing DPBP attributes + * @id: DPBP object ID + * @bpid: Hardware buffer pool ID; should be used as an argument in + * acquire/release operations on buffers + */ +struct dpbp_attr { + int id; + u16 bpid; +}; + +int dpbp_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpbp_attr *attr); + #endif /* _FSL_MC_H_ */ -- 2.7.4