From patchwork Tue Feb 7 14:15:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9560251 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 3D3E76047A for ; Tue, 7 Feb 2017 14:18:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C19F28426 for ; Tue, 7 Feb 2017 14:18:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2045A28429; Tue, 7 Feb 2017 14:18:32 +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=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 1400B28426 for ; Tue, 7 Feb 2017 14:18:31 +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 1cb6b7-00056j-CD; Tue, 07 Feb 2017 14:18:21 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cb6ZB-000356-3u for linux-arm-kernel@bombadil.infradead.org; Tue, 07 Feb 2017 14:16:21 +0000 Received: from mail-bl2nam02on0048.outbound.protection.outlook.com ([104.47.38.48] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cb6Z4-0007jE-My for linux-arm-kernel@lists.infradead.org; Tue, 07 Feb 2017 14:16:19 +0000 Received: from BN3PR0301CA0037.namprd03.prod.outlook.com (10.160.180.175) by CY4PR03MB2949.namprd03.prod.outlook.com (10.175.116.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.888.16; Tue, 7 Feb 2017 14:15:37 +0000 Received: from BY2FFO11FD043.protection.gbl (2a01:111:f400:7c0c::159) by BN3PR0301CA0037.outlook.office365.com (2a01:111:e400:4000::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.888.16 via Frontend Transport; Tue, 7 Feb 2017 14:15:36 +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 BY2FFO11FD043.mail.protection.outlook.com (10.1.14.228) 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 14:15:35 +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 v17EFXHb023812; Tue, 7 Feb 2017 07:15:34 -0700 From: To: Subject: [PATCH 06/10] staging: fsl-mc: dpmcp: drop unused APIs Date: Tue, 7 Feb 2017 08:15:26 -0600 Message-ID: <20170207141530.12979-7-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170207141530.12979-1-laurentiu.tudor@nxp.com> References: <20170207141530.12979-1-laurentiu.tudor@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131309505358299126; (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)(39400400002)(39410400002)(39380400002)(39850400002)(39840400002)(39450400003)(39860400002)(2980300002)(1110001)(1109001)(339900001)(45074003)(199003)(189002)(626004)(50466002)(77096006)(104016004)(8656002)(47776003)(86152003)(86362001)(33646002)(575784001)(1076002)(53936002)(6916009)(189998001)(54906002)(2950100002)(6666003)(92566002)(5003940100001)(2351001)(81166006)(2876002)(5660300001)(2906002)(4326007)(38730400002)(8936002)(50226002)(50986999)(105606002)(81156014)(97736004)(8676002)(305945005)(356003)(7416002)(68736007)(36756003)(85426001)(48376002)(76176999)(110136004)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2949; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD043; 1:LvnM9yCunDH9+rnW0vgL9quwt0wXEm0J3BPt8M2zkP//RT7e6pA2Y3K15ywAux4tcLciyJ7aPVMvjC8W+FveLTyiIz+umfWj4qHFDCEF/Js7wrin7EJmuV3VvQlvLsfuysbRfrXcAZAF6st5GOzQei8JWcQ+Ws50u1emoO8VgRZ0ZPtoTLiC3HiKTppL6NltPJqp7YvbXjUkHd5uS09BYVimNoCjHKW13OFGQdF+WaX7NPtgpr8DPa96uChJslmOJmepBpExCgmAKkAy38njR8ycBFkfLKnIrmgsPe83yNPBSlVQfRWDJmn6hl77u4Zxmwk8BrSTgaDw7wOrimm/Vdg//nWB+1RM5TZYxVD2HXmxQFFZkEMOdPEWS6WeNQC63VELKNeonnqT2Vs25sQ1Lw4+n4u/pZp6mhYTvxDdtUSVQJnwg0XP7qFgaCYWFWBHFNky+PwC4MlTLe2BPcgqoBS0EH8uFRoIqdPpU72tQaVE5omGLdgtTU/9ANU1GNMCChHyKlMBC4us6fb6D7ZOqzsrDQ4niOu3gPmF0ypQHikdkFaz3JMeXpbNZW1CcRPngMwShnk5oK/JCjMRzGh/apaieChG5C3rcmDRFk3bAJaoQTaemQXX2aGr6J0gnxZXe2nR2Q7FN7/YTmztHhX7upmqV7LHSK9ywy9SjRiX6KeARD3+46mRznpsSiiqbcsunxH8op70+phRpDYSyqSVoYt5UC6ZOm69zx0VkMKFOFtvQj3ayssH9kTSfyTQMJVhWcq+B3D4CIOVoyChRp2urQ== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ab03b556-638f-429b-7ff6-08d44f63c8fa X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY4PR03MB2949; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2949; 3:SFCJoIcp5NFhAGmxC19fENKqXBxg68i3WSeJxDYiVFrH7uMmWIQAf1a1n7DorYXihKdgYme7+RlGf7azbxIKnQjPFxZwjOkJHAitFRP1HRbLlzkGyj3gGozqkAek040AVKYnfN7aFvCWs6HBbY07oySpifVzMhtNZHp+KT65rQbb4/TjAQQQKREmjmroRb/XfQlJxY6Q3TgUQwmQJWwjRfM1OlI9sDg409+3AhetW3m+YZF317++gUQCkrXCR3PB0jQuSh53q5hitvwRgxbvyrTcUNYXG4YSpEPAfCNcUk03oW4hp/YMo1brJzE8memlwcKhoJAbXzNDahTcJTsO23Lstd0weKVePPBT2W1ascz3op1pNFKdY5RTzSArJtJL; 25:nromyLfDPPLzFz8Z0NlUyiqSUCTJKwzZxWItM5NyVyraxBPwuYQmkX6KHMCW3wPBqEqalkg88FfZ2Ei1/z7CnEd0QQGYcRuwV3o7I5ZCRwBuJlGdfpvwDbKWsD/UYL8ufPq2m6FCjZuZCgVjThTp6b8dc69anNySYaa0ciJcuymmHY6b8BdEaJO2RnUMKKRVNmBg8T8xOBG6T4zHzspkyYEL3oHochVg13SFZfNI0Wvn2D0zkcuAe6uABcU/tvSN0uPndDiQ7mBDwxSSAlISsAf4/mCteQRONKWGLQhAJF0BHE8ssK6KP1vPhkSglyQ7SrnPIG8OWgGxJZ9VBY7he0qM8Lw30EtlK6b2nhD/YkDFL8LmCCvk0CGljMiL9auhtrMpgqMjkMEfbrLqOeGSl4Fnj4hP/LzMV9P1f31zELsQGXx/q1OpyEe7yKDbfH71yEIvQdnxUwc8IMX0vcNaEA== X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2949; 31:q/oHVQjMxaMgqmXH8F4vKBq3qJ5qosKituAOOLZFzDdfDKNEqu4xiFdL56pBh+AikU8lS9QPCH5yLfvwxhlJdSZNs7bWPVB9Oe6gSvETle7RVoZmNH6E6OG7B1yovI+75Wn/gpml4NaP7u+ImnjYaC1AOcbZEZpq7WZZaFh5oJEQVsqPFA4E4LKFua0Jo9iDALfUu2nMQdeANQdFKePr2aGVV2onH5kQHDupo3c6Hhx5j3+omsPDBlWbs1x6pAz/TRAp61xM09zIDI1LFPY5FX5pL4S+k/Z/0N7SireNnrU= 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)(13015025)(2017020603029)(8121501046)(13018025)(5005006)(13023025)(13017025)(13024025)(20170203043)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123561025)(20161123559025)(20161123563025)(20161123565025); SRVR:CY4PR03MB2949; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2949; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2949; 4:97GVD+Vw/xNHyjeJRJ5UkrTFXWPQoFddGYHqd0ZEoBOjU+340kM+qqXwTZwMm9XsP838xCZZzSf0E7r60NvONJiRMCy60F2gAKaJ4SZlDsH+gg9kNjgF9D6uiOIqISvm7qPoLQedP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rAD/1zqS3GpcXWuROycleh/; 24:9dXYldEpGQG5TOkMaCWOZ+AbHFSjqJVGQ4s2VLA7FNlkYsgP7g7CoURQKvgvHs/tWovWGn/4QKvS85yRzRHFSGyi8oruSd70Xq5FHqHmdCI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2949; 7:pl+iF3z5lSLHiW+AH7wXYP5eZPPLpO+zim85uS8BmQDGMV2BjdI1b1x/PxsrbJl22VcKCxKpqKRBPhEaNvEQaYi0DTHbDhPXJszqIO+5vlz1su0EZC8Vtm8qXmbLS4mozxwyx19N3eXIAFHyVvyozBkanVvRcAAm5/tD7QCUQSKgH9OS1Oi6r5ySjLyAzQU7sf6Pz+jfRevMK/bxB/imFG76xZ4gQBJbkwEfZgDkGPowdHz+flc8VPT1eLVKjB614baifMJCVITqPW0FkTUZSSf0xttSeK8EdVcTUD6uZkfqx3JoMf9QvzOoR5CMQ4+dvUXGhDA7BYUMCDrZeZoXv9diSXGrevYjuPbh1I+lUtSoMGtb3/Uh1YlS1gaC6Ro/Srun8G29cG6GempUM84jkfrkcx+UnYT6Zx9exYI7u93280bI6DMC0X9V8xs34O9pMRUW7XmwwGXu7rws6KDWWYCPLl4bftaZ9jOh33w9/BppzQNZXxNtDsaNRb91H1r32zdEGRC7biVya8s/fkXmwQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2017 14:15:35.6271 (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: CY4PR03MB2949 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170207_141615_038761_945C006E X-CRM114-Status: GOOD ( 20.70 ) 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 --- 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 */