From patchwork Mon Jul 23 17:00:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 10540619 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97E081805 for ; Mon, 23 Jul 2018 17:01:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8157928B58 for ; Mon, 23 Jul 2018 17:01:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7514028BEC; Mon, 23 Jul 2018 17:01:36 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI 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 ECB4828B58 for ; Mon, 23 Jul 2018 17:01:35 +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:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HVgEQUreWUJMZSZ8A5BkVOK76UO3OiezwL1XF+Pb3aI=; b=pdFFLM5NbhHrmQ L9syk6TvfSxG7zfUU2PdWypbGK3ODRGN2BD+Bk+UQp6PrMdVvj3mopufFyr9udz9sG0Jw6ImrC+dS LEr7GeG8d3NDvAACRbjzayahc9y/K8NbLwHviPr0W3F+yR6R4nL0zEE4p+8CvsLIr0IjxSVpMccH7 936Jcnb1u3C5GkP+uhiL/Iy3OAs/98BzbmWL+u7ZJOzW1rmQCoXjwiHwLr8IP9IiOCshZ7GzzGWHF qKUzVVlkymT9drAL1bQl3excg4UxdYA0GQ3G4BWx46FJZPONcgSE1uktOLK46T5JNk5yyunILmgn0 l5HWkwmiVOqbDvXnI9yQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fheDB-0008KA-VB; Mon, 23 Jul 2018 17:01:29 +0000 Received: from mail-eopbgr40084.outbound.protection.outlook.com ([40.107.4.84] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fheCt-000813-7G for linux-arm-kernel@lists.infradead.org; Mon, 23 Jul 2018 17:01:12 +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:X-MS-Exchange-SenderADCheck; bh=lDZKIHyR2034iUyRWQVawtltx+astMShveJjBdzqC+Y=; b=vo8iXNmllFkxJun3vOpUrUJBfK9I33fIp7uB0fNaEiYUgQOuqNGofIIe1zs4cxw7DPmNd5wxxc7HRSui7V3hvObXxVp/C1tZsjddR1lKCFFsBMOO3ueHAdgtR4+Sr+LD+kyfcsLDJw6ZwCMQeHrEps2H4rJMSf8RbJm2qwlUFLw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=roy.pledge@nxp.com; Received: from rhuath.am.freescale.net (64.157.242.222) by VI1PR04MB4494.eurprd04.prod.outlook.com (2603:10a6:803:69::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Mon, 23 Jul 2018 17:00:46 +0000 From: Roy Pledge To: devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, leoyang.li@nxp.com Subject: [PATCH v2 1/4] staging: fsl-dpaa2/eth: move generic FD defines to DPIO Date: Mon, 23 Jul 2018 12:00:22 -0500 Message-Id: <20180723170025.2259-2-roy.pledge@nxp.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180723170025.2259-1-roy.pledge@nxp.com> References: <20180723170025.2259-1-roy.pledge@nxp.com> MIME-Version: 1.0 X-Originating-IP: [64.157.242.222] X-ClientProxiedBy: SN6PR1501CA0021.namprd15.prod.outlook.com (2603:10b6:805::34) To VI1PR04MB4494.eurprd04.prod.outlook.com (2603:10a6:803:69::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7709d918-d4f1-4ea3-a1ce-08d5f0bdd6c9 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB4494; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB4494; 3:4KwJdjx4R/CMTvflFmG3dnMCN8hlYSLWWPUShA3tVEcTeP/6WqcZoX5dUIL2zIG/IZqvMLF73ec5pPNpA3t6AliFCYBToOgzG+xym79t0td+8BI4A+LoqXXSMJsrO13O+SAwzkWbiaJzTPlROtkI/JuUYr+kKRliXCs3dHUuOEjT2VzsyqnFTigWpePyf6QFIKwQs7YmMzDET4p2DMUCAKgU+OPx6C6ly6ixs4v2IUcFCuuVBQVGYJK1FKdDNAl8; 25:nG/AsBk6XY0G7hygfkSTiXy0tKXHulbrGV9Y1kxqLIQeS5i8KaCFMC9VSRpfYOgd+3f8JByFgShYASTg4tmD+j6GYoPfEHrgpmP+XHJdfKdX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/tRhC32MNlKCRIdrUmnLTwTmlNdweeleodYfurd6DztXgPbfFhwxDFwlwSFBQtZLpd185EkS+BMBP/nLRWrSY7lDwXeVqyZOK9B3JufMyRnGkGqV/JIF58L8JO4NlE3bjAPbZLRUy1mClvTJMSpMrZMLpNA60Sb0Lzqb5TORL5sybGrfVdeki1EIBBMHTjAZjrMv9V/LPeh7ZUbOM2ggQZFc8/naBktXcvsHtHNtZVtjA11vNG1pv9PJV/rN3Euwsjsbc/MWka4ihI8usKx5JSAf9HKjZgHAfCvfv1usUmYeF+At/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:VI1PR04MB4494; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB4494; X-Forefront-PRVS: 0742443479 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(376002)(136003)(39860400002)(366004)(396003)(189003)(199004)(7736002)(386003)(6506007)(76176011)(105586002)(5660300001)(6666003)(186003)(2906002)(16526019)(6636002)(26005)(47776003)(8936002)(316002)(81156014)(3846002)(6116002)(50226002)(53936002)(476003)(4326008)(68736007)(106356001)(446003)(11346002)(956004)(2616005)(25786009)(14444005)(43066004)(6486002)(575784001)(50466002)(66066001)(52116002)(478600001)(8676002)(23676004)(86362001)(2870700001)(3450700001)(1076002)(44832011)(81166006)(36756003)(486006)(305945005)(6512007)(97736004)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB4494; H:rhuath.am.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BVI1PR04MB4494=3B23=3AC8UpvdG?= =?utf-8?q?BGx1cLF3nbHjaaQTgSzBJxeGbItD48IDbcGqhzyLOQihBWvvej7N4DYbJGAxOAVKl?= =?utf-8?q?i7wYzBR5Z7vQxOiopGWFZwZfhX5fHoDi1+PAoxlT5kStJr2NKJGQ4gtcvA5YMAfUJ?= =?utf-8?q?Lf4PMBcxxgDq8AsmFygI84TnwhILz63CYwBR9VeclEf0Fv4gkGWCmV8h45XE7r9ut?= =?utf-8?q?6NXQYJZV84efs3ZfjbkKiNWECK3+DWHBmR+ZDsbOAV5GcHe9fRleEVQwp0ySN1T2z?= =?utf-8?q?NyLYYFov+nJJBfEuflSb25iUUqn6a5R0eDDWrS7rcE5Y82VvSNOlynOow3XUok2Ww?= =?utf-8?q?EJnzhjFQ33+j3gVA0DhD3kuiV0Q5uNRa4UjaGPhevwhq1Xuv7AE6Oj/xsVll4dNZ6?= =?utf-8?q?wj9GYXdnaklYRcO92Omeoi/0r4EKcXhQyPn/wOV29KwX0bOHe5Zr1Gycjzlm7XwvT?= =?utf-8?q?OgqZN3/0N6oeQMnX6MnyZfD+wKtV52D+9ibERGwfbi+2qI/mpYQLHkKecctCz6A97?= =?utf-8?q?zKq3tP3qvwtTG8b6GP/v1FpyU/ol62Cr9+0DzTW0aF+9Y5xldDy6AYWRYlGeHhSNj?= =?utf-8?q?YsbHJsK0sU/kqJ0f77OiYbjpsOlYYoB0rGjJzfoNOZ4BsqH2KXzJVCGs07ilv1/oz?= =?utf-8?q?Ba0IJNaFhqf/SB5Lh0XC+MRJOY+rDMxtpFGyYT/C+PQe8cZpuGW1/GsSXuVdXkU6T?= =?utf-8?q?b+JQP9Duf1uEeoNjbpFO+ClozkKU7gQhQKFrZ7wKCgP+CDijPHI4qckVmXLahmV5N?= =?utf-8?q?rAVsdAES43aEcC5kGmSOGl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CvTjCYNhm5HviaoRgxHTjP0GAzi7yz4sTHMYzpzEvsyWEKV3UziEn166avp8jkOqQcsstsx4qH7vdTTCBzMvmdrPosTZShAzut+oIYcUDQ9W4xbOEetxaZ1ZISWd5ApkFrdH6uBWaRbrZNKmS9Pg7Ifw+GGDSZwmD/lsrpmxePwX8MSNeBw2Xius1xxuCTXXiYWptyxZ63wRyUE4S5ytmk8KWc6GXPpHdSjkS6M0XS4K2+rBx4ihbLdroekF4PiitrP9fz561VFlo5ZK2RptLLaI5RfyRTISVFXW/rmtw2b7EEn0BOlkVjC+msO0LkPQ1e/gDxwZXRYVsbQhO5eCgRnHWfAGnRUvC4JKh0r+rnJ8h3vIYzouf9QeZREXOpBM4UW164ByY3sqKuchFBgo34rA==; 5:LkvIWoeXMF7xW9dWSiFSwC6f+EsU3PG/0DrSvBIuGM+sCbbOxlYber15accoIJNplNQZaq5wdO+BBZ3OuygVKKtGrrkOdtusbS1ZJJkO862pJDPnEix2kG6geBbvl1sdLwQCVHrPG/Zr7yu3Ou6t9k4292FfPotF8mPdvmiGXqs=; 7:Cn46CoprVF6+iU54GVnKmfd0HH0C3jF1V+EnIXU+kon8/unwhCFjZvUPSXj/wTN5y2mrRdk5wnncCx5mjRXhHMLMhK2sq8M3JfpskQCV6jhF6F85aFJaDQL8FDpb+MaGiS/GMUB8M4BErSjtEjoGXW1YEQzLbxKFvLzqFSkRUvxzGmocgWEB1c3wX2w3QxWK5Qxnsg4apdVyZNRagLA0QYLd1wS91Zu6TZC1rSGs+/zR6nnVevWQj1E4KD+ASqZO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2018 17:00:46.6910 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7709d918-d4f1-4ea3-a1ce-08d5f0bdd6c9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4494 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180723_100111_265967_543F98C9 X-CRM114-Status: GOOD ( 10.83 ) 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: , Reply-To: roy.pledge@nxp.com Cc: horia.geanta@nxp.com, arnd@arndb.de, catalin.marinas@arm.com, ruxandra.radulescu@nxp.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com, laurentiu.tudor@nxp.com 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 From: Horia Geantă Previous commits: commit 6e2387e8f19e ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") commit 39163c0ce0f4 ("staging: fsl-dpaa2/eth: Errors checking update") have added bits that are not specific to the WRIOP accelerator. Move these where they belong (in DPIO) such that other accelerators can make use of them. Signed-off-by: Horia Geantă Acked-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 4 ++-- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +++++------------- drivers/staging/fsl-mc/include/dpaa2-fd.h | 12 ++++++++++++ 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 3963717..d5f0ac5 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_format(fd, dpaa2_fd_sg); dpaa2_fd_set_addr(fd, addr); dpaa2_fd_set_len(fd, skb->len); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, sgt_buf); @@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv, dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start)); dpaa2_fd_set_len(fd, skb->len); dpaa2_fd_set_format(fd, dpaa2_fd_single); - dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1); + dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1); if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) enable_tx_tstamp(fd, buffer_start); diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index 905a4e6..9269cb0 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -124,21 +124,13 @@ struct dpaa2_eth_swa { #define DPAA2_FD_FRC_FAICFDV 0x0400 /* Error bits in FD CTRL */ -#define DPAA2_FD_CTRL_UFD 0x00000004 -#define DPAA2_FD_CTRL_SBE 0x00000008 -#define DPAA2_FD_CTRL_FSE 0x00000020 -#define DPAA2_FD_CTRL_FAERR 0x00000040 - -#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ - DPAA2_FD_CTRL_FAERR) -#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ - DPAA2_FD_CTRL_SBE | \ - DPAA2_FD_CTRL_FSE | \ - DPAA2_FD_CTRL_FAERR) +#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR) +#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD | \ + FD_CTRL_SBE | \ + FD_CTRL_FSE | \ + FD_CTRL_FAERR) /* Annotation bits in FD CTRL */ -#define DPAA2_FD_CTRL_PTA 0x00800000 -#define DPAA2_FD_CTRL_PTV1 0x00400000 #define DPAA2_FD_CTRL_ASAL 0x00020000 /* ASAL = 128B */ /* Frame annotation status */ diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/drivers/staging/fsl-mc/include/dpaa2-fd.h index b55b89b..2576aba 100644 --- a/drivers/staging/fsl-mc/include/dpaa2-fd.h +++ b/drivers/staging/fsl-mc/include/dpaa2-fd.h @@ -67,6 +67,18 @@ struct dpaa2_fd { #define SG_FINAL_FLAG_MASK 0x1 #define SG_FINAL_FLAG_SHIFT 15 +/* Error bits in FD CTRL */ +#define FD_CTRL_ERR_MASK 0x000000FF +#define FD_CTRL_UFD 0x00000004 +#define FD_CTRL_SBE 0x00000008 +#define FD_CTRL_FLC 0x00000010 +#define FD_CTRL_FSE 0x00000020 +#define FD_CTRL_FAERR 0x00000040 + +/* Annotation bits in FD CTRL */ +#define FD_CTRL_PTA 0x00800000 +#define FD_CTRL_PTV1 0x00400000 + enum dpaa2_fd_format { dpaa2_fd_single = 0, dpaa2_fd_list,