Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754682AbdCHV4s (ORCPT ); Wed, 8 Mar 2017 16:56:48 -0500 Received: from mail-dm3nam03on0069.outbound.protection.outlook.com ([104.47.41.69]:56215 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751906AbdCHV4D (ORCPT ); Wed, 8 Mar 2017 16:56:03 -0500 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=fail action=none header.from=nxp.com; From: Roy Pledge To: CC: , , , , , , , , , , Subject: [v6 0/8] staging: fsl-mc: add dpio driver Date: Wed, 8 Mar 2017 16:54:42 -0500 Message-ID: <1489010090-18025-1-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 1.7.9.5 Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131334837014067372;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.158.2;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39400400002)(39410400002)(39850400002)(39840400002)(39860400002)(39380400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(86362001)(43066003)(110136004)(33646002)(53936002)(5003940100001)(50986999)(77096006)(2906002)(54906002)(48376002)(8676002)(36756003)(47776003)(189998001)(105606002)(3450700001)(39060400002)(106466001)(50466002)(8656002)(50226002)(8936002)(6666003)(4720700003)(6916009)(7416002)(81166006)(85426001)(31430400001)(97736004)(38730400002)(356003)(4326008)(2351001)(305945005)(5660300001)(104016004);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR03MB2958;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD026;1:FXZudUYkkRXKErBuCFgIJgoXDvrXF9jWtBT3bDOsdHjS2H0q+esxTcgEd3AesrXLubUnAjbRj4Zh/H4U3kNCwbekdgEvOb+zD7xUf+npEFZfGGyNN5OuNDrv5/OV8wuIrJsYNBZRTGElEZIwWCm853mJhxLoRITnv2UmF1d3uz3TSqREzSkn05gGlmiQt7Gj6z2Y5OtnV55lDA7tbJP/Gnj1s3xThDRntyXy/GtyzcURhNWCFVRwOki1Ij6XpfKG+HX6IftlATwotAekqx5jMBdGyJzbO4rriUrT9cTFloq23cz49BFB77mqnJT/risp2yMVevIitY1rWNgpyl3wG5xHq/71ODF1hkTnFeuGAKOHe5i4LgMDCweIX2W6rELPJ4xmgJCkr51CEW36f5yaECGRWxwV3VnO3IJAVxZOSesUH254faJUvMaGVdOuyZyCsPXeVI1N/qlNDTtzCO027JBHK61+/nCIwQTkyM91LnxaDYRL73Xf/zNLJM24Lxbn6yaLokCZganLXKckorqPuhbHMPNuYHxEWPySMGNiQfFWouo/6ICLU1os8q5RD5HjfRPe6k2gYfzZ0MkFCXiFfq84ecQ7QerPnmwsJpn+JrM= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: be65d5e6-2717-481d-174b-08d4666dc550 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2958; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2958;3:WkbFsrnvXsQnQkT9NIY93nPBFKKzk905zN+Uhx94HNV2XHRI6zTVo33jKgBenD561r65kbczTwAku47nQK1KSjLkQ8Ct0mbvCk7NVc36EZWYmx3Q1+G1N3EA5JJpjDmCev+8bRRetVcWSTe1gF64P5n78I8r0ynWmLXJ3531a2DSKcP3VJaJm9qBF15MnDCfdOBtRDpk6iRGUQMIFPwMbVGSVc4JrPkQeYFjPMz3mqBv9KmqLf/95h/C1mxT0gQUEOFO4l4jCIJW+mgByVFEyWY1OX00yPwPlRckyhtVGvMyUnPmBIlXigd9SmpQ6hdYWZWpBRJKz/VU+HwTbVfFahaKURysBGd+G3xIdzcn7jpDtnj4Ullqh9xvSnQ8T9WO;25:zwXSQ+UrY56SoWvHTCrjAy/Omxm0xPwoUBfkafw2CVMck2GmyhKxYdJ6qUOnOoeFKG0m71vNy4trzDS1JZVtipNtg4lsczFSHMbme7PRRJw6XDXi3bL0ftdxxRio/6qkJ/9FbRBns0Do+YXS4t/wUJmWgRZ/fG0Y4pSxjJNoVcxBYKJI3ps7egeg0BCVLPQrN4JdcCw2AZR+eV96U1xtZ15fMxbuzPezamupsG/MUAN9kuRQz/Sc/kRPOSkp6YNx6nXhI4yei2qQeEoWDAJiWm09Jm2JAUvc1+a9x0xXQ7f3KadD6oU29SstWTGpAH/h7DZO32qGMru6RbMUVPOe2ClaeS6nRX0nBamVFI2y6MDt5NOXeOOtHejznkWlUtEhTd+UsVuvzXQL1b7PFdBGSTOKm9xpDp/atYeFARQZx6rlf6UnGLnptJjF55fzxr+B/RhqCHnB5M1cuPsxAbgfpQ== X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2958;31:mCPHho0ObSPFmONTEIka7Hw/QinWkKb0LvdhqsDt182wxt+UFVHrVKurrbCM27NLdDF2+8RZey76oEaOMd8rMpa0ewoGFOxZ9+xaC9+dHkmVZ9lnG8LTxme1ykwdSFWUxIqQIdfYcMMk71xbhWbEzs7Gp1YFLKhAgd+puetyS55GIvKgW7CKhufMkqpHZBF5fn58Fdsv7StGzuCD5n39RU/skR4tyiA7zeXKKSYA+QRnEgcB78sjGsQwVsIWh5NFZ6AaQIhRCIs7JoJ4t8DPDg== 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)(8121501046)(5005006)(13015025)(13017025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123559025)(20161123556025)(20161123561025)(20161123565025);SRVR:MWHPR03MB2958;BCL:0;PCL:0;RULEID:(400006);SRVR:MWHPR03MB2958; X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2958;4:kvVN0a7iXyZn33o9fak0cSmb9zqI+fM5182KzhaGt1dRO2KWtg95EDy/WlC2b/d6FrdCriVv6QaEUdykPCtJXPCeEVYYU0Z6CUUqqSqbLKlwDOZNLWw9EUaYdPZL/gHdphl8oc2Bt1PbsmHLnsCOFeZeUckqQAsyweoyY56hdZGfWAfaLmhwGymyNIMs4o4NF7Nm1p3Yc6TxdjktnpTzKshnK0yqcAZxudF0UMpy0vk1BePo6au3kdtjlROMjN5iA3a+qRvaCZ70M9TqbL+co9XPV6KlWw5JrStZjeuc9vnfK+7mYUCFMnExIRF+KQKQYPA+vZJHS/buvohABx852t8QwLsARgNiBPaSvhisqYSyLtooKqDAuIontAkT0mOfOcEWATMHmPAukv5yExtj9yHKNIt+Xca2jRFIainq9t4aBw/WUVCj21LZKl+AlO9kU35DCvT4AkiMPgLC6vwJ+F9b87Kyq7eU4GUpra62Z+0TiSD/vNjuTHiZzYu+KFkXaFDiQzYXqS3bgtSuafSqO9wCAxWWEieWMnt6ijev2U+mOLM1nyc7gWf1t5ylyhAOXz8HIrXN98HbbyZ37g0d0ROiFiOwY3KQw+oJp4DNYS9a22gnAoVDws+J1m18cq8ApciwxIwhEt7Q9CgxLZnGUf70JpQ2WoGgeNw9ipiUXGgDHUffnErXC2dK+ku4IKLbGsqyO+quEUHbx1ngkE+9kC2EdvYstPeWSIuAXDsyZZ4UsW2dY1ETlb90oXhGVoNc64JH1CfUgbrLBoUnCVs5iA== X-Forefront-PRVS: 02408926C4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR03MB2958;23:PLB5F4kp8WAaxF4T/Pw2RODv5ya9q7hkjeCsUWopl?= =?us-ascii?Q?o2YpllAHGNS7GP5BsliLN6ylbeD8kWcQE9zAvX67cNV7HZyN+sJlOlXQ+xjF?= =?us-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RD6qB8/fY4NvPy9tWhuhaTGNlHdoUtRmJJOFqPPHN5qYaJ;24:IWU9YO+nOn17fzxkqIRHv8VPfZ6xiLZhHPauLH4gULOf+lv2L6FoWEZmBvMBqSnyx7MVHlPY770pla6hWbJbnv54lvmETQ/ojqvxfkqrqi4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR03MB2958;7:5lhZ3JfT2c7ULcP1aAC5um0NqurIa/yyq60U9zrDdejPjReceLJijsjaicCgfnqxp1/AGahuIOHxmXwCV00hX+1p8E1S7ntPtZAkH1ipsWlsZ2QLDI+/nbI9YoO00rsSAYEPQY+HzoN6frh4NkrosfpxYPfMJSmM7GjnoGUOeJo2mtWqFIu3/K3LboM0ojVBiq9BOb9mzKizOW2JZDFaifNAQXnfg62MXJcalE4l0KbrlrTfC5dFXl4kTPEDBSkvbWAI/L77Sb/FwWC9JVsj6DxyXd5doHPtM+Q7V+vdq307cum81uheRkJ3Ab0BKii3xzQLln1c0sf1S91LVcO26Q== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2017 21:55:01.1571 (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.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2958 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4695 Lines: 93 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 6 changes -fixed error in size of SG_SHORT_LEN_MASK -removed improper padding in DPIO command responses -fixed some minor checkpatch warnings 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 | 75 ++ 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 | 618 ++++++++++++++ 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, 3776 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.7.9.5