Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754487AbdCMTCi (ORCPT ); Mon, 13 Mar 2017 15:02:38 -0400 Received: from mail-by2nam03on0060.outbound.protection.outlook.com ([104.47.42.60]:48803 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751740AbdCMTCQ (ORCPT ); Mon, 13 Mar 2017 15:02:16 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Roy Pledge To: , , , , , CC: , , , , , , Roy Pledge Subject: [RESEND PATCH v6 0/8] staging: fsl-mc: add dpio driver Date: Mon, 13 Mar 2017 15:01:56 -0400 Message-ID: <20170313190204.28190-1-roy.pledge@nxp.com> X-Mailer: git-send-email 2.9.3 Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131339053336256202;(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)(39840400002)(39410400002)(39450400003)(39850400002)(39860400002)(39380400002)(39400400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(105606002)(106466001)(8676002)(43066003)(6666003)(5660300001)(104016004)(4326008)(81166006)(8936002)(50226002)(38730400002)(2906002)(8656002)(54906002)(53936002)(39060400002)(50986999)(77096006)(36756003)(189998001)(1076002)(47776003)(356003)(31430400001)(85426001)(7416002)(2201001)(86362001)(3450700001)(305945005)(33646002)(5003940100001)(48376002)(50466002)(2101003)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0301MB1960;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD030;1:IvjQjgBr+pNydPjiiSaHQlYJTASx3galWxHWNkOgP08GsUwjNPiT90pnoTezqTeYvR4sFpsDSxLX/jsq3BbIUQCpNlsHwTgPRWDwrefkDAWgiA2+KeLytwT64LhFBsNTMb+Dzsc1w2MHjmKzTpNNVZlctbfQJWprbKiZkogyqsFyvLD4lRWsevr+NGMIbemVivOTCMDIS00nSwFcakr1xs+CK8w4/DFrR25g72FWlHQk9DpYVH1MRlKVoiGAc6xrhaVQ5YYn8DGle698aMP4AvjQU/0OYQ2bU547ar5Bqg1uUBlRLQ3kkUv1FECux1IIzAYag9KaB9m3+JZ35ItkvGfGsl88XyL06/uEvXS0ba9UQx3ziCZVrhLNITvZfgBiXFPYWXwRj0Qb9wO8HzesYNOAySUWLSMo0HqdLCBf/+bkjB+PRepToT9zw1WtA6QhV6Ge0xU6JpNMLW8fgCe2HcwwNYHjmUZc5P3jvBKN1vLGfVVW9W4m07LUbQIN6FWD3DxuaJ5aooIaYxPdVKwD6K1uJpNNzkqtjAQB6T7k+Gs0XDzFDZcF45+sU8AbpS1jsbBOR02S/jRd434N3PklSn7KX1Y/Z/Hf8lLAtU90nccauR5i6b3GyAzRLfV8QJpZAbmg8tieg5FltHCN75NiFR4b+4DgkUYoMZpm3g/HzqaYiCFLuzvrQoZF7kry93JCmtagedPJxsfLmjCsL9Dcww== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 970eb291-b035-4d01-f261-08d46a43759f X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BY2PR0301MB1960; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB1960;3:yF5pBO1BjhjNDVFFoz6RrTlb0DhETfPkZsVo1aFqJlBLC6FawvJ8j+DDP/ThzkFIGvEzGVc0kGM1AJZSGDniAV5YwvPODDompSPUwf6OEHYja00h2OuuEdCSab9ZABgaYwndTcdD7QNt4TvjNGztViMUYP6dXCeMdsYi3/N40LxOSmBLIcSF2P7EwVbKe/Dis6IY3epM1Tf1F9hhUqS4iztHhr4zdWNDZ4fAVFQYbnTglKTCb+ccn+O+H4cdXB6QXrzvlXZb9KbjzyFBD4pk+fXTHZHmsY0mZsnOObyfvTfkBoCydzdgnTodJ02tk71bgmV+d+pA80H//lkdSA8JCCQhbkw3ASZVKq58JhpIFobunyQ0nI8iALo4dnwjbRLR;25:EkO7cOwM/5g15hM0PyiKWDWokw55Hc38OXUMQJiWKkzJ9WXR6gt12a9N2SbOU+LukcF8XsvRztt0BUNWTK0WNWqyERNSHFMISd2MfBEZ8rZLz7gJlO0RNoonos0Ces4unaYwuKjWXaa91CyBihLb2Yj4r2Y6Pt+mcmtPxrMpvjszFvAYxvnZt5+mYXhiX4vido0OV58V97vtOe8PbPQSvGzyx3YRsiLlyw1C94gCFBYDYeZhPwlK1ZNkuGmFcvlIbhCsEGCsE1WC+YqALHrOrxVE3ir8xOFYfdV1huQUetZNXT3H25Ak5IEDWi+ZxJBKiREtGzGH+JHCp7ItO5yBqOBOPQHwV8TITW6RfqQh2sNbyyDA5hHVT7h+yaPGgstOmApETZJHZprIkzquYI2gN3bUC5LP6iJEE+yVmHNoh5bqtky/Ag2AehrtsvUP2qAjCOM/P11/YXTgkxaX2t+p5g== X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB1960;31:WXL8EqjMFk2dUloFnrZT1CZD6Echf2l7YO4I2Gr3vp0OYKOnNISBW1KhQor+zLeZBiJ9MaZ+dhYR/abpRB9QvcJBQe0H7w/x9GrlyIxdwISFR89gWEyMrGqXuPeuG8EN3g0NW8C9ybfunXNI5/yXTIky6WS/+uyxi3Hw85aZYJL770hjCraGQbytYTTZn/Xv9Jun1TkLi/sEbSLLxmuALAzVAsgpC2dDQBbe4AwycLKm4qSQsMugoJqE5wmpJuvBfxUcBq2/pWtNbURRmgGGWg== 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)(13017025)(5005006)(8121501046)(13018025)(13023025)(13024025)(10201501046)(3002001)(6055026)(6096035)(20161123563025)(20161123556025)(20161123565025)(20161123559025)(20161123561025);SRVR:BY2PR0301MB1960;BCL:0;PCL:0;RULEID:(400006);SRVR:BY2PR0301MB1960; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB1960;4:PIxbq/uGniMg1j5IHQgTXh4UbL/WeOHGFTLAh4YCHreWypUX0L4jR/o6W0gpu9dqYdk7fMArISwFF1Y08toTe9ERrXy9Nms4iciPKAjpv+9KPAVCZTYILX5CptiBB3x6jAhzZ4750GB7+Pucv5xghakc29mEoQHLp9f4hLzGTFdvlDi1+oOJDH60bv8Q/P2ji+1HxwT2KdBju4Oc1BGituGiC5t0/k4/w133nXyrvcWUx2E+zOmqnhrEfdUIrvnOsJ4Ve9T6GEUC1YgawneLR6Q11PMrbUndUJcGpwbeQhdHVSi6N0HwslWrLdLw4OyvahQMk/3MonwBChu3JCAH8Rqm3rThGE8D/4h9iyfuQBACZe0j/mPvJYtNQ1JXl0WEUAUCyrgDlpkqNIlRFQZC1koKu70O1iF4UcQOGub+P9aRSqQMPfL1H/k12LNgXgiery3I5hqOIhSg43zgjitXNYiEA9TiPXjfAMfLM2PDmikK/ZssLwlxSuNr28q/IoHlC7hTH7ELQBmcsMDgQWcRQ0DyP6QXsKSabDNrQhmwgnlRVXQR8PAyiPpsFh5bHbWibWMtbZ/NCmhZcvg0so3mIOL4lSrmnnyPK0lKuYKrk7/YPju1xNXTHmRK1uXY+iczaiv0QxwIXWXkLbN7idmaVRZ9lwpZmwW1lSXinF32W0DpW5CYqmxIC951jpEaT85km3E7oJtJ2paav0IBn1DXP8JVrRiEXwQbk+M0zJi/8UFsCQtPEhx3kAOxUAGwe540qf9kTW6miPYsBdJCWyWHtQ== X-Forefront-PRVS: 0245702D7B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR0301MB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J50FMlL0iashZzeWAzeCpNQQj9b82PCAkUuu+eiGt4svI5ccTlEFcTNOGRdWGHw9RvuTQ8DtZcWTNDBYkdRy+/1Su68FHsAvIRQH3Er9d+vA9O+JjxFHsMjTQWVuedObNA+O;24:V4d05s6xqafExMbJTEDOybh20qDL81DP33A4oYblwoRClCygWx0kDef3Z9BqOJYDRE7k2fKgWkI7OOLXQDHhkt47FUea+M3q/pjnKaFnhyI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB1960;7:LrEHqF2xSvGei93fprwYUMLLiZP37uxE2tpaxHDX2xDlIpv5VbjynJSa6y4lsidOFy/3Lcl2aV/ZbBxG8WX93un58jtYSmSjaytDUZwH+W4GFrW3P715w6yghL/P1vP3hb/sotwS/b9W9YfEpHTOg9FxHzFcExdeZ8Qx/Xydbu29Zk+E1icRWnpFHoA20YrYGwNv9hVcoECu2n04fmiGdwX2jIE+KoM/o0L7orhFt9OG7zDRYyxRAE1uX9jGBsQB2sFrShlsAzoMrjZq0y5NZPhMmglKGY/zEUVCDKrvBmE7WiyTGTmNLwxlW9OQtnF89N5+Mt1GpZ8ShOmYUainmQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 19:02:12.4712 (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: BY2PR0301MB1960 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4693 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 -- 2.9.3