From patchwork Fri Mar 2 10:23:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Purcareata X-Patchwork-Id: 10254133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 53FBD603ED for ; Fri, 2 Mar 2018 10:25:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37C612855A for ; Fri, 2 Mar 2018 10:25:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A3F028946; Fri, 2 Mar 2018 10:25:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6438828944 for ; Fri, 2 Mar 2018 10:25:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rkVmdb9dYQ9gyMj2QBR9Xp9g3YdQB5bXDxkfr+Ptbx4=; b=Vn5midatsR8WVc y0WXCR8UIuLANOAL41oarwMkVMfZtW1U6PyxtkVMoUt43ugOPspyqGv10Dq7e1VM4st4PR+YPQ9nz +Te0GDlFYAaByCbgaLY4JLeRVSaxsHDyQLfe2iRIerR42pvTKJskT8Re4OqXIdq++G1Xq8u7B9T7D MdRraIPmBaaAykKYPJfFv5txi3JXqINNfuckzsAHb0x+pkHshXLLOfBO7erolLq+uG0StITLAHLvk ma5eTS+IBZk+1U2kuA72XvVWDBv0suIi63s5MT+7+MFCxsscjNaJfs1JpYOBGAebhKoPDz+ODKp65 aJMys1QQToAsCBHljgHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erhsB-0003W1-IK; Fri, 02 Mar 2018 10:25:07 +0000 Received: from mail-eopbgr20049.outbound.protection.outlook.com ([40.107.2.49] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erhrh-00038Q-NE for linux-arm-kernel@lists.infradead.org; Fri, 02 Mar 2018 10:24:40 +0000 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=gOHim9AdBZgmh1GamrOYVQNxKZuhtgi8fK1tjVyNrzI=; b=mDDgjWrmCmMRnX86lZNDDt5pT9FPKGP5HCWlI8n9+RuM6FiUYzohtYA7UNSLhnkHl+VAC/hosRl1DWEjyFyN1R5KEbI0bo9CFeSAbHCfONtU9bkFS6tlJI9fD6aIqYB15h5d5pfr7E/IDOYYkz2AX//ZgxG2pCSsMQJ/X65K1Yo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bogdan.purcareata@nxp.com; Received: from rhuath.am.freescale.net (192.88.168.1) by AM0PR0402MB3649.eurprd04.prod.outlook.com (2603:10a6:208:c::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Fri, 2 Mar 2018 10:24:24 +0000 From: Bogdan Purcareata To: gregkh@linuxfoundation.org, laurentiu.tudor@nxp.com, ruxandra.radulescu@nxp.com Subject: [PATCH v2 1/2] staging: fsl-mc: Move DPBP out of staging Date: Fri, 2 Mar 2018 04:23:58 -0600 Message-Id: <20180302102359.16979-2-bogdan.purcareata@nxp.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180302102359.16979-1-bogdan.purcareata@nxp.com> References: <20180302102359.16979-1-bogdan.purcareata@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: MWHPR2201CA0055.namprd22.prod.outlook.com (2603:10b6:301:16::29) To AM0PR0402MB3649.eurprd04.prod.outlook.com (2603:10a6:208:c::32) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2a84a132-7016-4387-af28-08d58027c6ba X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM0PR0402MB3649; X-Microsoft-Exchange-Diagnostics: 1; AM0PR0402MB3649; 3:manz56YoRYE+QzzVNy2sm85pH6XyqtqUa1pzPLZWxPW0+5FSe8dBRXNaT5Kh/3mlK1LrEqqS6W28k+3TJwszxODNFTkvJol26zmEV17Zb9WfQvF65IF7HPnu6NiS14HFvgGtkbPDtY6TjGll1V729thDPoRPDxlKvWwSa+P20ER3W2nDIawnCoyxbjq6HZ5k6k3cSRLYnzm3ncvlZKrB2lIvThm/7LA6O+2lvf+z7f/o2jX7rEmkBbRfpqGuE5U7; 25:PJtzyPBQZt6aMv0+xCwUGP1WpFcregzluOQi1Jzc5zRehTIJjEYPHYvQizpoNm1rSKpT/oLQck2D1JnTwc4I0CZHiv1RJGwy98BgS1cfmHh+t4jybVw/L7vj+eTVpTm+hJhKDbY7dU+b0RWIoG6m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ALx0HKCXOsWVjr9AeLioefb2tBfjQLf6XTJ68t7g7EvpxG5s56WLW+2+/s6XrtIo//Pnhd6Go8v5zRrJSdcnZz9SIiksBRjN7T18GIvGTZc523PRIzfTL+wncjMmlJNbAdLJ2e6BIbxamZx3dKOATWBO4awMijSsUDR/NG3RfamrklOKrBuysaReuyzTfnGb4Hq+f7G0PAPopuX6j2wv4ttwiP6jydStIdjWnLVyuHLWJLmsFR1ydiOk1j7FID9eP5FLtXWDvAa 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)(5005006)(8121501046)(10201501046)(3231220)(944501238)(3002001)(93006095)(93001095)(6055026)(6041288)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM0PR0402MB3649; BCL:0; PCL:0; RULEID:; SRVR:AM0PR0402MB3649; X-Forefront-PRVS: 05991796DF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(376002)(396003)(366004)(346002)(189003)(199004)(81166006)(16586007)(86362001)(50466002)(48376002)(53936002)(76176011)(106356001)(6512007)(5660300001)(51416003)(25786009)(186003)(16526019)(68736007)(50226002)(36756003)(97736004)(478600001)(59450400001)(52116002)(66066001)(39060400002)(6116002)(3846002)(1076002)(386003)(105586002)(8676002)(81156014)(26005)(47776003)(4326008)(8936002)(2906002)(316002)(6636002)(6666003)(6486002)(6506007)(7736002)(2950100002)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0402MB3649; 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; AM0PR0402MB3649; 23:hIZqmnJ0XrbkKWif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OGN6wHRof7Qc7zOwBeORr2eQHq2iwqwx0umAi5nIqfIwCMmYqdZzZuScZ+uY46NrSIGfj+47CpujTx3zNGm4ZQyDzZ0xRaza1vbC1llUu2pt9Q5phBl5yjDYyNoI+ulByeZBCE+nNDyJ7PSNhYjkBwI+Ejl4dAEoVwkA6c700U+/+kwG+qZbp8CXmDNqbGRu6ilSURsZ5CBJ+FgVL9rzPy6ipQzG182CJ1X05OYZeh+fb2h46/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2018 10:24:24.0402 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a84a132-7016-4387-af28-08d58027c6ba X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3649 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180302_022437_957669_FE0AD446 X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, stuyoder@gmail.com, horia.geanta@nxp.com, roy.pledge@nxp.com, ioana.ciornei@nxp.com, linux-kernel@vger.kernel.org, nipun.gupta@nxp.com, Bogdan Purcareata , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Laurentiu Tudor --- v1 -> v2: - properly refactor #include line (Laurentiu) 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..0aeacc5 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 -#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_ */