From patchwork Wed Apr 12 16:25:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ioana Ciocoi Radulescu X-Patchwork-Id: 9677801 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 154D360382 for ; Wed, 12 Apr 2017 16:27:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 041F3285F3 for ; Wed, 12 Apr 2017 16:27:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC688285FE; Wed, 12 Apr 2017 16:27:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0C91828569 for ; Wed, 12 Apr 2017 16:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dZ1dR8inOReDOCyhDIL5UZvqndwn6hfgE90A9/+jrPo=; b=IoZFUOtsgviGvE 0Qq9QJSDAcocm/c1QlYxuVupPR3stUCOvj+QWQDGKDrh/qdiSsMhP74p8ptrW/BeKR32l1JCXURwO nz9QoTaBttDzf4p7LkdN1+4CHFVPnmzvf9PQ585JjFqobIDNIth3YFcLOzvO1hoVoXP+32he3KEHL 5qehIXON7JyHXFqkh17HIiq+oVVKs3Jd1ndO6iDXoIWEFaQcNDIafrGxhjQl5oh5+aRrHELNQPq0u 9Q2BynqGVCuc7UBB/OVAvzIjbqn8a3tTlcepVO6p6CtgqvpPDZsGC03KDS/AneS5CVItQjjAZppTH i65fAnn753Fw5p2P7BgQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cyL7F-00074i-Li; Wed, 12 Apr 2017 16:27:33 +0000 Received: from mail-by2nam03on0056.outbound.protection.outlook.com ([104.47.42.56] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cyL5n-0005a9-U5 for linux-arm-kernel@lists.infradead.org; Wed, 12 Apr 2017 16:26:08 +0000 Received: from BN3PR03CA0110.namprd03.prod.outlook.com (10.174.66.28) by BN3PR0301MB1281.namprd03.prod.outlook.com (10.161.210.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Wed, 12 Apr 2017 16:25:40 +0000 Received: from BY2FFO11FD047.protection.gbl (2a01:111:f400:7c0c::146) by BN3PR03CA0110.outlook.office365.com (2603:10b6:400:4::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Wed, 12 Apr 2017 16:25:40 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD047.mail.protection.outlook.com (10.1.15.175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Wed, 12 Apr 2017 16:25:39 +0000 Received: from rhuath.am.freescale.net (rhuath.am.freescale.net [10.81.117.102]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v3CGPcff007911; Wed, 12 Apr 2017 09:25:39 -0700 From: Ioana Radulescu To: Subject: [PATCH v2 1/9] bus: fsl-mc: add DPCON object APIs Date: Wed, 12 Apr 2017 11:25:30 -0500 Message-ID: <20170412162538.25302-2-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170412162538.25302-1-ruxandra.radulescu@nxp.com> References: <20170412162538.25302-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131364879399055005; (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)(336005)(39860400002)(39840400002)(39380400002)(39410400002)(39400400002)(39450400003)(39850400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(105606002)(33646002)(2351001)(104016004)(305945005)(106466001)(50226002)(1076002)(356003)(2950100002)(6916009)(8936002)(8676002)(6666003)(81166006)(86362001)(575784001)(5003940100001)(2906002)(4326008)(38730400002)(53936002)(110136004)(5660300001)(54906002)(39060400002)(189998001)(36756003)(50986999)(48376002)(85426001)(77096006)(76176999)(47776003)(8656002)(7416002)(50466002)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0301MB1281; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD047; 1:F2oggvBRw2kfQX5HG3lMoCIX7CNgONHLC5IA8JZXcosa5aTu/Bg6O90dphZbaxB28BZB69AxLWLvo3ikYG/qe0+e2ycMKH7W6JmKtgUGRtLnSojcjnBwnLriQE0hRlEgcWT9WYMaZjqPfZYAODbGmoJO2AgEMnJruuxqgo3d/YCj0dq3Shp+256WZsNzIfsV4jTqB2eeGlWdv8Sfa/7/4iJ+Rzp+cPB4G9qLdFYEw881Mlwt0mGoK7kZQfYIpLSWfQLKrrBmSWW5ytU2vgHWSEIwKvuM/YJjQX1yWOB5TlIC5Z/l36M3JS2O1Avz8ayp9c1mYIqlPxeoL0lzrwK0nhjZj7xmGwqFMJZmV+fbfgnGWG0n4I7QI1Nb6ILi++NUqLpUPzGfcFPgMgfZE+YMDWoFxEIk0uQkjd3y8Whn2DbPq2DtcRIDTqmZWlTduJajIKqThOLky0lb9q78qvVRRzoHInWTQLjKbdJyzF78yYtz/IMSLARVyMWZuKD7G5NlMrRQC2FrwXps+CUPjsv+O8TfkeZJNozILnOzBaEEEvNbx5zfSN35gkJAAN1BHyHr2ixywO4NG/3S59idxgsXEsRcgYOOiOu5nC/hmrEPor5cox9jkBLbMiZpVI964oRNIgtjCsYl+XccPELcaHJS3Idt5qtFX9wtefHP2NX75S77j+ZQJESbdrp1lT+Z+sL4x+m1b4TpdLnpX7iZJAL6zHZrM8vf3nH+Zz5yAJPo1Zw= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 6b05e260-2575-4de4-ee9d-08d481c08f01 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030255120)(201703131430075)(201703131517081); SRVR:BN3PR0301MB1281; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1281; 3:VssiuKAW9OhAL+l9LsDlEuir2qyZmQlTd1GNU3TLrvsXM7g41LrlC02UO8hKtS4LwN6ARMV1mcJv86eO4AYetT9kVY6A8JRSmehrprGuSsK9sEkZQz4Iewa7dkD5XWEL2FaUEKXmICQOi1SmJKGX+IREh5HEDS3zLC08hDAKkGobzxKdrHAnjJz2TM95aRajJTQjadN6Q/CO+Bqrx0daSWSEyrrBJLM0KdspC8/cwjUBaN6i8m0lFVLT4whSabEEg7n6qUqqTskI70Ir2XMvP4Ivkep7DMB3du92OTVq/sX42y/TkcYF3IK9P+lRlR/eGz+llEHT/l6RDpis2xW5enc2zn6fN+218KYP1teMzTTFtXX1PlVolDzs1EZ4oE3rbEHkHHce6iSzcKo3u1+yuJdAGNueyZcQ63DkElUq4jBy6KVJKgdZw6zehOwwz4wFk0Hugz5Fj9NYg5e+1sZ2eg== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1281; 25:IUu/b5ZFcv7uPpnTBxC+zFrldSAAeB6ArloA2/F1mXPvnTQO+lXSEIfRyuxqj2PTHkSmviJM8TFFzy+RqyLOpmiEJfDNtHfcnUpvwiphNuid4kkYly0WZtD8oL/D1I2uqS1k3ROSU0U5FEIajHVkcEsXJT4drbMOJ2lZ6SsKgSdHutzw8W8idVuDUGSLxOKTRGyi6VMbRxKK1tqlXlDdhTEtcCNEH2J+aDd5F4L4MxLDPf5uKa+sawr+zYVWRgJvpwv5mX4PofBBiLgbjfRXy6ayruEDhpQoGYFPIBrBRo+JnqgOrBFN/subheMU+BvqR+F1iI7vhy/8YIjXTrRe1N4d9sJf6e06qnNL3n2KtT9kbGX8YL7BLmqNIh8bXdlNa72LZGYsEIOcHh4q73q2AxexAeFhC6G/G0Ey1/r+mKQV/4QMbMloNdoj4W6pOgT8mKjKtF4U88VtwkL6ql4qYA==; 31:5eRM0AwBDV3aFSQAo4R3W8wX+QiRylG4gsoy+KCTHsKjq6VI2FTRTArIeAnz/MkktosRx8o4qsZFog7N2GRvpzyqppiJm0v5HkBp0jlDEEA+//Se5Sq7m0dLtSCgSqZNxQ4jrVN6JaKyBotyhx7RavPjLVLmnyAZdOvkawrZ34UQGB9FvmxlL68P5wrxe1/xa9IYw/R/pbePhJusy7N7dpMfD7EnpolcdlpJ6IJUw9TkIFkb56d+lCWYlrpY6oNNu9+zio5VCYiZHOCNW2isqYbH9G6qyLibjr86TTOho68= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(101931422205132)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(8121501046)(5005006)(13015025)(13017025)(13018025)(13024025)(13023025)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123561025)(20161123565025)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259075)(20161123556025); SRVR:BN3PR0301MB1281; BCL:0; PCL:0; RULEID:(400006); SRVR:BN3PR0301MB1281; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1281; 4:SOXnjIbqEDzMRzvYnVacpAFGDYZwTJhQiYX94nKi?= =?us-ascii?Q?hpvBdE6qBysF6zwLhssHv/1HmEnmtazbXni7YxuSd57M98bXQCPY4PxGsAHJ?= =?us-ascii?Q?K5LhWW5y1mwHhbRjabhxlS8gzA+q5leHo7nx/iUA6GnegHXOHR5fuTXaqqSM?= =?us-ascii?Q?GdmEOZZy3eUzHhgRMlxOR+emykeDdrgDBAr6ThcyMevwSqyC70d2m9sG2W5M?= =?us-ascii?Q?U7ydwRDPD4zxI25a5BqLMxIF1xn3KhWbbpA9RLNDPioB2Y/3KlZBm8WyfbMt?= =?us-ascii?Q?20JIJv0o5mXjtqgso00pWWQwWN6S8EJRsG0edAtPzVz8zQm/i68LmRqTvdZG?= =?us-ascii?Q?A30haArZepZVP8pdKflr/WlUNWNyVr0sKFiN+uCv0pUuF60zFQcE31Fp13WY?= =?us-ascii?Q?ssxvvohKYyb5cuN+m+0N+4gLAPZ8SNOte0Vxt0rnrs4avx1lfaRwFFjA4G4z?= =?us-ascii?Q?QOiDPAfAN17F/lhq503tMBB1LQXJEOmKQvtcq1fFghI8IJiAcQY85oP4v2+M?= =?us-ascii?Q?JkR5nz6BV2hPgd5VqLnECRe+xTA68GTON7IJcVcf+GuToLFFIz4oROnfbck7?= =?us-ascii?Q?RD1zo0VdRF5xVbqwKzbm3bbPCTbHy0ER8bQhuMvCoXcdraoX+5BJueXwrT4U?= =?us-ascii?Q?rzonOv8FxfBc+4jftH5VMoYTtU3VQqlqsrm1X0SWEXSrMRJW/YY0b3jq7rEj?= =?us-ascii?Q?16lPVvZyoZij22UlGeKhoOiAeqXYMHE5fxvFCLaU/hFdpiZESYrGC6eeQG9L?= =?us-ascii?Q?mFV+VM1jULcxt0ktoiSmJG4O2kSRbjXRRCvpGIUQnNQ0DdkCxa9tndFqJIoh?= =?us-ascii?Q?eAKfTdGo2wrX+0nvEOue0YE43cCmGDHWIsq+rsQTP6dHCBHSs3jcf5cJkeNU?= =?us-ascii?Q?MMAdDyLparJoiunI0NbEY0S8caX7w2xjQwTbTrn+lepqLn5YtALRY7fH55FT?= =?us-ascii?Q?+qIiVNZ4hw0SAIrxhYzaNs88RfNgZGGpH+BF7d5uug=3D=3D?= X-Forefront-PRVS: 027578BB13 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0301MB1281; 23:v6nNggQHLWcUnGrbVnMDG9EvrDQW5MEll0F4dCk?= =?us-ascii?Q?OLsCe3m4jVUuFHHh2oimk83+mxhdwpWcufqFed0oJ/dpFjjS4SiVLpDLNKsl?= =?us-ascii?Q?+Xf3mQykloRhtLB/zMb+VTEKAlJWqWNeCQXLeAXNoStXA0NY6Hx4WJinCcpH?= =?us-ascii?Q?xf255M3PVygVmqysftei5+Mqg1A9h0+Eq8X97Ksael4lYUY2mObGhGUSushc?= =?us-ascii?Q?F77Wt01IRHfKjpclIyXOxJJC31URob8gQA38vnCnaSHAhDvU2Cyj/kBB6Nmn?= =?us-ascii?Q?pLMsZpFpK0+fKBPnwvmsulX7zdpGwFKv+gKosVAkBJo2CmuG5uOutLPrK8xJ?= =?us-ascii?Q?AutG791l9QGVihs3xHyKulWCmaMiGcw891dgbfH/xpvbNUXjox/BI/jVXl+T?= =?us-ascii?Q?KgqAxHdUwhUIw/tF/RfXACdR+Ixm8JyoNgZ9CBLkIX/dIkawin7+Q36Pd27i?= =?us-ascii?Q?gjNXZF1+A771emen2tvwktAoxkQHcGifGnevC8YORgH/II2KyBD6MXIdW6Yp?= =?us-ascii?Q?LkOBLA3Am62X+ij13fWNOtp0884ZW5J/opeQXff/jguJNQNcuQOPeZVh8I8L?= =?us-ascii?Q?b/4yenw7vNkSR3Xp4nmqFMp6DSEcmXuPkYsPsYoqAvWkJm3IFJ5WAVnN+yH+?= =?us-ascii?Q?y7MgjUrfOSf1WaA15+g96YNi+C6y2De9lfeeUf7WDobkxlaLNQ5tif92OVSW?= =?us-ascii?Q?xT8G2B6nmoGdSyXXbB0Tfl4bVc58zhWR1mnPAZWsx4UffyyF24R1nou+u41U?= =?us-ascii?Q?DYyVRCPQrzGYw3eNnmRovARvq3cITd9ChvEYtRxE15Th0AhkDyVuDQoPmeAV?= =?us-ascii?Q?eJ+U/0xAXPON0LRFwCxV5H1nY9D/M2wj92mKljW9lVAhsoIXiaci5dTJgZgG?= =?us-ascii?Q?in2A0iFvaVh3JceEUm//f4YjUKlcYluWJQ2UHQjiCUQ6qwbzG/abh534PoZG?= =?us-ascii?Q?20H6VBRa36H/DtpVaitCMMd/mz95VjhMSGW9LNddU77X/Ach8yQi47bolhOt?= =?us-ascii?Q?OdiPCJiI9Ktk3qHWzeiJ9RN/kAtu2PHjoCGSq49K4ZchILNHST60MbipYDHv?= =?us-ascii?Q?QbXRP0jnmwnKQiIudj/BV9VDk69lw6nQ2m93v5AWQw+U/8bGHJB0nKYHUK4r?= =?us-ascii?Q?cQL4gPP7etjaDlpDwko55IuKwPzzz0BpGOxNcw14087b8IRdKtKZibP0GTHV?= =?us-ascii?Q?xl+PezSrgCzyRUFqKqdZUwGZmxiO0ZRDRhxENg5l0O03Y+LU35BxMqiei7M9?= =?us-ascii?Q?uD57sEYaHSg/0LeDktLi8Ef4H4lqm2FBCmqno2isxy1wQUOv4tBxsMyJWsxb?= =?us-ascii?Q?c62/nTzeg8dH5cJBY8mQXie4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1281; 6:i7zCPICpQesel92BS5FuZu/HIb1dbheJPIEKZRFSrMEaSt+R2tnu0Mo03D8bp6X9mPdtkxdlACmO0iMHnkUIji+w5p7EotLUMzRwhAy+eJAUt3k/8kB/Rc+jBxsfrEYWOXVcJAwvjWEl1XreJxrRz0KE3pEy0mkT0TNLVCQplDPNRrj3QDKqCcnyAb43JCYrB1Phk9+D2PfxkXWvCH+wjWqM0gdPKkWTgEUBMRzV1z8b8AyJnT86WJtau3U2Yz7N7Ybna87jQutTXLqz4l029O9BWl+HMNVQWxsQTNwCLvANx4Wh94jVAGWFg3M9ebyoLMqqmN9T3wiXYvw9CWy4Ct3wiCEKWeAsdr3G22FggeejAtnrXujnjcjtDRkd9pcKyasq3j1R17yQ3NoTPRSkQoutrp1eIl8IB3Pg/ioeVPY81+Y5czaZaJmQUo37kkaF2y2BGkg7RVR1iDpKBYUpmQ==; 5:MSnSjkdKZxGAOLSu/UYZdmK9p4tp41fRfnmewiI8hbBaxKQbsb9iN+sEEF+Q8HD5/MFlk9zlE7+QoF+t39yTi5FAOnEp7Kbp0Ok/yVCSUdAJaYo95XGWukcMyDMzVC5SNben7uSX1O6Ml8RLoueblsccr0t7XIMkAVd4BKayIGJYqnC3tE/flDI8UQ3tYtFd; 24:mzCk8nMVscE1TsoGntsFAbxQlCMcuQgqaehaB0uhPwN4Je+Aj3oYkqIBVYJRggzYVfgQyoDRy+nepqRq30yUQBPC9DwAeTdqQvL6xIGGQM8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0301MB1281; 7:eVmjfL1RR2jIypK24/61Ani8TO+EfonQ4C0gEK53O0h3N2Wu4FWoWqwDAmFMSlhPens9zfzAxWNwyFiyXPOGP6HL63JQRJIlmpY8BbDQVFgCZvNRj79FP3FdI3Pj7MXGMtCyDiDNiqVt60BURW9mEo0G5tLPOXBrX/VzY0YWAWxosFpQjee42CogL8pPjcr6ivS0d/zGT7oxDoIgXZ0VveglweFAUEysjC3UfqhIWkOvvhCJIj4mbe/6NtCq0dlx8pBZTYuEKmYvXMkZGgkOWJEzsaoiLDA3M5qZtlaUgyLW/ymcPjA/1acQm7KW+6ZxmYWlzU3IsEFBiFklSgNUHw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2017 16:25:39.7027 (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: BN3PR0301MB1281 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170412_092604_111650_10760F62 X-CRM114-Status: GOOD ( 18.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, stuyoder@gmail.com, arnd@arndb.de, haiying.wang@nxp.com, roy.pledge@nxp.com, ruxandra.radulescu@nxp.com, alexandru.marginean@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, bogdan.hamciuc@nxp.com, linux-arm-kernel@lists.infradead.org, laurentiu.tudor@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ioana Radulescu This patch adds the command building/parsing wrapper functions for the DPCON object. The binary interface version is v3.2. A DPCON (DataPath Concentrator) is an aggregator object that allows ingress frames from multiple hardware queues to be seen as coming from a single source, from the CPU point of view. Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: Stuart Yoder --- v2: update #include paths since fsl-mc bus driver is still in staging Note: The DPAA2 Ethernet driver is the first user of the DPCON objects, but they can also be used as building blocks by other DPAA2 drivers, so the API files are located for now under staging/fsl-mc/bus, along the other "common" MC object files. drivers/staging/fsl-mc/bus/Makefile | 3 +- drivers/staging/fsl-mc/bus/dpcon-cmd.h | 69 ++++--- drivers/staging/fsl-mc/bus/dpcon.c | 317 +++++++++++++++++++++++++++++++++ drivers/staging/fsl-mc/include/dpcon.h | 115 ++++++++++++ 4 files changed, 480 insertions(+), 24 deletions(-) create mode 100644 drivers/staging/fsl-mc/bus/dpcon.c create mode 100644 drivers/staging/fsl-mc/include/dpcon.h diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile index 577e9fab34ec..659eccf52a4f 100644 --- a/drivers/staging/fsl-mc/bus/Makefile +++ b/drivers/staging/fsl-mc/bus/Makefile @@ -17,7 +17,8 @@ mc-bus-driver-objs := fsl-mc-bus.o \ fsl-mc-msi.o \ irq-gic-v3-its-fsl-mc-msi.o \ dpmcp.o \ - dpbp.o + dpbp.o \ + dpcon.o # MC DPIO driver obj-$(CONFIG_FSL_MC_DPIO) += dpio/ diff --git a/drivers/staging/fsl-mc/bus/dpcon-cmd.h b/drivers/staging/fsl-mc/bus/dpcon-cmd.h index d0a5e194c5e1..2bb66988ecf6 100644 --- a/drivers/staging/fsl-mc/bus/dpcon-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpcon-cmd.h @@ -33,30 +33,53 @@ #define _FSL_DPCON_CMD_H /* DPCON Version */ -#define DPCON_VER_MAJOR 2 -#define DPCON_VER_MINOR 1 +#define DPCON_VER_MAJOR 3 +#define DPCON_VER_MINOR 2 + +/* Command versioning */ +#define DPCON_CMD_BASE_VERSION 1 +#define DPCON_CMD_ID_OFFSET 4 + +#define DPCON_CMD(id) (((id) << DPCON_CMD_ID_OFFSET) | DPCON_CMD_BASE_VERSION) /* Command IDs */ -#define DPCON_CMDID_CLOSE 0x800 -#define DPCON_CMDID_OPEN 0x808 -#define DPCON_CMDID_CREATE 0x908 -#define DPCON_CMDID_DESTROY 0x900 - -#define DPCON_CMDID_ENABLE 0x002 -#define DPCON_CMDID_DISABLE 0x003 -#define DPCON_CMDID_GET_ATTR 0x004 -#define DPCON_CMDID_RESET 0x005 -#define DPCON_CMDID_IS_ENABLED 0x006 - -#define DPCON_CMDID_SET_IRQ 0x010 -#define DPCON_CMDID_GET_IRQ 0x011 -#define DPCON_CMDID_SET_IRQ_ENABLE 0x012 -#define DPCON_CMDID_GET_IRQ_ENABLE 0x013 -#define DPCON_CMDID_SET_IRQ_MASK 0x014 -#define DPCON_CMDID_GET_IRQ_MASK 0x015 -#define DPCON_CMDID_GET_IRQ_STATUS 0x016 -#define DPCON_CMDID_CLEAR_IRQ_STATUS 0x017 - -#define DPCON_CMDID_SET_NOTIFICATION 0x100 +#define DPCON_CMDID_CLOSE DPCON_CMD(0x800) +#define DPCON_CMDID_OPEN DPCON_CMD(0x808) +#define DPCON_CMDID_GET_API_VERSION DPCON_CMD(0xa08) + +#define DPCON_CMDID_ENABLE DPCON_CMD(0x002) +#define DPCON_CMDID_DISABLE DPCON_CMD(0x003) +#define DPCON_CMDID_GET_ATTR DPCON_CMD(0x004) +#define DPCON_CMDID_RESET DPCON_CMD(0x005) +#define DPCON_CMDID_IS_ENABLED DPCON_CMD(0x006) + +#define DPCON_CMDID_SET_NOTIFICATION DPCON_CMD(0x100) + +struct dpcon_cmd_open { + __le32 dpcon_id; +}; + +#define DPCON_ENABLE 1 + +struct dpcon_rsp_is_enabled { + u8 enabled; +}; + +struct dpcon_rsp_get_attr { + /* response word 0 */ + __le32 id; + __le16 qbman_ch_id; + u8 num_priorities; + u8 pad; +}; + +struct dpcon_cmd_set_notification { + /* cmd word 0 */ + __le32 dpio_id; + u8 priority; + u8 pad[3]; + /* cmd word 1 */ + __le64 user_ctx; +}; #endif /* _FSL_DPCON_CMD_H */ diff --git a/drivers/staging/fsl-mc/bus/dpcon.c b/drivers/staging/fsl-mc/bus/dpcon.c new file mode 100644 index 000000000000..eb713578b817 --- /dev/null +++ b/drivers/staging/fsl-mc/bus/dpcon.c @@ -0,0 +1,317 @@ +/* Copyright 2013-2016 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the above-listed copyright holders nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#include "../include/mc-sys.h" +#include "../include/mc-cmd.h" +#include "../include/dpcon.h" + +#include "dpcon-cmd.h" + +/** + * dpcon_open() - Open a control session for the specified object + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @dpcon_id: DPCON unique ID + * @token: Returned token; use in subsequent API calls + * + * This function can be used to open a control session for an + * already created object; an object may have been declared in + * the DPL or by calling the dpcon_create() function. + * This function returns a unique authentication token, + * associated with the specific object ID and the specific MC + * portal; this token must be used in all subsequent commands for + * this specific object. + * + * Return: '0' on Success; Error code otherwise. + */ +int dpcon_open(struct fsl_mc_io *mc_io, + u32 cmd_flags, + int dpcon_id, + u16 *token) +{ + struct mc_command cmd = { 0 }; + struct dpcon_cmd_open *dpcon_cmd; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_OPEN, + cmd_flags, + 0); + dpcon_cmd = (struct dpcon_cmd_open *)cmd.params; + dpcon_cmd->dpcon_id = cpu_to_le32(dpcon_id); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + *token = mc_cmd_hdr_read_token(&cmd); + + return 0; +} +EXPORT_SYMBOL(dpcon_open); + +/** + * dpcon_close() - Close the control session of the object + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * + * After this function is called, no further operations are + * allowed on the object without opening a new control session. + * + * Return: '0' on Success; Error code otherwise. + */ +int dpcon_close(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_CLOSE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} +EXPORT_SYMBOL(dpcon_close); + +/** + * dpcon_enable() - Enable the DPCON + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * + * Return: '0' on Success; Error code otherwise + */ +int dpcon_enable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_ENABLE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} +EXPORT_SYMBOL(dpcon_enable); + +/** + * dpcon_disable() - Disable the DPCON + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * + * Return: '0' on Success; Error code otherwise + */ +int dpcon_disable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_DISABLE, + cmd_flags, + token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} +EXPORT_SYMBOL(dpcon_disable); + +/** + * dpcon_is_enabled() - Check if the DPCON is enabled. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * @en: Returns '1' if object is enabled; '0' otherwise + * + * Return: '0' on Success; Error code otherwise. + */ +int dpcon_is_enabled(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + int *en) +{ + struct mc_command cmd = { 0 }; + struct dpcon_rsp_is_enabled *dpcon_rsp; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_IS_ENABLED, + cmd_flags, + token); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + dpcon_rsp = (struct dpcon_rsp_is_enabled *)cmd.params; + *en = dpcon_rsp->enabled & DPCON_ENABLE; + + return 0; +} +EXPORT_SYMBOL(dpcon_is_enabled); + +/** + * dpcon_reset() - Reset the DPCON, returns the object to initial state. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * + * Return: '0' on Success; Error code otherwise. + */ +int dpcon_reset(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token) +{ + struct mc_command cmd = { 0 }; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_RESET, + cmd_flags, token); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} +EXPORT_SYMBOL(dpcon_reset); + +/** + * dpcon_get_attributes() - Retrieve DPCON attributes. + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * @attr: Object's attributes + * + * Return: '0' on Success; Error code otherwise. + */ +int dpcon_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_attr *attr) +{ + struct mc_command cmd = { 0 }; + struct dpcon_rsp_get_attr *dpcon_rsp; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_GET_ATTR, + cmd_flags, + token); + + /* send command to mc*/ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + dpcon_rsp = (struct dpcon_rsp_get_attr *)cmd.params; + attr->id = le32_to_cpu(dpcon_rsp->id); + attr->qbman_ch_id = le16_to_cpu(dpcon_rsp->qbman_ch_id); + attr->num_priorities = dpcon_rsp->num_priorities; + + return 0; +} +EXPORT_SYMBOL(dpcon_get_attributes); + +/** + * dpcon_set_notification() - Set DPCON notification destination + * @mc_io: Pointer to MC portal's I/O object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @token: Token of DPCON object + * @cfg: Notification parameters + * + * Return: '0' on Success; Error code otherwise + */ +int dpcon_set_notification(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_notification_cfg *cfg) +{ + struct mc_command cmd = { 0 }; + struct dpcon_cmd_set_notification *dpcon_cmd; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_SET_NOTIFICATION, + cmd_flags, + token); + dpcon_cmd = (struct dpcon_cmd_set_notification *)cmd.params; + dpcon_cmd->dpio_id = cpu_to_le32(cfg->dpio_id); + dpcon_cmd->priority = cfg->priority; + dpcon_cmd->user_ctx = cpu_to_le64(cfg->user_ctx); + + /* send command to mc*/ + return mc_send_command(mc_io, &cmd); +} +EXPORT_SYMBOL(dpcon_set_notification); + +/** + * dpcon_get_api_version - Get Data Path Concentrator API version + * @mc_io: Pointer to MC portal's DPCON object + * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' + * @major_ver: Major version of DPCON API + * @minor_ver: Minor version of DPCON API + * + * Return: '0' on Success; Error code otherwise + */ +int dpcon_get_api_version(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 *major_ver, + u16 *minor_ver) +{ + struct mc_command cmd = { 0 }; + int err; + + /* prepare command */ + cmd.header = mc_encode_cmd_header(DPCON_CMDID_GET_API_VERSION, + cmd_flags, 0); + + /* send command to mc */ + err = mc_send_command(mc_io, &cmd); + if (err) + return err; + + /* retrieve response parameters */ + mc_cmd_read_api_version(&cmd, major_ver, minor_ver); + + return 0; +} +EXPORT_SYMBOL(dpcon_get_api_version); diff --git a/drivers/staging/fsl-mc/include/dpcon.h b/drivers/staging/fsl-mc/include/dpcon.h new file mode 100644 index 000000000000..efa23906b364 --- /dev/null +++ b/drivers/staging/fsl-mc/include/dpcon.h @@ -0,0 +1,115 @@ +/* Copyright 2013-2016 Freescale Semiconductor Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the above-listed copyright holders nor the + * names of any contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * + * ALTERNATIVELY, this software may be distributed under the terms of the + * GNU General Public License ("GPL") as published by the Free Software + * Foundation, either version 2 of that License or (at your option) any + * later version. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __FSL_DPCON_H +#define __FSL_DPCON_H + +/* Data Path Concentrator API + * Contains initialization APIs and runtime control APIs for DPCON + */ + +struct fsl_mc_io; + +/** General DPCON macros */ + +/** + * Use it to disable notifications; see dpcon_set_notification() + */ +#define DPCON_INVALID_DPIO_ID (int)(-1) + +int dpcon_open(struct fsl_mc_io *mc_io, + u32 cmd_flags, + int dpcon_id, + u16 *token); + +int dpcon_close(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_enable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_disable(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +int dpcon_is_enabled(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + int *en); + +int dpcon_reset(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token); + +/** + * struct dpcon_attr - Structure representing DPCON attributes + * @id: DPCON object ID + * @qbman_ch_id: Channel ID to be used by dequeue operation + * @num_priorities: Number of priorities for the DPCON channel (1-8) + */ +struct dpcon_attr { + int id; + u16 qbman_ch_id; + u8 num_priorities; +}; + +int dpcon_get_attributes(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_attr *attr); + +/** + * struct dpcon_notification_cfg - Structure representing notification params + * @dpio_id: DPIO object ID; must be configured with a notification channel; + * to disable notifications set it to 'DPCON_INVALID_DPIO_ID'; + * @priority: Priority selection within the DPIO channel; valid values + * are 0-7, depending on the number of priorities in that channel + * @user_ctx: User context value provided with each CDAN message + */ +struct dpcon_notification_cfg { + int dpio_id; + u8 priority; + u64 user_ctx; +}; + +int dpcon_set_notification(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 token, + struct dpcon_notification_cfg *cfg); + +int dpcon_get_api_version(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 *major_ver, + u16 *minor_ver); + +#endif /* __FSL_DPCON_H */