Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161176AbcLPQjK (ORCPT ); Fri, 16 Dec 2016 11:39:10 -0500 Received: from mail-sn1nam02on0041.outbound.protection.outlook.com ([104.47.36.41]:9319 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935399AbcLPQi5 (ORCPT ); Fri, 16 Dec 2016 11:38:57 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:775;Count:8 From: Stuart Yoder To: CC: , , , , , , , , , , Stuart Yoder Subject: [PATCH v5 0/8] staging: fsl-mc: add dpio driver Date: Fri, 16 Dec 2016 10:30:58 -0600 Message-ID: <1481905866-10816-1-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.9.0 X-IncomingHeaderCount: 8 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131263799350175736;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(336005)(39840400002)(39410400002)(39450400003)(39850400002)(39380400002)(39860400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(8936002)(86362001)(31430400001)(189998001)(38730400001)(50986999)(68736007)(5003940100001)(77096006)(50466002)(50226002)(33646002)(104016004)(97736004)(48376002)(110136003)(356003)(47776003)(8666005)(6916009)(626004)(36756003)(7416002)(5660300001)(92566002)(305945005)(85426001)(81166006)(8676002)(4326007)(106466001)(2351001)(2906002)(105606002)(81156014)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR03MB2466;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD037;1:aYNmdUnmMSErLNAh0N7pOtnd7dWIpzwrvmiwAFF5UogA4dgO9wHQZWsyazBXyXBm6Tt2+CsRI8HwrjRYKrY1MISypqhRZmmeq+zZDF4x6leSQDvkWcyfzWMl+5EUD3Bblh+DVB857EF9ZjpoXLR24eylD+5Q0gXIl+c0eEJXUF02KNpJtJNO0foSzUXPhJOJT2xBCHJBcJbxBKfA+DQ2GMqq9I9AtQGDP9BCnTbSQP0PYD1QHifCxsSdgHYtQ5Y1c48hkN6ACbk4z2NGpJX/mdWe7Y7MCje4zzR3sSpewJ/QGGnpGc0Y9y721jymUPOz694KtNDhG9yGl1kECF2DbWFUSUsBI3orv3d7HK2c8PU/3b0DWWOUQuZSdMzxs6E84+2283GBGXJY3uKAbkasEzWCCLYqQB8TcC8ei7mMlNPuHPj1QhyqmgsAz+6Qgtvmzlufg4NyEVXW9w0Bo8zXjxizUZDADmb2bTomgYzY41TvWl1HzzjooTVi1m2obdYjQgzsufChwwJqptuyb1abAtl/6BGHIUEUgY+PnMeYM6tUnkt7fx5v5Qane9QwwZ2vrSscmNNpeHcb+J3Mkx/lxyKVMBpyirsROkJaKWEhYPzXMkXAaqda73n/icywMF8yGTK4YWPLSbX3xkatxUqbJ6uex3grUHYwwohFGPPAMlhTm0hpS4K8u0tfvKgPoarizMenlM8uvD6TgvrGHLzHkKLmJMLJCimu9/VZtK4j4Gw= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 93ff1744-2903-49eb-3b8f-08d425d20684 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2466; X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2466;3:qLmdrXjl265CS+CMZPBhlRbu/Nq3VTxpr/IKLOZMFZi7ThJpanHAasgDHvSzpca91lw0wxW48b7QrT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n4CfRcsP1eoXImQg6Qfzo1thQcHZZmm/JcoH7GgzcrHvqpO65A== X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2466;31:IhM6Pyk8PjWvg+PyVgDnutTQYaK2XCZzPB9Lbg30zohFRTcFK1Jcy4NVCbwWp4zU3bHX21+85fp2aZZKCzYuLdVjolm/CKDinQKQE/7YJniLUJ61yd1/NDbN7fjImGSd3z6ZdR3/SLnryBZqmKBPmj9EirSfi9K2WtFfjruIDD2tedU6axEse43S/8M0y24ezGo3kKjA0VuVJ5CROK9d3V/El/uQUEXaNROj0YKVaNR3HSp1N+OCexhBD626OFzMyO8y9xm9bxclY6UbOVfxQg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(35073007944872)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095060)(601004)(2401047)(13015025)(13024025)(13023025)(13017025)(5005006)(8121501046)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025);SRVR:BN6PR03MB2466;BCL:0;PCL:0;RULEID:(400006);SRVR:BN6PR03MB2466; X-Microsoft-Exchange-Diagnostics: 1;BN6PR03MB2466;4:J7lPOhW8n+GapWXa+ekz2aAC9zDzXVtKcD5L6mBCI5lfla+hXenyzsSSsJiJD2oMJJGs647HWvadx8xSiTCqyngOQrQCuz/nnu/hiqi6sIp8z76DgN+baVbW542RfuJsQjcSXg0tYbIvRcYL38gQaKMTE/XllvDO+O1sYW4a/d+H4cW37pNi5STuu+04giJPWsBJ9CVPaVVQRL1abVBN7JAmy5ENC122S2D95IfMOXWVDtv9R5cBtTEfEfwPQWVi2W0XGz7/mlJ7FhssHx+W+THATsa+JbPTRBaS9Qw39gq/AJCl/ojCHxQI1GjSLQh7nf5KCn5tPTaB9zDmIV43N8s7x17ZQR9zGcZPuujOFh7sbbJv4hpyl+bMiVUrud7WMX0+zVotxpyfK2BeTtfGPBIoXwCz2SydyzDgRAkkcZmuYRrc5KTCI3iFupSQjCNMDH/PzEXcaXL32rIKZJtThvkeXaPBhIVuBv/iI3qI/KoLpwDK/RKFMZixvctQI0pdaeDo4nkha70tip45+TaVnD7QWMBfIGLWGAiGJ32Uov1oVzfMTaY3XFsCsbebuP97NpsgvboqbbN41dcLVfVyhbdn+n7hQGGVrGxORkce8iOQGoTayKWA+k/SAbDMFr0W3yD57rhWyFkIavsPolJJRDGSD11plSpzpnqiXalHzS/CNXzGNcPE5L1wPdE/T+KzgcqTiSxDdaebTgYL/QaF0CjuWIGGRkn9qUhTfn70NUCSn1ujss65g4164+7sdsPj1mVYxbeJtOhTSz43Rb2/5w== X-Forefront-PRVS: 01583E185C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR03MB2466;23:PPDsaKgjjawONRqYatAE1/glZ25Dm15Ax/ZsOaHBm?= =?us-ascii?Q?FI6Lv/2mryewdjYI5crD33gi++omFRqo9+LiprHj9H+JKgi2t5Xbbk5lAn6h?= =?us-ascii?Q?c+kHe+ZEqMn0lqMk1gg2EuMfZvpFANR4ZxmloXQ4osLqEpI8yHAUNgdvR0Qr?= =?us-ascii?Q?jfmUQG6Uzm1vZ33GdBNqm7GyR1U5KflsxPiz7Y5DkNLisLxZHwMvOqksHu2i?= =?us-ascii?Q?RjDokk1qgZtCxeAJ1X4p0+wIEFxshHKXWvJ1/0MADRP4WHgo6jkyY04V7KjB?= =?us-ascii?Q?R767HeShoYeOjVofw36TcutV4wM1rTfeqCXkRfkQrFesiWjx2ZiHQR2tZVEJ?= =?us-ascii?Q?93tp6UhNvvcuEgr21rZAg2on3uESNAng2DdGj84SdFl/HyB48uK6RGDwzuAi?= =?us-ascii?Q?IkQ1c7jH3vJo+t2rRPJUG+o6dJQicMkIZ/j0uo4J/rP6445JNxIc4oB/H+Jy?= =?us-ascii?Q?bfYPx7wttLM3z7i96N0ckwdE9xG0IW2FVUovlyqSsKTnKPaJ9iLb3Uftq9+7?= =?us-ascii?Q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AvN6Foofnf8JaOaFyQam5vYnmas+lIMpB7P8IRqu60/kJQFrzSvpAw1wYztCji5VIqln2dHIRMifLWVDYTB9AziOB9FDJ5ULKra4KN/DaCOiuhCssw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 16:38:54.7055 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2466 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4535 Lines: 98 This patch series adds the driver for the DPIO object which is a step to addressing the final item in the staging TODO list-- adding a functional driver on top of the bus driver. The DPIO driver is a dependency for other functional drivers such as Ethernet. An overview of the DPIO object and driver components are in patch 1. Patches 2-6 are internal components of the DPIO driver-- bit twiddling of hardware registers, DPAA2 data structures, and the queuing APIs exposed to other drivers. Patch 7 adds the fsl-mc driver for the DPIO object. It provides the probe/remove functions, demonstrating a working example of how fsl-mc drivers initialize, interact with the management complex hardware, map their mappable MMIO regions, initialize interrupts, register an ISR, etc. All other DPAA2 drivers will follow a similar initialization pattern. version 5 changes -fixed typo in patch 5 that caused compile issue version 4 changes -removed the patch moving the bus driver out of staging, updated all paths referenced in dpio (e.g. includes) to be drivers/staging -defined macros for constants where needed -copyright updates -cleanup: fixed whitespace, alignment issues, typos, removed unneeded comments -fixed bug in SDQCR #define -adding missing free in an error path version 3 changes -zero memory allocated for a dpio store -replace hardcoded dequeue token with a #define and look for that token when checking for a new result version 2 changes (mostly feedback from Ioana Radulescu) -removed unused structs and defines in dpio command definitions -added setter/getter for the FD ctrl field -corrected comment for SG format_offset field description -added support for short length field in FD -fix bug in buffer release command, by setting bpid field -handle error (NULL) return value from qbman_swp_mc_complete() -fix bug in sending management commands where the verb was properly initialized -use service_select_by_cpu() for re-arming DPIO interrupts -replace use of NR_CPUS with num_possible_cpus() -handle error case where number of DPIOs exceeds number of possible CPUs -error message cleanup -updated MAINTAINERS file with proper location for both fsl-mc bus driver and dpio driver Ioana Radulescu (1): bus: fsl-mc: dpio: add APIs for DPIO objects Roy Pledge (6): bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs bus: fsl-mc: dpio: add global dpaa2 definitions bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2 bus: fsl-mc: dpio: add the DPAA2 DPIO service interface bus: fsl-mc: dpio: add the DPAA2 DPIO object driver bus: fsl-mc: dpio: add maintainer for DPIO Stuart Yoder (1): bus: fsl-mc: dpio: add DPIO driver overview document MAINTAINERS | 6 + drivers/staging/fsl-mc/bus/Kconfig | 10 + drivers/staging/fsl-mc/bus/Makefile | 3 + drivers/staging/fsl-mc/bus/dpio/Makefile | 9 + drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h | 76 ++ drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 296 +++++++ drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 +++ drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 616 ++++++++++++++ drivers/staging/fsl-mc/bus/dpio/dpio.c | 224 +++++ drivers/staging/fsl-mc/bus/dpio/dpio.h | 109 +++ drivers/staging/fsl-mc/bus/dpio/qbman-portal.c | 1033 +++++++++++++++++++++++ drivers/staging/fsl-mc/bus/dpio/qbman-portal.h | 469 ++++++++++ drivers/staging/fsl-mc/include/dpaa2-fd.h | 448 ++++++++++ drivers/staging/fsl-mc/include/dpaa2-global.h | 202 +++++ drivers/staging/fsl-mc/include/dpaa2-io.h | 139 +++ 15 files changed, 3775 insertions(+) create mode 100644 drivers/staging/fsl-mc/bus/dpio/Makefile create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-service.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio.h create mode 100644 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c create mode 100644 drivers/staging/fsl-mc/bus/dpio/qbman-portal.h create mode 100644 drivers/staging/fsl-mc/include/dpaa2-fd.h create mode 100644 drivers/staging/fsl-mc/include/dpaa2-global.h create mode 100644 drivers/staging/fsl-mc/include/dpaa2-io.h -- 1.9.0