Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938678AbcLPAU5 (ORCPT ); Thu, 15 Dec 2016 19:20:57 -0500 Received: from mail-sn1nam01on0080.outbound.protection.outlook.com ([104.47.32.80]:49888 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938393AbcLPAT6 (ORCPT ); Thu, 15 Dec 2016 19:19:58 -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:774;Count:8 From: Stuart Yoder To: CC: , , , , , , , , , , Stuart Yoder Subject: [PATCH v4 0/8] staging: fsl-mc: add dpio driver Date: Thu, 15 Dec 2016 17:56:18 -0600 Message-ID: <1481846186-7783-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: 131263202542913131;(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)(39410400002)(39380400002)(39850400002)(39860400002)(39450400003)(39400400002)(39840400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(8936002)(47776003)(4326007)(8676002)(110136003)(50226002)(81156014)(81166006)(104016004)(2906002)(31430400001)(48376002)(5660300001)(50466002)(68736007)(626004)(86362001)(7416002)(6916009)(8666005)(97736004)(85426001)(33646002)(5003940100001)(38730400001)(2351001)(305945005)(77096006)(189998001)(50986999)(106466001)(92566002)(36756003)(105606002)(356003)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2473;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC007;1:tWbScr5ff24Mg1dpdW+h3No23SQhdanubB0g3HZr3oFRE6wDiHug7DyrTtyX1xNFY5fSCJRsMmkMpQGrpppJH4mOYDVhlt6jZQ18tfzope8O1HwpOR1T7R6JVnVdzo35S5lP5y5t41HQBPU5qRZCoOGG2sdFNSqY5LfBvh3Jwug/q4B3YjU21oICLug8OvwbyL+Y6dB0ZTc0vZDsGELC+efj5Z7/8XifKbYVHbCOm3QJHrBRTF4QuFgzIhRlAXhaoujM2aGKbGE9mKdrgT5kXQ4vttkDh4PFnpI8i+00BLMIJlaKCZGqpvSKdCsx6Uxugm9MMLkgkNitL0StET+MNGtMjYktOrZQ+hlagEpSfT2zrpBMN8FYxhJ6qLlmcN6YuFEacvnPQOf8jT6aXieG+uvtwZ3GJimx+uZHwCG5joOxJYKkfrqmUkqW5P0Hd710UZ6kfQ4gF3uQz0UAykVf/kwWGbC/bDpzxk5bUuFrm5WGRQBWG9uT6TOgYu90SEcOz5pzTVWRnzUBwHPEQY0zsatVBtFhBHoy4LWtrt+xV3+m6IHdL3ZlxUGoj+oxsVu6owJf5v+OFX6TuPRi88AebK1sjIDRl6Tur16Q4mgVvR9GXbjjs1ctOLbA7+UpID3NiB3WSTxOX4sl11pKToOuq1076a8fPLL1i5HA9hArjIVlfLGbQdGFvtPnTrbxq6vp9CGQA6ZIVwv5TtVp8zl7bEQb4D1IvMJ2dz7DsD9iJ5c= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7e2b9b3b-8cd4-4dc8-866b-08d42547121d X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2473; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2473;3:MIZF1JYynWJHjN6DeKbS7h0UNvTA051sAFp4LOA2l4DRTfwEB7dPzkRhdTWckou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YUOEYMkTbd4SIZc0dE094EwAD9Dm9N16q08rfdOnW9lUi9HSYdH82cnCVeauRakxhnLlBiX8+91W+T97+Ng1A== X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2473;31:W19P1T5lOWGDTtufYay93t1H+sLKbaWGq53Bs7PNAO5Q8PDHxtqkFpSyjmj+Ewl1AhqnUkDpnuDyWTlwrr8m3+ci6+dZjBfSZaFDO1fJNUtxfYcA6IC3tYY0PfXIJzfyLkZUqFFhyYgx3shxcBHEDacNcPUePP/2/AVvJKqAHv2WqHlN7X3xGwnTeCqhvdYYc9rahAQHOs0tGT/w+MfrR2raf9woo0NiwqoB8N3aNgp9lR5xtUjCATyimEkppU2SklrhHNLq0ib69Ii1CVwWfuUOVLuWrO0SWOUh/517t8E= 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)(5005006)(8121501046)(13015025)(13017025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123561025)(20161123559025)(20161123565025)(20161123556025);SRVR:DM5PR03MB2473;BCL:0;PCL:0;RULEID:(400006);SRVR:DM5PR03MB2473; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2473;4:wdDVh4JrZJPdD+Am3eXUrWpYYb/QoyvApIXNn1YOE3gKlHR4iq5HIjB9SGL2H6/b8n0ijOxU1JnAO2FXlJeh55DtLw/SvJsHFLf/lGxE9eI6XEbPFahTATJW6XXstnYHdL45jk0TSt2V/VSSl/yvXCTAqJtp4OIlDcRaSiOTeSfhnR5nuVdrGPW/mlftWcOMZFfitYMNGSMONuoRQQaquN4NaU6vqukbDiw19fAz+oJqKExX7chZC8xY/1ST8UtCfEQWCQb5bQylTFzEVxC/6Mn6yhNbDDC4b3anZYyg6wcFxkQAFrvHSoQBCEg4F/dfEsNYcXcC84YDvrLBWLJVI5OVR7FsLujDZCCtNxMUyNQPDGPRjiXAOsgfqr9bwgcPbiRHAMAFBU3G0mTQhruoV++JaMlgN42JEnhFD0k5jvEoMYBXdhBreTuDQnquEA7LrtpCHB5klozMANHRLPdzUW7DI6g/ZbDz8D1D9/zYm/gekkOI4auuyl3vhonig0kC9W66iu970n8OeaOX3ArWap44fmBEQd/Oxkr65kb3COt3oJoBS5ehy4Bx/rxoh9klYOfp8kinWofQX5vvdBp2y2KnMaWVkTbA2M7VoZSBmjbe7rzbDanOk0B3KEWBjUKyfmcwgxQRvILdbeEL7eGQKDk7nJ4pDRyOMzR4bQQRq4yWYs4osBmYMJBy5ORoKBj8x654F/OkHyp3yZYePBKstMIn/MfCETpEhVwt2wPpwFVBQZVUu0+qwb1NNckTyd9neNb2NaazDwOmHEIXAjOHlA== X-Forefront-PRVS: 01583E185C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2473;23:Uu81LFlMqwtuRLqdXpFZz1Lscf3yPbStsf66aOjd5?= =?us-ascii?Q?SqxAyVRA4G4l6zZxHUwtA9AodCIR4DfIMwfQWsIJatdk5LJWkKlKJT5q6hrs?= =?us-ascii?Q?B2KADhAlvdz3bN/wpx3a5Hu6Fdorh0T+1B9RMUI6Pr+Z+0575W2YE4kkcFeR?= =?us-ascii?Q?ChVTDeXrOP3ix9eVsvGrZXTgLJE6cxI5hKjZ8IyFXhZPv2fgjcVdRitELHgW?= =?us-ascii?Q?PH5hjObwQfMIzownjWMTDByYf5+SRpafUqnIU6dga0WQ5GLpAAf/WMmKROki?= =?us-ascii?Q?utgnfgObh3EsJl95v5UlmFRyjKkkOhuHkbWEnnQC5+yg12Fp1Fni7jTchpOh?= =?us-ascii?Q?oPkkNQjjhE2WCVdYJg5fT51/wqWXtjUptDFLEPVKxc5HG6kfqIz3WbRxKOYs?= =?us-ascii?Q?gfAoDkI5njOWJW3/pTlEx9WHqZb4ANIvZbDiwMQybT1eFP51nzdNZ0trbE3O?= =?us-ascii?Q?qPOELX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BRRDnstRoO4nsnij+ZRwU2pc1Lr0us4ttvIN1fehHzisRf0aBIx/tI0RRpeVA8M1kRVLo1+6k55fFK4BHQVCslpTzEw4S8/ZNZNUbqDYMg5rJShdCClbsWi8zhXVYWYZAPgrpDvTz+DX8y8nBT3+GUwBnAE4fkQtbfvSk3Usq0sTA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2016 00:04:14.1197 (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: DM5PR03MB2473 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4464 Lines: 95 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 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