Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751486AbeAPNT0 (ORCPT + 1 other); Tue, 16 Jan 2018 08:19:26 -0500 Received: from mail-by2nam01on0053.outbound.protection.outlook.com ([104.47.34.53]:5392 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750822AbeAPNTX (ORCPT ); Tue, 16 Jan 2018 08:19:23 -0500 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; lists.infradead.org; dkim=none (message not signed) header.d=none;lists.infradead.org; dmarc=fail action=none header.from=nxp.com; From: Bogdan Purcareata To: , , CC: , , , , , , , , , , , , , Subject: [PATCH 1/8] staging: fsl-mc: Cleanup dprc and dpmcp header files Date: Tue, 16 Jan 2018 15:19:03 +0200 Message-ID: <1516108750-24938-2-git-send-email-bogdan.purcareata@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516108750-24938-1-git-send-email-bogdan.purcareata@nxp.com> References: <1516108750-24938-1-git-send-email-bogdan.purcareata@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131605823613646102;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(39380400002)(396003)(346002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(50466002)(106466001)(6636002)(6666003)(305945005)(105606002)(16586007)(8936002)(77096006)(54906003)(2950100002)(59450400001)(50226002)(8656006)(5660300001)(356003)(48376002)(7416002)(110136005)(316002)(104016004)(47776003)(68736007)(76176011)(8676002)(39060400002)(2906002)(97736004)(4326008)(53936002)(575784001)(498600001)(85426001)(49486002)(51416003)(2201001)(36756003)(81166006)(86362001)(81156014)(26005);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB2364;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC007;1:CAPVyow579tpXimX+DAmSuriDnMYmiXMod3y5J0gy5m2V55OLTbKqytmfuFPQKfYXBU/nVrwF6eZkoxgE1RYlBlCrMpj6SVak1AtGKtMUvHmp7PeGlK+V+Lk3WVIxXQa MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1ad8302-816c-4c99-3516-08d55ce3c154 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(5600026)(4604075)(2017052603307);SRVR:CY1PR03MB2364; X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2364;3:UKm003Zif8lfcvyyrcrm3k0AS8ygOFj/bXJpuNc4ABtf1wIXMqCUVWrfp428RqO6yLJrjKfF0CeLVaWyN7R+5n6iODVsMzhiXu4m5TxkpUmBNy9ZAxV7jeq3jW8lKVwSpEES85LfQO9wcLFQHRHLQzsCG9qOf0XMRGVIzO1n9Snd1iGj0OdXQQ5VFAppNgmphMaOibKlo2p32y8fuTDFjRNk7K8CefUWngmTUU8D06Nth/qP7ojkl7lI9KlMddVwUqBmZW7omxdFFHahHAz2GxE5s8WkfDxVwi9qVdIzST734N1dGhFYR/B60ibLKdSOxXiN6JbU0qAaSQIOeql5de1oa5kz/axgbyN6NaBnIVo=;25:yxMwulWAKwWG7y3chU1/7tec858yK+lHCkd8NmqEGjNh+yKdJftmfXtcJuS9GEAhijkRLRqA/XLhyv5cWOAqLAT5ibGicFVPCLtm/WRkEl2LDeMgDy8C+pEgNuEuDKYFNZETYKX5u7D9Nfa+nDiOAMACyp2GkVkpvlrvrUAJvvCeTwt7l09gtyMDT56kJChTq5ZhEhapbNwudJsW+zRduSVdvCvO8Jqnd2tvGuOOOz7rpe+TMIPGmXFPY/Kr6LHt4iozi0Z+VDO0HWzrRa8LpdaqZOoP8cT25h074sCrbrZi+3y6lXXAw9Pl46iGONLGYIaDAvMPgqY+LfUOzOG7gA== X-MS-TrafficTypeDiagnostic: CY1PR03MB2364: X-Microsoft-Exchange-Diagnostics: 1;CY1PR03MB2364;31:Y33C98mQEtasyJDKk4smUeeo28/MBQvzCDvX1hARFeOwK08m7a+Qnhrw+KwivX0jDBxe/Rz2HanfnjmPW7YyEfWA4bkGgUcXGDf/5c+d7osTRjvTCCl0owDGem7wZUaVnLwZ2AU+MdJw7oAYOGRFzelwxeGPkH0KajIodlsmVoUVwiaMc2XOm/V1BSdUjnA+p5P55D+0VsLLC4MLioxPpbtN7QI+Eeda91jQCS0DVSY=;4:dZaxigGpPL68FMysDkN7E0+8IySix2rmc2NXDp5LfYb5WELvc8SqzvOweVp1yYperKt6NsybZiS6DxHFKEfRR5x1LAuJTNpulB/CwdtlsTrJuThEBjJhDmsE3I4PA2Ur2PQr4dwhGacKq0pVhUN2rV60uFOZb16VQCQIt+9u4hX65ueZRaE7ZgyAKiu0jOaylq03uHEaJ3ldpm/qPbL0FD5lBk05KxqbjhpT38AIf01ks1xiEBk2tf+HH66zpXZjQd141mu8eJeIaUbprwG506Wlb3HbmBMTRhqhXF+sN9WiHF3JUUHo9zzYUykpfuROJOQH69YNwaRGfxje6YIgsOpFl2kRRPWyhUAgdegKpOo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231023)(944501161)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123565025)(20161123563025)(20161123561025)(20161123559100)(201708071742011);SRVR:CY1PR03MB2364;BCL:0;PCL:0;RULEID:(100000803101)(100110400095)(400006);SRVR:CY1PR03MB2364; X-Forefront-PRVS: 0554B1F54F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR03MB2364;23:m+5eyCS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A8RA6ur+HQ1kHnbm3Xieics9uWgqEGxmBlGllYXY5awy1zSQw4SAe/f3l5IJV+Srd8v/3Uj7OkXk6I=;7:OaMesU/YQe9PrKvMilV4KV2RwMU2GvO7xYQ9hpDBYYAn0+9FvF1a8XChaizd0cypRh0bjNvkbQyjO4wgIxKYL++An8dEi+yQZOwloUTIz3yHm+M/Qkbp0Ew1+53nOGVDFz+zwteLE8kbiSlb8FsZm1Ky2JYv+tjgExp+tPlM+7xKsM5LuaPejtOFQmiK0zyprFPS2SWNiIi8AMcilk1LmzomZLePYVFbViHP5U7ZBydGeyf9Fj9FIo1NFRw0tOqV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 13:19:21.0370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1ad8302-816c-4c99-3516-08d55ce3c154 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: CY1PR03MB2364 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: A lot of API and associated structures are not used by current code, so remove them. Signed-off-by: Bogdan Purcareata Reviewed-by: Laurentiu Tudor --- drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 2 - drivers/staging/fsl-mc/bus/dpmcp.c | 32 ---- drivers/staging/fsl-mc/bus/dpmcp.h | 5 - drivers/staging/fsl-mc/bus/dprc-cmd.h | 263 --------------------------------- drivers/staging/fsl-mc/bus/dprc.c | 224 ---------------------------- drivers/staging/fsl-mc/bus/dprc.h | 65 -------- 6 files changed, 591 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h index 861b2a7..60fff6f 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h +++ b/drivers/staging/fsl-mc/bus/dpmcp-cmd.h @@ -45,8 +45,6 @@ /* Command IDs */ #define DPMCP_CMDID_CLOSE DPMCP_CMD(0x800) #define DPMCP_CMDID_OPEN DPMCP_CMD(0x80b) -#define DPMCP_CMDID_GET_API_VERSION DPMCP_CMD(0xa0b) - #define DPMCP_CMDID_RESET DPMCP_CMD(0x005) struct dpmcp_cmd_open { diff --git a/drivers/staging/fsl-mc/bus/dpmcp.c b/drivers/staging/fsl-mc/bus/dpmcp.c index eea42f6..2989cc4 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.c +++ b/drivers/staging/fsl-mc/bus/dpmcp.c @@ -124,35 +124,3 @@ int dpmcp_reset(struct fsl_mc_io *mc_io, /* send command to mc*/ return mc_send_command(mc_io, &cmd); } - -/** - * 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_' - * @major_ver: Major version of Data Path Management Command Portal API - * @minor_ver: Minor version of Data Path Management Command Portal API - * - * Return: '0' on Success; Error code otherwise. - */ -int dpmcp_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(DPMCP_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; -} diff --git a/drivers/staging/fsl-mc/bus/dpmcp.h b/drivers/staging/fsl-mc/bus/dpmcp.h index f616031..873a4d0 100644 --- a/drivers/staging/fsl-mc/bus/dpmcp.h +++ b/drivers/staging/fsl-mc/bus/dpmcp.h @@ -48,11 +48,6 @@ int dpmcp_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -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); diff --git a/drivers/staging/fsl-mc/bus/dprc-cmd.h b/drivers/staging/fsl-mc/bus/dprc-cmd.h index d9b2dcd..ab13175 100644 --- a/drivers/staging/fsl-mc/bus/dprc-cmd.h +++ b/drivers/staging/fsl-mc/bus/dprc-cmd.h @@ -58,56 +58,21 @@ #define DPRC_CMDID_GET_ATTR DPRC_CMD(0x004) #define DPRC_CMDID_SET_IRQ DPRC_CMD(0x010) -#define DPRC_CMDID_GET_IRQ DPRC_CMD(0x011) #define DPRC_CMDID_SET_IRQ_ENABLE DPRC_CMD(0x012) -#define DPRC_CMDID_GET_IRQ_ENABLE DPRC_CMD(0x013) #define DPRC_CMDID_SET_IRQ_MASK DPRC_CMD(0x014) -#define DPRC_CMDID_GET_IRQ_MASK DPRC_CMD(0x015) #define DPRC_CMDID_GET_IRQ_STATUS DPRC_CMD(0x016) #define DPRC_CMDID_CLEAR_IRQ_STATUS DPRC_CMD(0x017) #define DPRC_CMDID_GET_CONT_ID DPRC_CMD(0x830) #define DPRC_CMDID_GET_OBJ_COUNT DPRC_CMD(0x159) #define DPRC_CMDID_GET_OBJ DPRC_CMD(0x15A) -#define DPRC_CMDID_GET_RES_COUNT DPRC_CMD(0x15B) #define DPRC_CMDID_GET_OBJ_REG DPRC_CMD(0x15E) #define DPRC_CMDID_SET_OBJ_IRQ DPRC_CMD(0x15F) -#define DPRC_CMDID_GET_OBJ_IRQ DPRC_CMD(0x160) struct dprc_cmd_open { __le32 container_id; }; -struct dprc_cmd_create_container { - /* cmd word 0 */ - __le32 options; - __le16 icid; - __le16 pad0; - /* cmd word 1 */ - __le32 pad1; - __le32 portal_id; - /* cmd words 2-3 */ - u8 label[16]; -}; - -struct dprc_rsp_create_container { - /* response word 0 */ - __le64 pad0; - /* response word 1 */ - __le32 child_container_id; - __le32 pad1; - /* response word 2 */ - __le64 child_portal_addr; -}; - -struct dprc_cmd_destroy_container { - __le32 child_container_id; -}; - -struct dprc_cmd_reset_container { - __le32 child_container_id; -}; - struct dprc_cmd_set_irq { /* cmd word 0 */ __le32 irq_val; @@ -119,22 +84,6 @@ struct dprc_cmd_set_irq { __le32 irq_num; }; -struct dprc_cmd_get_irq { - __le32 pad; - u8 irq_index; -}; - -struct dprc_rsp_get_irq { - /* response word 0 */ - __le32 irq_val; - __le32 pad; - /* response word 1 */ - __le64 irq_addr; - /* response word 2 */ - __le32 irq_num; - __le32 type; -}; - #define DPRC_ENABLE 0x1 struct dprc_cmd_set_irq_enable { @@ -143,29 +92,11 @@ struct dprc_cmd_set_irq_enable { u8 irq_index; }; -struct dprc_cmd_get_irq_enable { - __le32 pad; - u8 irq_index; -}; - -struct dprc_rsp_get_irq_enable { - u8 enabled; -}; - struct dprc_cmd_set_irq_mask { __le32 mask; u8 irq_index; }; -struct dprc_cmd_get_irq_mask { - __le32 pad; - u8 irq_index; -}; - -struct dprc_rsp_get_irq_mask { - __le32 mask; -}; - struct dprc_cmd_get_irq_status { __le32 status; u8 irq_index; @@ -190,65 +121,6 @@ struct dprc_rsp_get_attributes { __le32 portal_id; }; -struct dprc_cmd_set_res_quota { - /* cmd word 0 */ - __le32 child_container_id; - __le16 quota; - __le16 pad; - /* cmd words 1-2 */ - u8 type[16]; -}; - -struct dprc_cmd_get_res_quota { - /* cmd word 0 */ - __le32 child_container_id; - __le32 pad; - /* cmd word 1-2 */ - u8 type[16]; -}; - -struct dprc_rsp_get_res_quota { - __le32 pad; - __le16 quota; -}; - -struct dprc_cmd_assign { - /* cmd word 0 */ - __le32 container_id; - __le32 options; - /* cmd word 1 */ - __le32 num; - __le32 id_base_align; - /* cmd word 2-3 */ - u8 type[16]; -}; - -struct dprc_cmd_unassign { - /* cmd word 0 */ - __le32 child_container_id; - __le32 options; - /* cmd word 1 */ - __le32 num; - __le32 id_base_align; - /* cmd word 2-3 */ - u8 type[16]; -}; - -struct dprc_rsp_get_pool_count { - __le32 pool_count; -}; - -struct dprc_cmd_get_pool { - __le32 pool_index; -}; - -struct dprc_rsp_get_pool { - /* response word 0 */ - __le64 pad; - /* response word 1-2 */ - u8 type[16]; -}; - struct dprc_rsp_get_obj_count { __le32 pad; __le32 obj_count; @@ -278,67 +150,6 @@ struct dprc_rsp_get_obj { u8 label[16]; }; -struct dprc_cmd_get_obj_desc { - /* cmd word 0 */ - __le32 obj_id; - __le32 pad; - /* cmd word 1-2 */ - u8 type[16]; -}; - -struct dprc_rsp_get_obj_desc { - /* response word 0 */ - __le32 pad0; - __le32 id; - /* response word 1 */ - __le16 vendor; - u8 irq_count; - u8 region_count; - __le32 state; - /* response word 2 */ - __le16 version_major; - __le16 version_minor; - __le16 flags; - __le16 pad1; - /* response word 3-4 */ - u8 type[16]; - /* response word 5-6 */ - u8 label[16]; -}; - -struct dprc_cmd_get_res_count { - /* cmd word 0 */ - __le64 pad; - /* cmd word 1-2 */ - u8 type[16]; -}; - -struct dprc_rsp_get_res_count { - __le32 res_count; -}; - -struct dprc_cmd_get_res_ids { - /* cmd word 0 */ - u8 pad0[5]; - u8 iter_status; - __le16 pad1; - /* cmd word 1 */ - __le32 base_id; - __le32 last_id; - /* cmd word 2-3 */ - u8 type[16]; -}; - -struct dprc_rsp_get_res_ids { - /* response word 0 */ - u8 pad0[5]; - u8 iter_status; - __le16 pad1; - /* response word 1 */ - __le32 base_id; - __le32 last_id; -}; - struct dprc_cmd_get_obj_region { /* cmd word 0 */ __le32 obj_id; @@ -360,16 +171,6 @@ struct dprc_rsp_get_obj_region { __le32 size; }; -struct dprc_cmd_set_obj_label { - /* cmd word 0 */ - __le32 obj_id; - __le32 pad; - /* cmd word 1-2 */ - u8 label[16]; - /* cmd word 3-4 */ - u8 obj_type[16]; -}; - struct dprc_cmd_set_obj_irq { /* cmd word 0 */ __le32 irq_val; @@ -384,68 +185,4 @@ struct dprc_cmd_set_obj_irq { u8 obj_type[16]; }; -struct dprc_cmd_get_obj_irq { - /* cmd word 0 */ - __le32 obj_id; - u8 irq_index; - u8 pad[3]; - /* cmd word 1-2 */ - u8 obj_type[16]; -}; - -struct dprc_rsp_get_obj_irq { - /* response word 0 */ - __le32 irq_val; - __le32 pad; - /* response word 1 */ - __le64 irq_addr; - /* response word 2 */ - __le32 irq_num; - __le32 type; -}; - -struct dprc_cmd_connect { - /* cmd word 0 */ - __le32 ep1_id; - __le32 ep1_interface_id; - /* cmd word 1 */ - __le32 ep2_id; - __le32 ep2_interface_id; - /* cmd word 2-3 */ - u8 ep1_type[16]; - /* cmd word 4 */ - __le32 max_rate; - __le32 committed_rate; - /* cmd word 5-6 */ - u8 ep2_type[16]; -}; - -struct dprc_cmd_disconnect { - /* cmd word 0 */ - __le32 id; - __le32 interface_id; - /* cmd word 1-2 */ - u8 type[16]; -}; - -struct dprc_cmd_get_connection { - /* cmd word 0 */ - __le32 ep1_id; - __le32 ep1_interface_id; - /* cmd word 1-2 */ - u8 ep1_type[16]; -}; - -struct dprc_rsp_get_connection { - /* response word 0-2 */ - __le64 pad[3]; - /* response word 3 */ - __le32 ep2_id; - __le32 ep2_interface_id; - /* response word 4-5 */ - u8 ep2_type[16]; - /* response word 6 */ - __le32 state; -}; - #endif /* _FSL_DPRC_CMD_H */ diff --git a/drivers/staging/fsl-mc/bus/dprc.c b/drivers/staging/fsl-mc/bus/dprc.c index f29ea3e..094f151 100644 --- a/drivers/staging/fsl-mc/bus/dprc.c +++ b/drivers/staging/fsl-mc/bus/dprc.c @@ -100,52 +100,6 @@ int dprc_close(struct fsl_mc_io *mc_io, EXPORT_SYMBOL_GPL(dprc_close); /** - * dprc_get_irq() - Get IRQ information from the DPRC. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPRC 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 dprc_get_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - int *type, - struct dprc_irq_cfg *irq_cfg) -{ - struct mc_command cmd = { 0 }; - struct dprc_cmd_get_irq *cmd_params; - struct dprc_rsp_get_irq *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_IRQ, - cmd_flags, - token); - cmd_params = (struct dprc_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 dprc_rsp_get_irq *)cmd.params; - irq_cfg->val = le32_to_cpu(rsp_params->irq_val); - irq_cfg->paddr = le64_to_cpu(rsp_params->irq_addr); - irq_cfg->irq_num = le32_to_cpu(rsp_params->irq_num); - *type = le32_to_cpu(rsp_params->type); - - return 0; -} - -/** * dprc_set_irq() - Set IRQ information for the DPRC 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_' @@ -179,45 +133,6 @@ int dprc_set_irq(struct fsl_mc_io *mc_io, } /** - * dprc_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 DPRC object - * @irq_index: The interrupt index to configure - * @en: Returned interrupt state - enable = 1, disable = 0 - * - * Return: '0' on Success; Error code otherwise. - */ -int dprc_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 dprc_cmd_get_irq_enable *cmd_params; - struct dprc_rsp_get_irq_enable *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_IRQ_ENABLE, - cmd_flags, token); - cmd_params = (struct dprc_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 dprc_rsp_get_irq_enable *)cmd.params; - *en = rsp_params->enabled & DPRC_ENABLE; - - return 0; -} - -/** * dprc_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_' @@ -253,48 +168,6 @@ int dprc_set_irq_enable(struct fsl_mc_io *mc_io, } /** - * dprc_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 DPRC 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 dprc_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 dprc_cmd_get_irq_mask *cmd_params; - struct dprc_rsp_get_irq_mask *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_IRQ_MASK, - cmd_flags, token); - cmd_params = (struct dprc_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 dprc_rsp_get_irq_mask *)cmd.params; - *mask = le32_to_cpu(rsp_params->mask); - - return 0; -} - -/** * dprc_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_' @@ -575,103 +448,6 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io, EXPORT_SYMBOL_GPL(dprc_set_obj_irq); /** - * dprc_get_obj_irq() - Get IRQ information from 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 DPRC object - * @obj_type: Type od the object to get its IRQ - * @obj_id: ID of the object to get its IRQ - * @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: The returned IRQ attributes - * - * Return: '0' on Success; Error code otherwise. - */ -int dprc_get_obj_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - char *obj_type, - int obj_id, - u8 irq_index, - int *type, - struct dprc_irq_cfg *irq_cfg) -{ - struct mc_command cmd = { 0 }; - struct dprc_cmd_get_obj_irq *cmd_params; - struct dprc_rsp_get_obj_irq *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_IRQ, - cmd_flags, - token); - cmd_params = (struct dprc_cmd_get_obj_irq *)cmd.params; - cmd_params->obj_id = cpu_to_le32(obj_id); - cmd_params->irq_index = irq_index; - strncpy(cmd_params->obj_type, obj_type, 16); - cmd_params->obj_type[15] = '\0'; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dprc_rsp_get_obj_irq *)cmd.params; - irq_cfg->val = le32_to_cpu(rsp_params->irq_val); - irq_cfg->paddr = le64_to_cpu(rsp_params->irq_addr); - irq_cfg->irq_num = le32_to_cpu(rsp_params->irq_num); - *type = le32_to_cpu(rsp_params->type); - - return 0; -} -EXPORT_SYMBOL_GPL(dprc_get_obj_irq); - -/** - * dprc_get_res_count() - Obtains the number of free resources that are assigned - * to this container, by pool type - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPRC object - * @type: pool type - * @res_count: Returned number of free resources of the given - * resource type that are assigned to this DPRC - * - * Return: '0' on Success; Error code otherwise. - */ -int dprc_get_res_count(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - char *type, - int *res_count) -{ - struct mc_command cmd = { 0 }; - struct dprc_cmd_get_res_count *cmd_params; - struct dprc_rsp_get_res_count *rsp_params; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_RES_COUNT, - cmd_flags, token); - cmd_params = (struct dprc_cmd_get_res_count *)cmd.params; - strncpy(cmd_params->type, type, 16); - cmd_params->type[15] = '\0'; - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dprc_rsp_get_res_count *)cmd.params; - *res_count = le32_to_cpu(rsp_params->res_count); - - return 0; -} -EXPORT_SYMBOL_GPL(dprc_get_res_count); - -/** * dprc_get_obj_region() - Get region information for a specified object. * @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/dprc.h b/drivers/staging/fsl-mc/bus/dprc.h index 21295e4..1fd0df8 100644 --- a/drivers/staging/fsl-mc/bus/dprc.h +++ b/drivers/staging/fsl-mc/bus/dprc.h @@ -50,24 +50,12 @@ int dprc_close(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token); -/* IRQ */ - -/* IRQ index */ -#define DPRC_IRQ_INDEX 0 - -/* Number of dprc's IRQs */ -#define DPRC_NUM_OF_IRQS 1 - /* DPRC IRQ events */ /* IRQ event - Indicates that a new object added to the container */ #define DPRC_IRQ_EVENT_OBJ_ADDED 0x00000001 /* IRQ event - Indicates that an object was removed from the container */ #define DPRC_IRQ_EVENT_OBJ_REMOVED 0x00000002 -/* IRQ event - Indicates that resources added to the container */ -#define DPRC_IRQ_EVENT_RES_ADDED 0x00000004 -/* IRQ event - Indicates that resources removed from the container */ -#define DPRC_IRQ_EVENT_RES_REMOVED 0x00000008 /* * IRQ event - Indicates that one of the descendant containers that opened by * this container is destroyed @@ -101,37 +89,18 @@ int dprc_set_irq(struct fsl_mc_io *mc_io, u8 irq_index, struct dprc_irq_cfg *irq_cfg); -int dprc_get_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - int *type, - struct dprc_irq_cfg *irq_cfg); - int dprc_set_irq_enable(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u8 irq_index, u8 en); -int dprc_get_irq_enable(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u8 *en); - int dprc_set_irq_mask(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, u8 irq_index, u32 mask); -int dprc_get_irq_mask(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - u8 irq_index, - u32 *mask); - int dprc_get_irq_status(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, @@ -174,13 +143,6 @@ int dprc_get_obj(struct fsl_mc_io *mc_io, int obj_index, struct fsl_mc_obj_desc *obj_desc); -int dprc_get_obj_desc(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - char *obj_type, - int obj_id, - struct fsl_mc_obj_desc *obj_desc); - int dprc_set_obj_irq(struct fsl_mc_io *mc_io, u32 cmd_flags, u16 token, @@ -189,33 +151,6 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io, u8 irq_index, struct dprc_irq_cfg *irq_cfg); -int dprc_get_obj_irq(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - char *obj_type, - int obj_id, - u8 irq_index, - int *type, - struct dprc_irq_cfg *irq_cfg); - -int dprc_get_res_count(struct fsl_mc_io *mc_io, - u32 cmd_flags, - u16 token, - char *type, - int *res_count); - -/** - * enum dprc_iter_status - Iteration status - * @DPRC_ITER_STATUS_FIRST: Perform first iteration - * @DPRC_ITER_STATUS_MORE: Indicates more/next iteration is needed - * @DPRC_ITER_STATUS_LAST: Indicates last iteration - */ -enum dprc_iter_status { - DPRC_ITER_STATUS_FIRST = 0, - DPRC_ITER_STATUS_MORE = 1, - DPRC_ITER_STATUS_LAST = 2 -}; - /* Region flags */ /* Cacheable - Indicates that region should be mapped as cacheable */ #define DPRC_REGION_CACHEABLE 0x00000001 -- 2.7.4