Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754627AbdCHV4h (ORCPT ); Wed, 8 Mar 2017 16:56:37 -0500 Received: from mail-bl2nam02on0076.outbound.protection.outlook.com ([104.47.38.76]:30456 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753773AbdCHV4D (ORCPT ); Wed, 8 Mar 2017 16:56:03 -0500 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: , , , , , , , , , , , Stuart Yoder Subject: [v6 1/8] bus: fsl-mc: dpio: add DPIO driver overview document Date: Wed, 8 Mar 2017 16:54:43 -0500 Message-ID: <1489010090-18025-2-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1489010090-18025-1-git-send-email-roy.pledge@nxp.com> References: <1489010090-18025-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131334837041073802;(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)(39410400002)(39400400002)(39850400002)(39860400002)(39380400002)(39840400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(81166006)(54906002)(2906002)(38730400002)(8656002)(31430400001)(39060400002)(4326008)(3450700001)(104016004)(5660300001)(110136004)(7416002)(97736004)(5003940100001)(33646002)(189998001)(50466002)(48376002)(47776003)(53936002)(8676002)(105606002)(36756003)(85426001)(356003)(2950100002)(6666003)(305945005)(6916009)(43066003)(106466001)(4720700003)(77096006)(76176999)(2351001)(50226002)(8936002)(50986999)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR03MB2954;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD008;1:FLJ+qhUx9jlV7IBJrSveVeg6OvSHqdYuu/JRLsZ8IcOjItoEfw2RPV6Dc0YzM767O6pLb4VTgZK8sgY6UDkEOxBXSHpKZhLfKSmDyPJwtbzIN0lq8OwxOy4uohfP5lqvXJ5ndu4X9VIEZuLCdo71+zgW+L6ssvDZeavVxpJGcERKHATBruH1OR01AL/pzU2k3+07i/nRIcsy6lamswf9bZtxZfLkmD6KOkpfR9ZJlvJd+yXZRbseoW/KczFmVKLukw2C4rLj0sdkugH6Ql054zih/B4kYRffJ7vFX/MoyjcN7DIfPORIkjCa2or6GmtRcmTdm+j8SulWO6jfZ2RJBgByR2z804ttlhhJqd9Ivx+gqhU26oKyG2wMxagIiyXlxTwiLy5nwVBqdDkDNT9tP65g4CsagoenT0B+YmjfLXIEsm0vfEErvy+zm2uH1tHeRNpRTEbURzf2iXatlIZHVv9K2Uz2hwF1p9fqGxbARsNKgtoptND48rvYE402OWU7Y0NutmCwhhW02+iFiDcEKKl2/u4qrGcOeca/sCxxNRpW/xzUAzLNFlMGh7HVVaFdvbQt8FW3kLG9XK/kwnqvXgae3AaMvXrWCqUyDDSK8n7dX/gKkilMfBmu0I6ApmvaLTvHGJmRyTAZecMPxS5bRuxQfa0Kz+XVYjvxyBVVr3kM+6GzNdX4YHuq5OmX56/hiBEmHrHo0NCMIpRwUB9BjQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: fd4b8906-8a2f-4125-2d2a-08d4666dc6ec X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR03MB2954; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2954;3:rjsttOvn215odbLDsHuJj23jKiiCnXiJjw8iKlHyAJvMPc35sGTKImu++u/9nD/3wV83GTgMzf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Q4y27I5WHa4qN5mupsIy+gAt0vdDrrk+IaqoS2jHn9Qg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095060)(601004)(2401047)(8121501046)(5005006)(13017025)(13015025)(13024025)(13018025)(13023025)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123563025)(20161123561025)(20161123565025)(20161123559025);SRVR:DM5PR03MB2954;BCL:0;PCL:0;RULEID:(400006);SRVR:DM5PR03MB2954; X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2954;4:LfDgA50Z8fkDNHqhHlfLdJwAiuqCkQK3BK7k0chOXoRhyHoDWYGKiJGQA2Ro9PmpkASnlEuN62dWZb3SuqNUCGii8InKMcnW8bklUL6eqpLrEOtsP1u7MfzcFU0ojhLjg6JvzZEIHGNFu5jy3NZFID/EzkP0x7ioTTicC2zIHSIJn81X2IER/zr2fJ3ayAUAzyMB3MvXlLiQhO1AauFDltL9U2NPzcAY6c1nCREMiHWZTgV0Lga8xfiZYoXkRvYwRxTpGKq6atQ2whta+wwIgyiSvmtkhkSiOv9omXdY+EiL2/5AZraOkFp+vAdGfjwhdA5SSf4bM/hCpcJjZo8oAcsSIcr6j5GW3bFeN6pPym5PVbs64x4d9Swj66hWB7sxu34xJO79on4v+QYmMTnkjyOp+/j+H0OXxMU5VyzGQdIX6EEBHU6+2nFuJZ7KztcAWHnNtkOcSujFg/fh74aGrgObyh748Jg1Z6DG+4lJ5bvg49G7sZhpFFVx6uPjfC7OaxSnbiEdAthbTgciibBJxxbcF54f3p2U08IMgegWeQUQpEcPykLzoMEscoKq8t5G7keMk3pzgF8lbOb1KtkadcK8Rpz+wqvmmtSbWITuvLjXj7urFs/bINLDMr/sZ4G5JUiynLt8rqoPTg1li/cdhp8ZGJCRAZ7ecFQR9lrJ4rnPxg+Zx/tUVlFKNE8f5XhKT0c+SZ9BrNFeZDOLSL6fywDKu+EwDvW4A/2UXMGd/dYavrjL6xqg8OewQxTaTPkYrZNeIdusfYnRghGmweQ9pWDWVwn8NUe/R8x8bObrZ/0AlA+gd3fRIGE7vx9h9ZZB X-Forefront-PRVS: 02408926C4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR03MB2954;23:cnprghron1HyMNy02hUHuw/ys/CwxWK7gAiCNrxv+?= =?us-ascii?Q?CiHDUu13WRGp6u+xwWqh2643amSYVWMgWheI9biL0gqxQ0z9u1PKWbqnIgd9?= =?us-ascii?Q?O9E689hg93WTt9/X1U/KMcr9BJvp11qt0JPgRdclM1pWJeFQ14zE2Chq7DBH?= =?us-ascii?Q?0Maq7xOJOCsQMAEKMcGm+7+7HgR9PwrOmA5WeVYb859JqOUeQXyElTbOy+Cd?= =?us-ascii?Q?nWGRe3YSqK1O6ieTFmudQF8p90K0oPvwN6aWNaeXE1jb2m8ig6Jfyf6DPLQ0?= =?us-ascii?Q?B2hVbXKKJ8Yq4D30jC/RE1lM2SFrO2TTWmubeyarsyIdVMygmIZ6CWhAVMIR?= =?us-ascii?Q?igjdmr4AMbRAqXOemMsr0/PjXqNUxl7qEIq2tzL4s6akl2UZzCfINGORHekG?= =?us-ascii?Q?6+gsFu1QQp1krulAjMHggFT38hiufDhhoDmnP5wBxhfR9c59G1/OvBY6kefn?= =?us-ascii?Q?cBvbkJq0qVk/zzQBIWL3WDF++8wuDYNssMi4hrkXDmqR7AWyG/ClNraW8r/Y?= =?us-ascii?Q?bq/aiib22RQ0f0V4MPJB3LM8o18UgGEIC5kWC+0Gd4l2OxeGnMkHeMxRJ8hq?= =?us-ascii?Q?dZQjiNFFGYVr/h+rxZ76S6Z54JT2ug9Xl/DSDy6mT+CWSwVd7qPJ6gvi7fmx?= =?us-ascii?Q?vaZ3iY08zV6HheVvIo33WRjyWX6eWxGkc9NSKR4MIuuSI1PZf+qIYLy7qURk?= =?us-ascii?Q?oVIHJiRC7wLBnQL3T6+SgAH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djnBk7UQ6YjMCWuowKGm71j+w+5dypnaNBa9uCxyiPs2wEzPGaD1d8jder16e/uS23byL0N/AWMCvxucKirUEp/v6AXubLKJM6yvBCDDKK06TXNqIHQIYYZziZkfQHp+A/1WXHSffDrVJnZgpoe2ZyPzOZCFPyuYcvXDQLkz1A4SqbqRo5gJFDDM7A78Xe/dStptabRpQPvOc=;5:qWuU8CSzg284ZwXdETkYAZ5aCcmIn7I7D1u68KZ20g9Qwx0kxKKwPyt57X1u6GCNt4U+l517joKOrvP0LU5yGnOHfIw6Xxy0gxms3e4V14JPT/14eSWHCUMdlQYTS4WAHyGK7a8yhMxTzZW27Q+6ut7CLLnuUQqaEHBlvnE8NryY7JcUoQqstLzwqpNJk2U6;24:v1/A5tBx5qMZhI5FoRQSUyqyt7a1rk3DUSIhXfOvCA9AFwNFL7uJie0UPgvRyHY6iyAI94Bk2u0j4trKCF6tC3fk/jbkJCLTqpcX5IqovIE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR03MB2954;7:8Er8IkrGGv/lc/fe5cKZjpJI1C5LFGyD/XGHurTwFaGPK2duS8Fpkq0j4Hg0MdSwI8rbPzKHS87W39Ff5AjENwtedLOQlDWFkvyxQyCGTAsrsnC5REpSlqwV+ApRYpBBdyV9WYRu2Xu3pscs1L9/N+lVikydhpu08R6AksZFt/oxmE9muanfpQPGDQmr8wb0LcxXarxK6J07cs1PYlZWTRuIZO/QlV8G4rqyU5fizfF54F/JFQWRkGahBh3X9hr8ZRwBGm9xiiNw5UVMOvK6EsecEk2KUeW0YMdHMN694YxAEGlyTXyJ7ixy19cZR0/ket5uGxu7K/1SOO4QgISpMw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2017 21:55:03.8733 (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: DM5PR03MB2954 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6357 Lines: 154 From: Stuart Yoder add document describing the dpio driver and it's role, components and major interfaces Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt | 135 +++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt new file mode 100644 index 0000000..0ba6771 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt @@ -0,0 +1,135 @@ +Copyright 2016 NXP + +Introduction +------------ + +A DPAA2 DPIO (Data Path I/O) is a hardware object that provides +interfaces to enqueue and dequeue frames to/from network interfaces +and other accelerators. A DPIO also provides hardware buffer +pool management for network interfaces. + +This document provides an overview the Linux DPIO driver, its +subcomponents, and its APIs. + +See Documentation/dpaa2/overview.txt for a general overview of DPAA2 +and the general DPAA2 driver architecture in Linux. + +Driver Overview +--------------- + +The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and +provides services that: + A) allow other drivers, such as the Ethernet driver, to enqueue and dequeue + frames for their respective objects + B) allow drivers to register callbacks for data availability notifications + when data becomes available on a queue or channel + C) allow drivers to manage hardware buffer pools + +The Linux DPIO driver consists of 3 primary components-- + DPIO object driver-- fsl-mc driver that manages the DPIO object + DPIO service-- provides APIs to other Linux drivers for services + QBman portal interface-- sends portal commands, gets responses + + fsl-mc other + bus drivers + | | + +---+----+ +------+-----+ + |DPIO obj| |DPIO service| + | driver |---| (DPIO) | + +--------+ +------+-----+ + | + +------+-----+ + | QBman | + | portal i/f | + +------------+ + | + hardware + +The diagram below shows how the DPIO driver components fit with the other +DPAA2 Linux driver components: + +------------+ + | OS Network | + | Stack | + +------------+ +------------+ + | Allocator |. . . . . . . | Ethernet | + |(DPMCP,DPBP)| | (DPNI) | + +-.----------+ +---+---+----+ + . . ^ | + . . | | dequeue> + +-------------+ . | | + | DPRC driver | . +--------+ +------------+ + | (DPRC) | . . |DPIO obj| |DPIO service| + +----------+--+ | driver |-| (DPIO) | + | +--------+ +------+-----+ + | +------|-----+ + | | QBman | + +----+--------------+ | portal i/f | + | MC-bus driver | +------------+ + | | | + | /soc/fsl-mc | | + +-------------------+ | + | + =========================================|=========|======================== + +-+--DPIO---|-----------+ + | | | + | QBman Portal | + +-----------------------+ + + ============================================================================ + + +DPIO Object Driver (dpio-driver.c) +---------------------------------- + + The dpio-driver component registers with the fsl-mc bus to handle objects of + type "dpio". The implementation of probe() handles basic initialization + of the DPIO including mapping of the DPIO regions (the QBman SW portal) + and initializing interrupts and registering irq handlers. The dpio-driver + registers the probed DPIO with dpio-service. + +DPIO service (dpio-service.c, dpaa2-io.h) +------------------------------------------ + + The dpio service component provides queuing, notification, and buffers + management services to DPAA2 drivers, such as the Ethernet driver. A system + will typically allocate 1 DPIO object per CPU to allow queuing operations + to happen simultaneously across all CPUs. + + Notification handling + dpaa2_io_service_register() + dpaa2_io_service_deregister() + dpaa2_io_service_rearm() + + Queuing + dpaa2_io_service_pull_fq() + dpaa2_io_service_pull_channel() + dpaa2_io_service_enqueue_fq() + dpaa2_io_service_enqueue_qd() + dpaa2_io_store_create() + dpaa2_io_store_destroy() + dpaa2_io_store_next() + + Buffer pool management + dpaa2_io_service_release() + dpaa2_io_service_acquire() + +QBman portal interface (qbman-portal.c) +--------------------------------------- + + The qbman-portal component provides APIs to do the low level hardware + bit twiddling for operations such as: + -initializing Qman software portals + -building and sending portal commands + -portal interrupt configuration and processing + + The qbman-portal APIs are not public to other drivers, and are + only used by dpio-service. + +Other (dpaa2-fd.h, dpaa2-global.h) +---------------------------------- + + Frame descriptor and scatter-gather definitions and the APIs used to + manipulate them are defined in dpaa2-fd.h. + + Dequeue result struct and parsing APIs are defined in dpaa2-global.h. -- 1.7.9.5