From patchwork Fri Jul 6 12:25:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 10511489 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 D3140600CA for ; Fri, 6 Jul 2018 12:26:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0681285F0 for ; Fri, 6 Jul 2018 12:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2E51285FC; Fri, 6 Jul 2018 12:26:11 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_SORBS_WEB autolearn=no 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 511FD285F0 for ; Fri, 6 Jul 2018 12:26:11 +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: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:In-Reply-To: List-Owner; bh=uT428eaDPZqA9kAu175YJ7z9tc9GWgMl+kUgneP3/dA=; b=Ue6sSUWUFtPScf 6TXZHIWYI57pr/JX3/hiFxjs84aLh8HgeCAkL2lfD2vXf56kjL4cpmXmrK7f+bGP1l0NdtPhls2mM P8+603Y33ccXkdxQohZig1MGRP2HbmRRK7/Qy2QJ2KBymezMKQJulid5j62ThpdhE7xT12u8Jcp4y Ko/+zb05nkm2dgiZEqKjrtkVZ7A7PVwhUUuzFY80V+46D9m+bkToSbSK1QGr4Li62FxHZ2Y75qaCz X0lPMUl+0udAQZApftJWbPuC6vMdLqmqvWHsEY/NGFbnNrjGOpqcIutOIrg00xlODQ+c6bYR0JvgZ 1c2nFGT5wFdCXYB2FD1A==; 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 1fbPoN-0006Mo-NJ; Fri, 06 Jul 2018 12:26:07 +0000 Received: from mail-eopbgr40089.outbound.protection.outlook.com ([40.107.4.89] helo=EUR03-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbPoJ-0006AL-NA for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2018 12:26:06 +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=ssr8m5nv48NPtoGV6fBOaDdgSiBQr1lS0neTH8wjkgY=; b=q8jOSudYFhIpTFhFlICofz8fAPfc60zxJyyYjTSi5J81YKedfMmfX+33vl7l1mrFrMW2obNIOxWyXqshdAfGW4c4J2KriicLnp+QpD6C6QKAPzNB4bccjwwwG21mYVFjm7ZIJf8PWOl6Z8LYjSIn8XGffLwyygVW0rk3mZigPIg= Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com (52.134.3.153) by VI1SPR01MB325.eurprd04.prod.outlook.com (10.165.198.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.18; Fri, 6 Jul 2018 12:25:48 +0000 Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::197e:c4f9:bb4d:e560]) by VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::197e:c4f9:bb4d:e560%2]) with mapi id 15.20.0906.027; Fri, 6 Jul 2018 12:25:48 +0000 From: Horia Geanta To: Roy Pledge , "devel@driverdev.osuosl.org" , "linux-arm-kernel@lists.infradead.org" , "gregkh@linuxfoundation.org" , Leo Li , Ioana Ciocoi Radulescu Subject: Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl Thread-Topic: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl Thread-Index: AQHUFJgt6LCNXmuqP0KWKGxjabTg8Q== Date: Fri, 6 Jul 2018 12:25:48 +0000 Message-ID: References: <20180705194113.16256-1-roy.pledge@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=horia.geanta@nxp.com; x-originating-ip: [86.34.165.90] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1SPR01MB325; 7:+0JHHfr0oQKVxSSAlD9u8ZTzGlmbzzquBG9btA9NGopecY+IG10Npt8L1TeLTzSgoWEuyHIXXx/dLYt3gYxkZLjh/D/nZdlot98D/D4jJjEmZe4OkCgvEa+AjEfdtn70l8sQqialiEWIUrSvgviwaA7xMZOD9KppdQ20Bp3hFzvKCDZB6bAcIfl3WqNjtxACruJyKV460lnJmuiv1HkWnfc3ch/FP2i70qHbJAi9gt+kR1jHr63PYD2jVFySyYF6 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 2db6545b-31ab-45c0-0aa3-08d5e33b9b25 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1SPR01MB325; x-ms-traffictypediagnostic: VI1SPR01MB325: 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)(5005006)(8121501046)(3002001)(10201501046)(3231291)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1SPR01MB325; BCL:0; PCL:0; RULEID:; SRVR:VI1SPR01MB325; x-forefront-prvs: 0725D9E8D0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(366004)(39860400002)(136003)(199004)(189003)(97736004)(229853002)(53936002)(486006)(44832011)(6246003)(81156014)(256004)(99286004)(478600001)(81166006)(6116002)(6436002)(476003)(3846002)(8676002)(446003)(55016002)(316002)(110136005)(25786009)(9686003)(14444005)(4326008)(68736007)(33656002)(7736002)(102836004)(54906003)(53546011)(6506007)(305945005)(8936002)(2900100001)(5250100002)(7696005)(26005)(2906002)(6636002)(66066001)(76176011)(74316002)(2501003)(5660300001)(575784001)(86362001)(106356001)(14454004)(2201001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1SPR01MB325; H:VI1PR0402MB3485.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: UHrM9dnKhVTHtBUXkigd1bzFnIK5q4iWaDgL51zi+XUa/XVuWMQ2ICKv8HKs0JTC7b3IszNEDYvrdxaFcahiN1+EK/vISiv9bAGVal5g4wFZtNMgwCcy42hd6DJxDpZD2hyW+xLBUz6Q+icKWI/ojmoHxj12VfGGs1KfyKLuqIcGbLejvU9VIB9JQc/PWnVFkB8aog7dktZREY9/zPZYJ4nT9pm7Tqa8vxQw4NlE5SKgtsKiSeT3HH1z5/PGyDPWQecVGRYM3xby5TC2sR0MBbe9Y/VBhClQl0Ksks3rFF1lOYsmkxFU3b8Fd741naV9dixynK/Zf1k2W9j+6vI8RHun4bSbHhzrOhSALaHgYuc= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2db6545b-31ab-45c0-0aa3-08d5e33b9b25 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jul 2018 12:25:48.6858 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR01MB325 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180706_052603_885968_97DEAE0A X-CRM114-Status: GOOD ( 14.88 ) 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: "catalin.marinas@arm.com" , "robin.murphy@arm.com" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , Laurentiu Tudor 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 On 7/5/2018 10:41 PM, Roy Pledge wrote: > Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio > directory to the drivers/soc/fsl directory. > > The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) > hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 > Ethernet device driver from the staging directory. > Roy, Ioana, Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object. If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming. Thanks, Horia --->8--- Previous commits: 6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") 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 396371728aa1..d5f0ac5c2d1f 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 905a4e6be8fa..9269cb05a84b 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 b55b89ba4eda..2576abaa7779 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,