Received: by 10.223.185.116 with SMTP id b49csp8713084wrg; Fri, 2 Mar 2018 06:45:19 -0800 (PST) X-Google-Smtp-Source: AG47ELvz89rtD/oWboxBwNDrdRcydQyiwq6uZI0ttmEEfdLVHtL6K3HMNHVmBD3CXO9b2sAJ2T78 X-Received: by 10.98.159.209 with SMTP id v78mr5829819pfk.49.1520001919702; Fri, 02 Mar 2018 06:45:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520001919; cv=none; d=google.com; s=arc-20160816; b=AmM82819oSDvIdHFGZqR4ZHmuVMtlUG4ynpa5D3m0ROJcl+U5J2aW5AGdcJbhWVKhu fDlf2PtYm9uMLwxuV2GBuDYUAw6INZfHVnwlbwgy9IuzZaVpYEExys2Zymhfjd29yewk LJJaJQe18WaUdGznx5DtkboflTnB6hVzmYyM3gfY77IKE2Y2jsTCAtTi4kHX/Z0bce7h suv3GPr/wshyQPX+z1Rr7my1UDOqmgNM+lorgnokE+ejRnNLZr16UidZ5fF0Dc0eA5sE z/7FSbVBE1jSgqb+VAwKLbmx32Xn+toXROiNQ8YR12ABEX7hFERzegJ/NuIQ9n3h8Qi+ SA+g== 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=ih089H9NK1PRoLDYSU7hnjmcQNp/E2K/jvC792XG4aU=; b=E0blu+UgjHMiZP2Z7f7e8fHXcldx6bWZC5CkMRRgWkNpG5H1PynJKvKFIx34GVW7AC dJ2rS++Eca5i7sP2PEQIqcandSD70NGngfeHkbJlHiBXRyjmwwMWgk61H1fJIqfusLv9 DVUZZ08PiKphZXsEv57+0Y6ya5EqG2fsE6sg4dS6uXwSUDGv8g67RtURSjYD7ybaLOnM Bsr2c+1kbyL3r+lQI6wDx7qYWoYz1gtS2TySgzHTPlu3KbyKoVU9RXICU4YS9gSDtYNg yuljmyAB5tefkw+u/sBjX41sykA/IRoWQnYjdqytkdHo6WYNjuNM3DJv1E40Dn14cmLU fu2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=I4H6vujf; 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 d71si3561157pgc.411.2018.03.02.06.45.03; Fri, 02 Mar 2018 06:45:19 -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=I4H6vujf; 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 S1426479AbeCBKYp (ORCPT + 99 others); Fri, 2 Mar 2018 05:24:45 -0500 Received: from mail-eopbgr20089.outbound.protection.outlook.com ([40.107.2.89]:24656 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1426343AbeCBKYf (ORCPT ); Fri, 2 Mar 2018 05:24:35 -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=ih089H9NK1PRoLDYSU7hnjmcQNp/E2K/jvC792XG4aU=; b=I4H6vujfiQ9mFOGP/qQwIWCviZ6jz8DEw8/NGK2ew5BkhES0gedJ8esqmNg2K9bitAV5RpNsUyuU5qvNQ8s2kYJfuCxO78Qz7STioOJMRlZMxf3L/VTsmcuETuTSbAhumGxObxBHfW9F8sbTl0tp4zAgVdG2uTaCcYuYlXf7tV8= 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:30 +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 v2 2/2] staging: fsl-mc: Move DPCON out of staging Date: Fri, 2 Mar 2018 04:23:59 -0600 Message-Id: <20180302102359.16979-3-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 Content-Type: text/plain 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: 505ed8df-b3d9-4edc-ad3d-08d58027ca63 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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d6DGp0Bg3mRNQ67PmZAKG7J6tfj61HL10IsvsMxz12AU+7cCyr+M/4TupfltaYIt+KAU1fS4GYTLXWafDiZb2f91Iu8y/LZD+0fZ1NtF/7f7L2XA60KNUFhqyuc8D5mkCT6mwH2V7YpqvO8DHQiMXaznO+FedKaZVI9lloBgNP8DYscQ0Z9Cq4eN0/hZY/3qD/IdAVo97kUB4hPYeKHWMlClQ9kETMCrIAE/WN7e2wVWNtgNBYsllRdmvfM02WBU+aXMpbg5K59kDX8QJHvVRF2rvgLwZmPoajTSc+8QisZ7T1wsUXppf9yEgg7m1St1MDTX9QTApsxvyYBxCQh/Rqr+CIHUfGNHT+0jthPmKlET1JsmmdFrzBdMDRBc8DO;4:5y3KWSh9USoQAgJmMnHaXxYQfDtjDdj79LmjqHlrwJI9LNvSduqGINUuUUX4vSeZ+bBczBOBLqL1KskLMnXLhaEN5Lc0SGAhw6JKiiGlHZtlLsBYBqy9VplKtH4pPYXpxoxv37KPNzT27A8tduZd4JnTU830ZXc1wihaPc3rwFhdC++kf/BNCWhDVUBuPMdQkujgv70/uN3xKrVyRHcuj1/crEdMAY99aIktwRQyEU6f05l8tYGWOpglewindbNFXidA7mDgpl4+Sd9ZUkbfGqAq4YpJwVfjvJy3+qJlg6DXQrKJdBRreoPCLAB9fN6w 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)(473944003);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:RZ9pwszf0/u1KszZmev8YqI75fYh1BFFFLHqYW8?= =?us-ascii?Q?dPI5xTt7TqMeUWB00viRR6AAYnBWtvIzJo04VNjjO0nuYXo9EJwGx9W0tq2r?= =?us-ascii?Q?smgc7NIh3fMaKzS0s3SIRVkSJ5JMLkSGsAl5qA1YiUJMRPSRdDC5MiIiR42u?= =?us-ascii?Q?g31yRTJOXBnYk0ZAD1SbGMA8ps7xzOhr/9YsABsU233iJ4AxFcP7shuB0ome?= =?us-ascii?Q?9E/g/z6BNySELl3QZZgUv3Uzt1UFTEXYIFpMYxuaVEgYPQtJzfJQ1Fa2Se3z?= =?us-ascii?Q?ErsUt7q4QALLrwAyMgsgzQmUSBqV0XLPeW1nB/NUNkGa9TsPWPl3h521N7Wa?= =?us-ascii?Q?JJgkaLWRStUDJXzFGCP9SyZOlHy+cTY7EDKaf/hoIx3/iL0kE6w9JXlel8cf?= =?us-ascii?Q?iIdswT+f1vqR4AQP5cHw+Z9oBZDhk3hn7RzRDaMfJOrphCgCRCxTisLmgQRv?= =?us-ascii?Q?sMCkrV/E7HGI/lJXJ+MSHlQW9IKDZoXAQZPnej30HEfU5BdT+gaRunVeOfOw?= =?us-ascii?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nHdAxM5980M9OENhIRExXZHgYM6QbYk+hep4WXyc0IMUJ3K0k8v/wM2M48hu4NAZ9oCSGnmplrsFv4PYi15dIlAfD8BOFCiolQcITRjcg+DyfOK+zBx2TwuDh/R5bi6IaCjY3rkKcJjB0z/dtGqkUYDlL9jt4TBRIbVzBZ8hdMhTLeM3vZGYI=;5:dXbTiMlBCINBJyjCItYkX50xiZPjiFtKtIijoaO6LhOL85zjIU8GqFy8ocmqWovHBma21X5/zm5CLWHexe2kD7dQkRMj5pYTVHOjM3R0ra2r5EUuhsrfdHLBh8x/MZvP614nAVvyawQTHn91SHBMAJiCb+9U9ALw/Q6LnWtg+0E=;24:d85ZOGwcqdO3+JC7O6I9NnobzOvVsHunornH7MF/hhV5ggqVVSGIrzbOTrJFuhjd/YZPYchblY+3dfMmo6SvwJRv+4mVpZIjh7NGrz/iD7U=;7:IjpBKlZewnIgP4rffhdrgB9cCJicZmPgCS+MIlS+ZzmvCqgA4i299XJW+nkVmWAoUvNEzYSGMFdSkZ4R62Kv5AEKowWx4hMCw+iZGd3lZeM2NuUIYrDQqHm/G6wWu/pDpqpTbUK7DB6ktUc9bnx+NtN37lZSfARQuZyy8YeIVMbwjcoqq7lP2gTJAlmWi7qbh4uCDXL4QdCptt3Q2kD0/SUlUW7+r2nw32nZEDa2vM7vup5ISd5bvffNGdq6VlmH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2018 10:24:30.1965 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 505ed8df-b3d9-4edc-ad3d-08d58027ca63 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0402MB3649 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: - dpcon.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpcon-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpcon.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPCON stands for Data Path Concentrator - an interface between DPIO (Data Path IO) and its users (e.g. dpaa2-eth). You can read more about DPIO 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}/dpcon.c | 4 +- drivers/bus/fsl-mc/fsl-mc-private.h | 48 +++++++++++++ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 - drivers/staging/fsl-mc/bus/Makefile | 1 - drivers/staging/fsl-mc/bus/dpcon-cmd.h | 53 --------------- drivers/staging/fsl-mc/include/dpcon.h | 79 ---------------------- include/linux/fsl/mc.h | 66 ++++++++++++++++++ 8 files changed, 117 insertions(+), 136 deletions(-) rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpcon.c (99%) delete mode 100644 drivers/staging/fsl-mc/bus/dpcon-cmd.h delete mode 100644 drivers/staging/fsl-mc/include/dpcon.h diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile index da26e52..3c518c7 100644 --- a/drivers/bus/fsl-mc/Makefile +++ b/drivers/bus/fsl-mc/Makefile @@ -10,6 +10,7 @@ mc-bus-driver-objs := fsl-mc-bus.o \ mc-sys.o \ mc-io.o \ dpbp.o \ + dpcon.o \ dprc.o \ dprc-driver.o \ fsl-mc-allocator.o \ diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/bus/fsl-mc/dpcon.c similarity index 99% rename from drivers/staging/fsl-mc/bus/dpcon.c rename to drivers/bus/fsl-mc/dpcon.c index 021b425..a1ba819 100644 --- a/drivers/staging/fsl-mc/bus/dpcon.c +++ b/drivers/bus/fsl-mc/dpcon.c @@ -5,9 +5,9 @@ */ #include #include -#include "../include/dpcon.h" +#include -#include "dpcon-cmd.h" +#include "fsl-mc-private.h" /** * dpcon_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 4ef8d7e..52c069d 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -418,6 +418,54 @@ struct dpbp_rsp_get_attributes { __le16 version_minor; }; +/* + * Data Path Concentrator (DPCON) API + */ + +/* DPCON Version */ +#define DPCON_VER_MAJOR 3 +#define DPCON_VER_MINOR 2 + +/* Command versioning */ +#define DPCON_CMD_BASE_VERSION 1 +#define DPCON_CMD_ID_OFFSET 4 + +#define DPCON_CMD(id) (((id) << DPCON_CMD_ID_OFFSET) | DPCON_CMD_BASE_VERSION) + +/* Command IDs */ +#define DPCON_CMDID_CLOSE DPCON_CMD(0x800) +#define DPCON_CMDID_OPEN DPCON_CMD(0x808) + +#define DPCON_CMDID_ENABLE DPCON_CMD(0x002) +#define DPCON_CMDID_DISABLE DPCON_CMD(0x003) +#define DPCON_CMDID_GET_ATTR DPCON_CMD(0x004) +#define DPCON_CMDID_RESET DPCON_CMD(0x005) + +#define DPCON_CMDID_SET_NOTIFICATION DPCON_CMD(0x100) + +struct dpcon_cmd_open { + __le32 dpcon_id; +}; + +#define DPCON_ENABLE 1 + +struct dpcon_rsp_get_attr { + /* response word 0 */ + __le32 id; + __le16 qbman_ch_id; + u8 num_priorities; + u8 pad; +}; + +struct dpcon_cmd_set_notification { + /* cmd word 0 */ + __le32 dpio_id; + u8 priority; + u8 pad[3]; + /* cmd word 1 */ + __le64 user_ctx; +}; + /** * 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 ce864ee..b8990cf 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -39,7 +39,6 @@ #include "../../fsl-mc/include/dpaa2-io.h" #include "../../fsl-mc/include/dpaa2-fd.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 ea6479f..21d8ebc 100644 --- a/drivers/staging/fsl-mc/bus/Makefile +++ b/drivers/staging/fsl-mc/bus/Makefile @@ -4,7 +4,6 @@ # # Copyright (C) 2014 Freescale Semiconductor, Inc. # -obj-$(CONFIG_FSL_MC_BUS) += dpcon.o # MC DPIO driver obj-$(CONFIG_FSL_MC_DPIO) += dpio/ diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpcon-cmd.h deleted file mode 100644 index 27fa098..0000000 --- a/drivers/staging/fsl-mc/bus/dpcon-cmd.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_DPCON_CMD_H -#define _FSL_DPCON_CMD_H - -/* DPCON Version */ -#define DPCON_VER_MAJOR 3 -#define DPCON_VER_MINOR 2 - -/* Command versioning */ -#define DPCON_CMD_BASE_VERSION 1 -#define DPCON_CMD_ID_OFFSET 4 - -#define DPCON_CMD(id) (((id) << DPCON_CMD_ID_OFFSET) | DPCON_CMD_BASE_VERSION) - -/* Command IDs */ -#define DPCON_CMDID_CLOSE DPCON_CMD(0x800) -#define DPCON_CMDID_OPEN DPCON_CMD(0x808) - -#define DPCON_CMDID_ENABLE DPCON_CMD(0x002) -#define DPCON_CMDID_DISABLE DPCON_CMD(0x003) -#define DPCON_CMDID_GET_ATTR DPCON_CMD(0x004) -#define DPCON_CMDID_RESET DPCON_CMD(0x005) - -#define DPCON_CMDID_SET_NOTIFICATION DPCON_CMD(0x100) - -struct dpcon_cmd_open { - __le32 dpcon_id; -}; - -#define DPCON_ENABLE 1 - -struct dpcon_rsp_get_attr { - /* response word 0 */ - __le32 id; - __le16 qbman_ch_id; - u8 num_priorities; - u8 pad; -}; - -struct dpcon_cmd_set_notification { - /* cmd word 0 */ - __le32 dpio_id; - u8 priority; - u8 pad[3]; - /* cmd word 1 */ - __le64 user_ctx; -}; - -#endif /* _FSL_DPCON_CMD_H */ diff --git a/drivers/staging/fsl-mc/include/dpcon.h b/drivers/staging/fsl-mc/include/dpcon.h deleted file mode 100644 index 062e90a..0000000 --- a/drivers/staging/fsl-mc/include/dpcon.h +++ /dev/null @@ -1,79 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ -/* - * Copyright 2013-2016 Freescale Semiconductor Inc. - * - */ -#ifndef __FSL_DPCON_H -#define __FSL_DPCON_H - -/* Data Path Concentrator API - * Contains initialization APIs and runtime control APIs for DPCON - */ - -struct fsl_mc_io; - -/** General DPCON macros */ - -/** - * Use it to disable notifications; see dpcon_set_notification() - */ -#define DPCON_INVALID_DPIO_ID (int)(-1) - -int dpcon_open(struct fsl_mc_io *mc_io, - u32 cmd_flags, - int dpcon_id, - u16 *token); - -int dpcon_close(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpcon_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpcon_disable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -int dpcon_reset(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token); - -/** - * struct dpcon_attr - Structure representing DPCON attributes - * @id: DPCON object ID - * @qbman_ch_id: Channel ID to be used by dequeue operation - * @num_priorities: Number of priorities for the DPCON channel (1-8) - */ -struct dpcon_attr { - int id; - u16 qbman_ch_id; - u8 num_priorities; -}; - -int dpcon_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - struct dpcon_attr *attr); - -/** - * struct dpcon_notification_cfg - Structure representing notification params - * @dpio_id: DPIO object ID; must be configured with a notification channel; - * to disable notifications set it to 'DPCON_INVALID_DPIO_ID'; - * @priority: Priority selection within the DPIO channel; valid values - * are 0-7, depending on the number of priorities in that channel - * @user_ctx: User context value provided with each CDAN message - */ -struct dpcon_notification_cfg { - int dpio_id; - u8 priority; - u64 user_ctx; -}; - -int dpcon_set_notification(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - struct dpcon_notification_cfg *cfg); - -#endif /* __FSL_DPCON_H */ diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index 66118e1..cfb1fbf 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -493,4 +493,70 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io, u16 token, struct dpbp_attr *attr); +/* Data Path Concentrator (DPCON) API + * Contains initialization APIs and runtime control APIs for DPCON + */ + +/** + * Use it to disable notifications; see dpcon_set_notification() + */ +#define DPCON_INVALID_DPIO_ID (int)(-1) + +int dpcon_open(struct fsl_mc_io *mc_io, + u32 cmd_flags, + int dpcon_id, + u16 *token); + +int dpcon_close(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_enable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_disable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_reset(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +/** + * struct dpcon_attr - Structure representing DPCON attributes + * @id: DPCON object ID + * @qbman_ch_id: Channel ID to be used by dequeue operation + * @num_priorities: Number of priorities for the DPCON channel (1-8) + */ +struct dpcon_attr { + int id; + u16 qbman_ch_id; + u8 num_priorities; +}; + +int dpcon_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_attr *attr); + +/** + * struct dpcon_notification_cfg - Structure representing notification params + * @dpio_id: DPIO object ID; must be configured with a notification channel; + * to disable notifications set it to 'DPCON_INVALID_DPIO_ID'; + * @priority: Priority selection within the DPIO channel; valid values + * are 0-7, depending on the number of priorities in that channel + * @user_ctx: User context value provided with each CDAN message + */ +struct dpcon_notification_cfg { + int dpio_id; + u8 priority; + u64 user_ctx; +}; + +int dpcon_set_notification(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_notification_cfg *cfg); + #endif /* _FSL_MC_H_ */ -- 2.7.4