From patchwork Tue Feb 7 15:43:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9560443 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 CECB86047A for ; Tue, 7 Feb 2017 15:45:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDE4B27317 for ; Tue, 7 Feb 2017 15:45:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B224C28434; Tue, 7 Feb 2017 15:45:19 +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 autolearn=ham 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 7DCC027317 for ; Tue, 7 Feb 2017 15:45:18 +0000 (UTC) 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 1cb7xE-0007CF-6L; Tue, 07 Feb 2017 15:45:16 +0000 Received: from mail-by2nam01on0072.outbound.protection.outlook.com ([104.47.34.72] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cb7wU-0005CT-Fb for linux-arm-kernel@lists.infradead.org; Tue, 07 Feb 2017 15:44:36 +0000 Received: from DM5PR03CA0006.namprd03.prod.outlook.com (10.175.104.16) by CY4PR03MB2950.namprd03.prod.outlook.com (10.175.116.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Tue, 7 Feb 2017 15:44:08 +0000 Received: from BN1AFFO11FD026.protection.gbl (2a01:111:f400:7c10::190) by DM5PR03CA0006.outlook.office365.com (2603:10b6:3:118::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Tue, 7 Feb 2017 15:44:08 +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; nxp.com; dkim=none (message not signed) header.d=none; 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 BN1AFFO11FD026.mail.protection.outlook.com (10.58.52.86) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.888.7 via Frontend Transport; Tue, 7 Feb 2017 15:44:08 +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 v17Fi5WI029897; Tue, 7 Feb 2017 08:44:07 -0700 From: To: Subject: [PATCH v3 06/10] staging: fsl-mc: dpmcp: drop unused APIs Date: Tue, 7 Feb 2017 09:43:49 -0600 Message-ID: <20170207154353.20691-7-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170207154353.20691-1-laurentiu.tudor@nxp.com> References: <20170207154353.20691-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131309558485747050; (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)(7916002)(39860400002)(39450400003)(39380400002)(39410400002)(39840400002)(39400400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(45074003)(199003)(189002)(8936002)(106466001)(356003)(305945005)(2876002)(85426001)(2351001)(50466002)(105606002)(48376002)(8656002)(54906002)(86152003)(2950100002)(4326007)(1076002)(36756003)(38730400002)(5660300001)(626004)(110136004)(6666003)(104016004)(6916009)(2906002)(92566002)(53936002)(47776003)(189998001)(86362001)(575784001)(68736007)(7416002)(50226002)(77096006)(33646002)(76176999)(50986999)(5003940100001)(97736004)(81166006)(81156014)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2950; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD026; 1:RpFEB7BFcCharzibsn/xK/1UJOcagndH5xXnYyZ7RudGzQLHxpjds2JZNzCcG4voGL2gSgyWp7uFwJYK4mj6Od2kxfQXSQ+yqzrAAohu+Ry6D9rHgzwexujKXQnXLk+tzrj1J7Zcop1DuEWm5kC4cAO+/lapfQ9Nv1GQxgvqOKbcJLhuX/YoP1r6UTcM779rRx/fhDgqLfad03FqnkPNu6s9dZZCXN8fDp0cOq8aBArUGelzI5Es1ylC703yBri738w6ygTcxgOdOFKbZ1TXO9zjpyEKydLcTKmJzhbTCnCvZlO060WiqDpJ9kn4UaUHsNuEPo7gDGz9jOQTdVDs3ue+ZshdcXw2FjsNn5N3wh77/NVk0UizIxWGMwvgN1T9orzfkRaBK2tV14yuJh+/K+QF5M2YQZansfdSPPf3Ehhb/RGFalF/XW4OdhMpNkkCAJt53aTj1Q+fr+mOx+s+RdV7Vz79YyubSlKuOcJ5XYaWOQH1M/9SxK6kEiNA5sFXwcgs0qBslL2uSjWZN6alLRiwjM9kaYxHkFCQQVsHqj5qFnIb2KPuwrM24i/65E/s1mqdc8DreLw/IcHwbd61Ev2VsSDGQjXNSRG2xHOuw5/M/diekXCcHcIgxenEkGXd5eWnSw5+0gvAAMduUGGevZEyeaGNLNKfNuM1elHvoARGheZYXn9/JX2114pMLnSVCH5pqM5+WrunDl4VrM5RrqxgLCeAGywDfC7gdbSF5aGhlAOAhoNWznoRtbrCnjCElAzGioAwBQsMwgoBjJf/Ug== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 1643c78f-aa39-4fac-a456-08d44f70279c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY4PR03MB2950; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 3:pfgmJGdrNhcssS6SfiJcF/BREK+FXNe5Z58Wfw7QRQEv37TAzXv8palm3k+h2MhZ60MdlgE1JM4lmKHkkokRZgtO28TjtKNOwej9Hjl2Kr4ioEBKXtQJfBaU/mU1u3mljQ+D21y7OaNC67GlvwImGvom06v9Zk5iFfeKdCHch18hM4MXOD20MdCadcJ5XCC+r/jlP4IqnQ2NXQmVsJ92Vbpw+RYKtyJZlkgV/1ujxZlZrTNkwfHLz/UdOOBsg+amCpqkhCdASyYOBeT1k7uspRYI/zNTS7NFbOee9mD3oSd6V4rqn+0fbVo1FEbWlRi21NFbDaBLuqLtUldjTVilTzoRIUo6Tq9ZeG9+q/Gt3HeP3dUr6TSOv7B/5TCk+ckv; 25:hxASIsnTDPnQnFIKZqAh0rfEff/2WVxUhvxfa5pGkU+B6/aHpkBrsprmoyEjPGPpH5gw3P9p/hyFzk7cUXdheqTklci5wT8npvCedKRdbL4r7k/dvCn95APq8T9iMrkJzUabE6r9N5jQOCkZ9twGADGuAqz3GSyHiLh2vHJpwFsr8HlRQZGHIEkGgnAOL9Sf2Q6pLhFma4GwDZHjrUhANFk+baypLKmsPYyno1GnoXLKYWZsGmdJ6NJ5Cat5wdCGJ0U8FcWojOUL6kkU2vFCY0WjJTh1d5MUV4KkBGp8++Ay0a7Xxvfh2hNXncN3e0msS4cWZJfMyRMT+l56MMwuJX0dTjBI1yMUZixDsTn097VeJseY6gFlUkNt3xph5ENmkD52+elD/G6CegHScwkDCs0vjPvHxjokjHv2MZHKtDDK+FILEvt2dNNyuutNq3KerZU9RzM2wBTJHkaCT9Z7pA== X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 31:DjhzQjkmCHNawCnSTgty3WwejY7nsrZcTtR797r2iV1PaGGtSpDPwukCA2oaG9l/w1pTAjrYQNkVcm0rpTlOoDxFjcu+rBWNMrD+ro5ZVtTKRKoyOwYTJVWGiP/zZOISQXFdhQ81fdJsSFgoICj2htJW0ZZovMQdmNDBpXWEb/HlUM+NvIYtesh7jkRADet74vaYkglPK8GtcM2/YiUm5QiIUlOyIuJXNFD2kr5AYuyfXAfkU6lKgQySVuXj6bTU+Lmqk0NTO4TNeOQDkfjlBA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13023025)(13024025)(20170203043)(13018025)(13017025)(2017020603029)(13015025)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123559025)(20161123563025)(20161123565025)(20161123556025); SRVR:CY4PR03MB2950; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2950; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 4:67I9fhfH53OIfuwn23z8zl8PWwEqhz6L60fBvvBJFWRx7dB46N14wnyUwYK/3ZblfaDgpqdl7uxuj+4G4/c/k+I0vwTcyM1GGIUcEgNlYrToqk8LN8tKqLrA0sVBJGJtlkmkmlaJuO3P8WSQMthaSb2laYaHEXYhmOdMsVJYhIE79EFLEY9Qrj51rETnD0ubWJyE38qYkaSjD2EsdAeeUE1flGHWUxffY2hWSJS+Hmv/DyhAOr+YzjY51VVS8i0tMJivBlJXtvBVyDA8Is3TB1wcYxRfvdqY//ebRXnNg92S5VrMMsp8bApHxfbRCZ8VjNXf+7MMpoLnMPrDStJkRRsZApuMrDGRAPj65LRdUiQbfTASESCK/i0i/jri1qIKwuY44ipwVQHD/47PLUhgip6HRAXO/E+Jy412UbjmR4/iz5iM1ZVtRnNCvkbllPPrbmyqJlHmOrzk4qUutkYQ5TJfZJWimvelNa+YT3NQaZiJoaPT3SOUi9wtPdlL7R2isTNHcyGAvaDfffdRE2oZL32UVsSDajPPBTL0CHAbv4D2vUpEZ/+a608vCt5cFdhyIX0q30BHbmWXuOlLmAfTrhn201+P1jGA7ju6bgqtTKkagahWYbNAPcaQvqHB6OzVtk6529PuzakUqT7lfymjbJhCeFhgMe0n2MukF1b7LyHoWxYFzyNgmxRKFPv/FK6A0wvYUkuwMXAx2TZ88clCqH3MjyIwcG2IL5MNNv4hDK+gDJYXqHGQc0EWFkV4DnpzeEHf8pHXfYJMwtia7zN5wB5fRxrXYWe8d3m0aHDNJJPcppbdK4meW+WKRrwB5XbLnfvh3EPTjt7S3BaAV2sTgQ== X-Forefront-PRVS: 0211965D06 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2950; 23:RTZu01QetVSStGbcV4rbJOs1CvbptJ2u7cieNqpl3?= =?us-ascii?Q?GqGgxV4aZlsSy3IQHxUdjfCvRflf0SHhokmjtioyygDp/V07WlnnTYHiEdP8?= =?us-ascii?Q?M+RbRY1NVJYYLLdsN14oICEdV7xNwk09AhXjm+pCXykbQQNqmJ6Mzclyb0hK?= =?us-ascii?Q?9Ly5kyR3evsBQwOGPwh49gma8HPPANXKCk4/vPWQvuEnzhKs0GyBsuj2G+ek?= =?us-ascii?Q?taj9+bhKZv2Xc4U70PK872YhKMrDmRl+dt5koQNeRzXTVfNHHw/NT53lBrJz?= =?us-ascii?Q?Q2w49jJB2li0tHhaRzjEpj6L5LO4si3KkN+a2847RTW+UFnv/LaeH+/UssbB?= =?us-ascii?Q?NJ62j6OkQCH7msxX3igoLPqydXq9xL9TM2F6LzaEx23lLPh+RmrEvt0XldGT?= =?us-ascii?Q?YobBW9rbDApcgJxlmDdJotwT6fX+LkXpgKp6S7iJ2GxMN60rqSSs4d4+ASNv?= =?us-ascii?Q?rxQcH3ofr7ftGCK0GP5APdoxAbw8LmUHjvGJ/I0QBkhFy4MTLpT+uexaExcI?= =?us-ascii?Q?ysLOHy2ZbB6Qj6J1BDYjnAGgOAbt2pU2aoY0guyod90zr/bG08kvdcBLXnTX?= =?us-ascii?Q?wusa9E2GMlcMJIWO4mDLBmSDUYNsjjuJ2vSoMKQeNGA8c07XXF1c0tdrV9Qw?= =?us-ascii?Q?aPLMg1dGVxSUhgX0iyHugKDvUfaeHsdM+A1+WAt/KEbOY31dGha4OF9sTuda?= =?us-ascii?Q?xsykDDDkLb5m6tzlqv1WtE0872tgNrnDLl7zgOEFF2My4w7FPBO3l584LIZ1?= =?us-ascii?Q?WM3hhUtGpqXlVkzlkuoXBZxGhIprTeCPlxTYPeoeJ5XH6JlDkMZqR1+01//S?= =?us-ascii?Q?cwTAQfMyF/+UGBUqabMamzuxHUz/HFWKiHeCOGyIel4TP57QEdockxMh/jba?= =?us-ascii?Q?FCJtsvB0mquBYcTrxpfkoejzXsRScRUXEkvqhOS5SUl7igYDFQCU2665ohxs?= =?us-ascii?Q?aNSej6Se7/DEubr1WElXHyo5e/6xk+8HY1v0QDoKC0gg5bUkOxnufQ8yjy1m?= =?us-ascii?Q?jeHjdYU5/X6tNsvm/iOgK4BNqv2JCQov+6LqpJKW/d23pd57VORC+95iFRK7?= =?us-ascii?Q?8wKATOh7KpFFAeFLxOBOcygNNmZlsd6C2QNCIJjyYykuJZMjcrEH1tFFM9lJ?= =?us-ascii?Q?2hLEWkUWbtwenJVpLVs3ibp6xa73NcIn/vYrIS21u8BaYlwDoA8CaB4luLp0?= =?us-ascii?Q?93qO5J9zYUpwU4VPReOw0I+oUeWP0ycMbOsuqzE+QtN0L1JQdWuWgqqnsS+d?= =?us-ascii?Q?fcD4rle9g2vAyX1q1eaMfLnXgNaKpNykzkduUaewHM7jmdMimTin+GHw5ATY?= =?us-ascii?Q?h8vMLeb/fPDg8SdldQU580wzsQOk6tfhC5fEzqDkojYdecPPc1rBb9uYazUI?= =?us-ascii?Q?fk9VVZbPJFse3mSiLIhiPtBqQg1PXLztl2EnSyav8RA6Pw7MlikCeuhEsHQf?= =?us-ascii?Q?BMaVnCziS9yxAQN56qZ/vFxJ2LG4BY=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 6:/KLA0urSJQVhEzGJRT9taYwbg9XKhyUET28/jUwnp1ZtP0R8oamVbeKCPIdqi56c+E1AZX+0af30in8BXhe9tp/fyM2ZsQEFkwv9WORFbghr0vVudrnS7qP2wLqGkektb4VxfejfcVfptV+u9tYoKvT5I91WRxWrzCPPi8KihkXliQfC0Rsrm3zwNY5BUbfJB+qJ7W8Mfhj4456wORlHQriobrqscS7rsz4W75iXRGeBuLeDZvJofq50xxmAwSFix7/AILLQQA2TNRClbd/kQbd4DNjhr0q03dJqzYtYo+jjbVWFHd8yBPmRfvaMDBrv6mhas1e9YdW/N6FsdnqYlUKxLch3QP9sFQzuVcmYIthTZnzbqnI2gVsvJsMzUcoVMNHwJJ8RMUU6IKfg8SMw2RefM3/ygtaIf+ELHw88xlw=; 5:vEXvHJuip5c7dBsCmDuyOKvDfvdR4HhDhdhjX0THyCjNVpHiIvJFX5uLexQt6/dfPTahIGY59vUVPpveef3HJXBfqBRk6Bl/T8Oxp11feiOnhFh/k52NCcRc7xMT2SNyScN5taK0qOKcMcMBV5pi5CIATX8vXJBFeTpQPL3xLx1uuPDmex5xPNNLvXeD9Qyy; 24:6LxYhbVmE6eUIy2iS7xwt0qrG2+CZQvfVcgm1i8dNlbu/LxlhB3liqnkfT+YMkkGAhgoGqpvlKGya+e0pQ9nTlKTg/GgyDq9M51nWJ3RLAY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2950; 7:lSxOIIW/JedAxVCQ9iWRl4HdgpeeBb7oImtTsdgvyCiw+jyi57LngoNYpp3Oi6fKuP+3w2sT0kanSMhaSbVxuoTYoukd8ycf5SPbQ6As6W+oC00mbEDwGytrfS/VdkbQ3JD/ejuax7jHHW2T6baF2tSqxun8A5GAU7hwdeJMsHzOzjYcslnyFZBqbootfKSxou3WrXVj6bYFgLOTW+0BeaebeGYpYUEsn9+5Pj9EbASmaNLYlzIJwTWHRjP8jYw/etTop+Yttbw7IAUqtmhxVl/MOG6MdNriyLdKWKacdDCABBcihYGuXB6AhjgZA4sRvg8twpkp2NASAWY+egO77jhA+5u2cbmnbRpKlgT5zTm5NYRn9s6N/rU0K2JhXA0mdq5UShSjtoQQP64Sfqf03jH8EGS4X4bzNP/WQSiPguk4aO2WzttHYcxhWurBAZ0aHmb/opMxt99X+QZtXHjFEtE2zpJVmV7Zsu33AVU3pn+/opJ7aHPL4LhepGcksMKa6Fcit27tm2XYNLkhJfEHSg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2017 15:44:08.3720 (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: CY4PR03MB2950 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170207_074430_647992_862517AC X-CRM114-Status: GOOD ( 15.93 ) 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, arnd@arndb.de, ruxandra.radulescu@nxp.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, catalin.horghidan@nxp.com, linux-arm-kernel@lists.infradead.org, ioana.ciornei@nxp.com, leoyang.li@nxp.com, bharat.bhushan@nxp.com, stuart.yoder@nxp.com, Laurentiu Tudor 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: Laurentiu Tudor These APIs are not used yet, so drop the dead code. The patch is mostly mechanical, with a couple exceptions: - getters/setters were not removed even if only one of them is being used - versioning API was also left in place Also in this patch, add missing prototype for version query function. Signed-off-by: Laurentiu Tudor --- v3: - no changes drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 95 -------- drivers/staging/fsl-mc/bus/dpmcp.c | 382 --------------------------------- drivers/staging/fsl-mc/bus/dpmcp.h | 100 +-------- 3 files changed, 4 insertions(+), 573 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h index 7cb5149..384a13d 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h @@ -45,107 +45,12 @@ /* Command IDs */ #define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) #define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) -#define DPMCP_CMDID_CREATE DPMCP_CMD(0x90b) -#define DPMCP_CMDID_DESTROY DPMCP_CMD(0x98b) #define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) -#define DPMCP_CMDID_GET_ATTR DPMCP_CMD(0x004) #define DPMCP_CMDID_RESET DPMCP_CMD(0x005) -#define DPMCP_CMDID_SET_IRQ DPMCP_CMD(0x010) -#define DPMCP_CMDID_GET_IRQ DPMCP_CMD(0x011) -#define DPMCP_CMDID_SET_IRQ_ENABLE DPMCP_CMD(0x012) -#define DPMCP_CMDID_GET_IRQ_ENABLE DPMCP_CMD(0x013) -#define DPMCP_CMDID_SET_IRQ_MASK DPMCP_CMD(0x014) -#define DPMCP_CMDID_GET_IRQ_MASK DPMCP_CMD(0x015) -#define DPMCP_CMDID_GET_IRQ_STATUS DPMCP_CMD(0x016) - struct dpmcp_cmd_open { __le32 dpmcp_id; }; -struct dpmcp_cmd_create { - __le32 portal_id; -}; - -struct dpmcp_cmd_destroy { - __le32 object_id; -}; - -struct dpmcp_cmd_set_irq { - /* cmd word 0 */ - u8 irq_index; - u8 pad[3]; - __le32 irq_val; - /* cmd word 1 */ - __le64 irq_addr; - /* cmd word 2 */ - __le32 irq_num; -}; - -struct dpmcp_cmd_get_irq { - __le32 pad; - u8 irq_index; -}; - -struct dpmcp_rsp_get_irq { - /* cmd word 0 */ - __le32 irq_val; - __le32 pad; - /* cmd word 1 */ - __le64 irq_paddr; - /* cmd word 2 */ - __le32 irq_num; - __le32 type; -}; - -#define DPMCP_ENABLE 0x1 - -struct dpmcp_cmd_set_irq_enable { - u8 enable; - u8 pad[3]; - u8 irq_index; -}; - -struct dpmcp_cmd_get_irq_enable { - __le32 pad; - u8 irq_index; -}; - -struct dpmcp_rsp_get_irq_enable { - u8 enabled; -}; - -struct dpmcp_cmd_set_irq_mask { - __le32 mask; - u8 irq_index; -}; - -struct dpmcp_cmd_get_irq_mask { - __le32 pad; - u8 irq_index; -}; - -struct dpmcp_rsp_get_irq_mask { - __le32 mask; -}; - -struct dpmcp_cmd_get_irq_status { - __le32 status; - u8 irq_index; -}; - -struct dpmcp_rsp_get_irq_status { - __le32 status; -}; - -struct dpmcp_rsp_get_attributes { - /* response word 0 */ - __le32 pad; - __le32 id; - /* response word 1 */ - __le16 version_major; - __le16 version_minor; -}; - #endif /* _FSL_DPMCP_CMD_H */ diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c b/drivers/staging/fsl-mc/bus/dpmcp.c index e4d1651..ad4c8b4 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.c +++ b/drivers/staging/fsl-mc/bus/dpmcp.c @@ -104,82 +104,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, } /** - * dpmcp_create() - Create the DPMCP object. - * @mc_io: Pointer to MC portal's I/O object - * @dprc_token: Parent container token; '0' for default container - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @cfg: Configuration structure - * @obj_id: Returned object id; use in subsequent API calls - * - * Create the DPMCP object, allocate required resources and - * perform required initialization. - * - * The object can be created either by declaring it in the - * DPL file, or by calling this function. - - * This function accepts an authentication token of a parent - * container that this object should be assigned to and returns - * an object id. This object_id will be used in all subsequent calls to - * this specific object. - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_create(struct fsl_mc_io *mc_io, - u16 dprc_token, - u32 cmd_flags, - const struct dpmcp_cfg *cfg, - u32 *obj_id) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_create *cmd_params; - - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_CREATE, - cmd_flags, dprc_token); - cmd_params = (struct dpmcp_cmd_create *)cmd.params; - cmd_params->portal_id = cpu_to_le32(cfg->portal_id); - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - *obj_id = mc_cmd_read_object_id(&cmd); - - return 0; -} - -/** - * dpmcp_destroy() - Destroy the DPMCP object and release all its resources. - * @mc_io: Pointer to MC portal's I/O object - * @dprc_token: Parent container token; '0' for default container - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @obj_id: ID of DPMCP object - * - * Return: '0' on Success; error code otherwise. - */ -int dpmcp_destroy(struct fsl_mc_io *mc_io, - u16 dprc_token, - u32 cmd_flags, - u32 obj_id) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_destroy *cmd_params; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_DESTROY, - cmd_flags, dprc_token); - cmd_params = (struct dpmcp_cmd_destroy *)cmd.params; - cmd_params->object_id = cpu_to_le32(obj_id); - - /* send command to mc*/ - return mc_send_command(mc_io, &cmd); -} - -/** * dpmcp_reset() - Reset the DPMCP, 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_' @@ -202,312 +126,6 @@ int dpmcp_reset(struct fsl_mc_io *mc_io, } /** - * dpmcp_set_irq() - Set IRQ information for the DPMCP to trigger an interrupt. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPMCP object - * @irq_index: Identifies the interrupt index to configure - * @irq_cfg: IRQ configuration - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_set_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - struct dpmcp_irq_cfg *irq_cfg) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_set_irq *cmd_params; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_SET_IRQ, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_set_irq *)cmd.params; - cmd_params->irq_index = irq_index; - cmd_params->irq_val = cpu_to_le32(irq_cfg->val); - cmd_params->irq_addr = cpu_to_le64(irq_cfg->paddr); - cmd_params->irq_num = cpu_to_le32(irq_cfg->irq_num); - - /* send command to mc*/ - return mc_send_command(mc_io, &cmd); -} - -/** - * dpmcp_get_irq() - Get IRQ information from the DPMCP. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPMCP object - * @irq_index: The interrupt index to configure - * @type: Interrupt type: 0 represents message interrupt - * type (both irq_addr and irq_val are valid) - * @irq_cfg: IRQ attributes - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_get_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - int *type, - struct dpmcp_irq_cfg *irq_cfg) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_get_irq *cmd_params; - struct dpmcp_rsp_get_irq *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_GET_IRQ, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_get_irq *)cmd.params; - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpmcp_rsp_get_irq *)cmd.params; - irq_cfg->val = le32_to_cpu(rsp_params->irq_val); - irq_cfg->paddr = le64_to_cpu(rsp_params->irq_paddr); - irq_cfg->irq_num = le32_to_cpu(rsp_params->irq_num); - *type = le32_to_cpu(rsp_params->type); - return 0; -} - -/** - * dpmcp_set_irq_enable() - Set overall interrupt 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 DPMCP object - * @irq_index: The interrupt index to configure - * @en: Interrupt state - enable = 1, disable = 0 - * - * Allows GPP software to control when interrupts are generated. - * Each interrupt can have up to 32 causes. The enable/disable control's the - * overall interrupt state. if the interrupt is disabled no causes will cause - * an interrupt. - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 en) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_set_irq_enable *cmd_params; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_SET_IRQ_ENABLE, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_set_irq_enable *)cmd.params; - cmd_params->enable = en & DPMCP_ENABLE; - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - return mc_send_command(mc_io, &cmd); -} - -/** - * dpmcp_get_irq_enable() - Get overall interrupt 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 DPMCP object - * @irq_index: The interrupt index to configure - * @en: Returned interrupt state - enable = 1, disable = 0 - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 *en) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_get_irq_enable *cmd_params; - struct dpmcp_rsp_get_irq_enable *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_GET_IRQ_ENABLE, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_get_irq_enable *)cmd.params; - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpmcp_rsp_get_irq_enable *)cmd.params; - *en = rsp_params->enabled & DPMCP_ENABLE; - return 0; -} - -/** - * dpmcp_set_irq_mask() - Set interrupt mask. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPMCP object - * @irq_index: The interrupt index to configure - * @mask: Event mask to trigger interrupt; - * each bit: - * 0 = ignore event - * 1 = consider event for asserting IRQ - * - * Every interrupt can have up to 32 causes and the interrupt model supports - * masking/unmasking each cause independently - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 mask) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_set_irq_mask *cmd_params; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_SET_IRQ_MASK, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_set_irq_mask *)cmd.params; - cmd_params->mask = cpu_to_le32(mask); - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - return mc_send_command(mc_io, &cmd); -} - -/** - * dpmcp_get_irq_mask() - Get interrupt mask. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPMCP object - * @irq_index: The interrupt index to configure - * @mask: Returned event mask to trigger interrupt - * - * Every interrupt can have up to 32 causes and the interrupt model supports - * masking/unmasking each cause independently - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *mask) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_get_irq_mask *cmd_params; - struct dpmcp_rsp_get_irq_mask *rsp_params; - - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_GET_IRQ_MASK, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_get_irq_mask *)cmd.params; - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpmcp_rsp_get_irq_mask *)cmd.params; - *mask = le32_to_cpu(rsp_params->mask); - - return 0; -} - -/** - * dpmcp_get_irq_status() - Get the current status of any pending interrupts. - * - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPMCP object - * @irq_index: The interrupt index to configure - * @status: Returned interrupts status - one bit per cause: - * 0 = no interrupt pending - * 1 = interrupt pending - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_get_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *status) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_cmd_get_irq_status *cmd_params; - struct dpmcp_rsp_get_irq_status *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_GET_IRQ_STATUS, - cmd_flags, token); - cmd_params = (struct dpmcp_cmd_get_irq_status *)cmd.params; - cmd_params->status = cpu_to_le32(*status); - cmd_params->irq_index = irq_index; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpmcp_rsp_get_irq_status *)cmd.params; - *status = le32_to_cpu(rsp_params->status); - - return 0; -} - -/** - * dpmcp_get_attributes - Retrieve DPMCP 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 DPMCP object - * @attr: Returned object's attributes - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - struct dpmcp_attr *attr) -{ - struct mc_command cmd = { 0 }; - struct dpmcp_rsp_get_attributes *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPMCP_CMDID_GET_ATTR, - cmd_flags, token); - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpmcp_rsp_get_attributes *)cmd.params; - attr->id = le32_to_cpu(rsp_params->id); - - return 0; -} - -/** * dpmcp_get_api_version - Get Data Path Management Command Portal API version * @mc_io: Pointer to Mc portal's I/O object * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h index 98a100d..f616031 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.h +++ b/drivers/staging/fsl-mc/bus/dpmcp.h @@ -44,109 +44,17 @@ int dpmcp_open(struct fsl_mc_io *mc_io, int dpmcp_id, u16 *token); -/* Get portal ID from pool */ -#define DPMCP_GET_PORTAL_ID_FROM_POOL (-1) - int dpmcp_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/** - * struct dpmcp_cfg - Structure representing DPMCP configuration - * @portal_id: Portal ID; 'DPMCP_GET_PORTAL_ID_FROM_POOL' to get the portal ID - * from pool - */ -struct dpmcp_cfg { - int portal_id; -}; - -int dpmcp_create(struct fsl_mc_io *mc_io, - u16 dprc_token, - u32 cmd_flags, - const struct dpmcp_cfg *cfg, - u32 *obj_id); - -int dpmcp_destroy(struct fsl_mc_io *mc_io, - u16 dprc_token, - u32 cmd_flags, - u32 obj_id); +int dpmcp_get_api_version(struct fsl_mc_io *mc_io, + u32 cmd_flags, + u16 *major_ver, + u16 *minor_ver); int dpmcp_reset(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/* IRQ */ -/* IRQ Index */ -#define DPMCP_IRQ_INDEX 0 -/* irq event - Indicates that the link state changed */ -#define DPMCP_IRQ_EVENT_CMD_DONE 0x00000001 - -/** - * struct dpmcp_irq_cfg - IRQ configuration - * @paddr: Address that must be written to signal a message-based interrupt - * @val: Value to write into irq_addr address - * @irq_num: A user defined number associated with this IRQ - */ -struct dpmcp_irq_cfg { - u64 paddr; - u32 val; - int irq_num; -}; - -int dpmcp_set_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - struct dpmcp_irq_cfg *irq_cfg); - -int dpmcp_get_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - int *type, - struct dpmcp_irq_cfg *irq_cfg); - -int dpmcp_set_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 en); - -int dpmcp_get_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 *en); - -int dpmcp_set_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 mask); - -int dpmcp_get_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *mask); - -int dpmcp_get_irq_status(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *status); - -/** - * struct dpmcp_attr - Structure representing DPMCP attributes - * @id: DPMCP object ID - */ -struct dpmcp_attr { - int id; -}; - -int dpmcp_get_attributes(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - struct dpmcp_attr *attr); - #endif /* __FSL_DPMCP_H */