From patchwork Thu Aug 16 07:06:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D49F14E1 for ; Thu, 16 Aug 2018 07:08:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 877D629EC4 for ; Thu, 16 Aug 2018 07:08:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BA6329EC6; Thu, 16 Aug 2018 07:08:01 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 593EB29EE0 for ; Thu, 16 Aug 2018 07:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389107AbeHPKDX (ORCPT ); Thu, 16 Aug 2018 06:03:23 -0400 Received: from mail-bl2nam02on0042.outbound.protection.outlook.com ([104.47.38.42]:16096 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731283AbeHPKDW (ORCPT ); Thu, 16 Aug 2018 06:03:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3RdaEnYnZvpamD9U4mLYUzFDRVPimdMuveAovnvC6qg=; b=pYR8PD0wT8EvhotbzAMZIx9bz9sIq1NOTQc8ZMeb+fBy+N42cp+GScz8DlLqoIdyJCIbNqlmrT1X3Ik3lGnXhJGgfyN3ApsPOKl/12wLULeSL98BB9C3GB8C0qViNtdgTCdxQ1nF0kLaxjQ0M7MewCt/nFteJsPLGNFgBJuJO2k= Received: from BL0PR02CA0100.namprd02.prod.outlook.com (2603:10b6:208:51::41) by BL0PR02MB4324.namprd02.prod.outlook.com (2603:10b6:208:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.23; Thu, 16 Aug 2018 07:06:55 +0000 Received: from BL2NAM02FT020.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::207) by BL0PR02CA0100.outlook.office365.com (2603:10b6:208:51::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.20 via Frontend Transport; Thu, 16 Aug 2018 07:06:54 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT020.mail.protection.outlook.com (10.152.77.162) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:06:54 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50029 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMt-0007Hc-C2; Thu, 16 Aug 2018 00:06:51 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMo-0000wH-6x; Thu, 16 Aug 2018 00:06:46 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76hC5005091; Thu, 16 Aug 2018 00:06:43 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMl-0000pj-1X; Thu, 16 Aug 2018 00:06:43 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 1/7] firmware: xlnx-zynqmp: Add RPU ioctl enums Date: Thu, 16 Aug 2018 00:06:24 -0700 Message-ID: <1534403190-28523-2-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(396003)(136003)(39850400004)(346002)(2980300002)(438002)(199004)(189003)(426003)(48376002)(106466001)(186003)(26005)(47776003)(76176011)(77096007)(44832011)(63266004)(2906002)(81156014)(81166006)(8676002)(50466002)(356003)(336012)(305945005)(126002)(2616005)(16586007)(446003)(6666003)(486006)(11346002)(476003)(107886003)(50226002)(2201001)(478600001)(9786002)(110136005)(8936002)(54906003)(106002)(316002)(36386004)(7696005)(36756003)(4326008)(5660300001)(51416003)(6636002)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR02MB4324;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT020;1:HS7uarpD7kCbW4GW9faustyA6/yFHL0IhzC1HcpUOB2iuacur58murCRf2k1Y+bGLWY8vx1I2vCFHsHdN17Y6jMQZ5Bu4qv9HdgiSw3pc0Yfu2V+X7mB3o+ru4wpX+Hf MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b3b790b-6dd4-4214-b1d1-08d60346d97c X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4324;3:ARyqHLyEmODIDt/vysYJbQBWFhuWzqMVZzmRBuFWlLaN4VYGvbVbGzMb8NuZYdUWlR42HbVjk1gsCWVycq9tx5lDdqZpJ/3buRBRgFEd0LUW2fSsItBCvgK9Fan6/596PX+9PYIJNhne8ywb925h1BLdPc5EttMx/Uy0llnZU0FBeLAlIlipcemrDDUIcVNlrwJapulbffvneQWb02rxEfe2j0PwGtjGcXnFEEm17lRo6Xf5OBSKo5UzCSz0KnIr60RwqIOpDLhKj3lgUpaT3nAOQTxzJlI2Wg2iOyLsC37zuvpw+ReMltSCuRQzTwRlcsB+/Q74iSbfiP5ERj3UPOV0Y4VJzHuIjwScfNia4q0=;25:92ifwg7qfllfxgFGbkRUjRbLiV9QKgd2f2Y/TyKw4DfFCdoqL9u/JNdqzdfDU1DXiV7NtGl/GkD0ZWGyHMCyi8GQmVMQEGx2KubSlFNtxV5Z5FXE4taDWUeMslbR8UqzgD+7pnHFQjMnhsXf87W3TZmOrL9ZJallEeoy4J38tPqv97xfK+du1iIknN+sDjqj0U8XdRvLEBDAs3ePnsATPEn0lAUBu5JXu9QFMfPqDsyGX56P4HiNbaZokzWOBIrpY37O1BTy35hPymae4SM1S2ouS3+iClBli5HwH/UdA6G3D1/iEBubYAWg4UZUW9q8I6Bbc5kGgYT6fVc6VtDHGA== X-MS-TrafficTypeDiagnostic: BL0PR02MB4324: X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4324;31:dirw12JmKqGJQl9q6OwSeywaN6qiKVg5JXpjl8bBfQCrzLy06OJeivy/vFnROusYFj3tkUWPcyA8W/2dxDzG9AvB0VzlfrhuPqWjNsOQpo+WYW89EQ+KU26F6ZLKsXS+A12HIyU5il3yQ/KhVneYLHRRYUoJcBzdBh65IfSRIfWYkban/WDFvBOxyuZLgViSOAZNux7RV4JyBLGdyghfsmpQ4Ps1TlQAoArersA0S10=;20:Gitr11EuvzVzhMCntGCthAsQRZHffpI5MY3VIGl9L+KsFGI0GZygcJtBnWkhaRCLVXyPkqN33tWmPlpQ8Stht2v+IYonlz6zQ3pIdiiThs9aUb5/cZL9cPWpacWGfLyzB+o0WJvOpXHL9WN553w8xs+nebp0mWgowKmpWrYRUtxSsKm4Qko2b27btYuVlaLalcVA45WR4vFAei3T8cUJS4KUIYv5IADnM4opu1Lup+QeQBNlRnoqP5eR3Z4CothRqE64wLLeZJODjy5qIBLGk+73PrpWjBv6kdqmdjFzSEjq7q35YJH0VdWrsbNy+C61ahsJ2cDUmaMfuJXoe6ODUDPwSi9GxJ2iAd1UzU8EYsnX7pfXZl5tnc3VsqKq9Y8XwiGGv0k+d97MdSOnTdtEDzNk8Q/IUqLGxMXR2HDWDXO54VLwInoljp7j0B0xZ9QVORWuS9atm03F2ht/oopXnqzjARdtBHjPyw+DfMPnp2qMp6CN51aM7u+wb3n2P3V1 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(3002001)(93006095)(93004095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(201708071742011)(7699016);SRVR:BL0PR02MB4324;BCL:0;PCL:0;RULEID:;SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4324;4:q00/ry/lZ8a5/AZdkMyMJbOYXbRjTUQGTc6AlYWa5p17TzmeHE4trwj09VEX5GXj1Vj/O2zXqJPZKLEQ3ay45xXz84fHrPefT3Lkohidjh/AIOIX33cZk0eQLdKm8hWm8lMV7wCAtExNYEoBHCRwXitfyfQxR7m04bE4qRpcD1APaa508vWefF6iBiKL0j3odGUBKTYTtZTyZcQyKUpwtlFZm7Tdib+PjYvJZrgRtEoNDWf6hNbfdbrQ+TR5X+q+WKAjlWZO+V2yUvkR+klSFLOqZPNW7IKxNjpGnSXUpFj1qyjlysl7Y+3jxZ7nYGrj X-Forefront-PRVS: 07665BE9D1 X-Microsoft-Exchange-Diagnostics: 1;BL0PR02MB4324;23:nyjYqwVh+aLk5fH9lg+yppLbshWWv9BmscNFpk4nr3Z/GW1qjxhg+5MZ32in1Gz0GBIJdVVEMsBhT7R2wNXCWyzGnCCn67IAESHxsaIoZdhEsDlIbzakLxFMwgPWWchA7q4Yj2PWwUDyLiU80cjOk97xfxkDcNQZs6HRna45NgwyMAAGe0F1mhF4SpV4DLe4CbfZC+ZJCV5TYbNQsIO4lfy6YusWGvFkg5ivtsvgaSKXZjCLm1cMjINXz8LJ+OlDmUwm9jgJANqpI5B6oF5ix745Tfg1oCVSW3q+E0+k4GaX1aU+zinxJmhk/cd+9JvnJdLi91w3bOG/fK/LKj7jlUlQAkZ/YGReRImS2HpKns+pIr+mES3Q0UNAkxGdm3T5KTkHwEE7wI+U4nydh1nEROQCr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amDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:06:54.9050 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b3b790b-6dd4-4214-b1d1-08d60346d97c X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4324 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add ZynqMP firmware ioctl enums for RPU configuration. Signed-off-by: Wendy Liang --- include/linux/firmware/xlnx-zynqmp.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index a3ef7d6..9c4258f 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -59,6 +59,10 @@ enum pm_ret_status { }; enum pm_ioctl_id { + IOCTL_GET_RPU_OPER_MODE = 0, + IOCTL_SET_RPU_OPER_MODE, + IOCTL_RPU_BOOT_ADDR_CONFIG, + IOCTL_TCM_COMB_CONFIG, IOCTL_SET_PLL_FRAC_MODE = 8, IOCTL_GET_PLL_FRAC_MODE, IOCTL_SET_PLL_FRAC_DATA, @@ -75,6 +79,21 @@ enum pm_query_id { PM_QID_CLOCK_GET_NUM_CLOCKS = 12, }; +enum rpu_oper_mode { + PM_RPU_MODE_LOCKSTEP, + PM_RPU_MODE_SPLIT, +}; + +enum rpu_boot_mem { + PM_RPU_BOOTMEM_LOVEC, + PM_RPU_BOOTMEM_HIVEC, +}; + +enum rpu_tcm_comb { + PM_RPU_TCM_SPLIT, + PM_RPU_TCM_COMB, +}; + /** * struct zynqmp_pm_query_data - PM query data * @qid: query ID From patchwork Thu Aug 16 07:06:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC98114E1 for ; Thu, 16 Aug 2018 07:07:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C70D22AB62 for ; Thu, 16 Aug 2018 07:07:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAEDC2AB66; Thu, 16 Aug 2018 07:07:50 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF922AB62 for ; Thu, 16 Aug 2018 07:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389122AbeHPKDa (ORCPT ); Thu, 16 Aug 2018 06:03:30 -0400 Received: from mail-eopbgr710054.outbound.protection.outlook.com ([40.107.71.54]:43743 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731283AbeHPKD3 (ORCPT ); Thu, 16 Aug 2018 06:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NO9gv99fne8Be+vdIeini6GfrQyf8+i9xQ9DV78ytNM=; b=b2rsXL8ofBR3Z48uzhosorg7Io0LwVkPSNK9rgrtV92wQQQ6h/OLly9z1zTXWRtvuUkMBugsrBmR8BPE728xVA65A0bL1B7oRuz0aaAgZnu3Qz0Je7RZlfItmqmoCfAGLQOcQdCXeS7QTpqF51g9p+h0gy4C36c5nvHoW0oaSto= Received: from BN6PR02CA0044.namprd02.prod.outlook.com (2603:10b6:404:5f::30) by DM6PR02MB4458.namprd02.prod.outlook.com (2603:10b6:5:29::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Thu, 16 Aug 2018 07:07:02 +0000 Received: from BL2NAM02FT033.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::206) by BN6PR02CA0044.outlook.office365.com (2603:10b6:404:5f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.20 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT033.mail.protection.outlook.com (10.152.77.163) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007uJ-OE; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-Ic; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76iNA005139; Thu, 16 Aug 2018 00:06:46 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMm-0000pj-Be; Thu, 16 Aug 2018 00:06:44 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 2/7] firmware: xlnx-zynqmp: Add request ack enums Date: Thu, 16 Aug 2018 00:06:25 -0700 Message-ID: <1534403190-28523-3-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(39860400002)(136003)(396003)(346002)(2980300002)(438002)(189003)(199004)(316002)(50226002)(6636002)(8676002)(8936002)(5660300001)(426003)(478600001)(6666003)(2201001)(44832011)(110136005)(4326008)(16586007)(2906002)(47776003)(81156014)(81166006)(14444005)(476003)(11346002)(126002)(36386004)(446003)(2616005)(48376002)(486006)(7696005)(51416003)(76176011)(106002)(50466002)(54906003)(26005)(36756003)(186003)(305945005)(77096007)(106466001)(336012)(9786002)(356003)(107886003)(63266004)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR02MB4458;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT033;1:cDuTHdF44r2A+4TOupQtAdX3Ex8p9AYMJf6sWx6elkuZ7qcFshw50YlOQ9LiCFrJAywYKAHagk3NNO6EZUPMfwxFgzYwrG+U5nMz3yc7VxA/A6OreYraQQyEl68OwBhb MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d523d215-758f-43b4-94bf-08d60346dde9 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:DM6PR02MB4458; X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4458;3:siw8z1ZS3GYkM7gqjQHkODcwvJgNz4icfeT8p+c+7A8olrZFBv3zjuoJXtZX0t8AkAvMQeezZlawboEQ+/KLatehJT+8Tyb0d//rZjctvD9Z7L/DWWdcdLArknPie+gk3mO17DaEvWGIRwohtgXTA974LAEh7/hXz+b1ZF0kdvyORbN4Ou8bwNgADaTSyNDhiC7zr3w2m97Ycn29Nn5KDdTzTAJ63VeTce1soVAq8cSvgATAWVlOBQ2SxYsCkVCKAwPJ0KHbiiLyZ4lNEIHneh5TSHsZ58Mm4gZflOlfNr0tbxomu03XOUo+G0aT2i0nj+93B+wQDVsWerZ77DR3P6RLo4/Sl2ienGjJvMlowIY=;25:eNCaTiDk7xBwJfifIz7O8YaEtBf8WnSK3Q6S2GVGjQQtTj+rDQIbbvLe9RGtFKDQxJFrspPZKCxrrwt1/GJac5F4bwk4fVueDflZ0Gol2eXUMfNAgAz/IKpZKXQyu3aGnDEa6o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soft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699016);SRVR:DM6PR02MB4458;BCL:0;PCL:0;RULEID:;SRVR:DM6PR02MB4458; X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4458;4:b72TZ2bj8MnRNSI42B+vtQmvV4NwLAaHV7ucrXq0Gq2tO+gni7s1wHSmw/INb1M3vCE4mh2+/46kVMl9v0f2quVMa5U4tszct4UK7fCmnAHJTFCU0axfr1u/tSUFukvcAACEr2s9wCCDehWX3AaU+WL2yYBOFSMZxpeRuOY6w6U9KrS6r4PmvADW4C7DhWi45FaMWGLiOhRoYx10PnG8NnSs+3rWKodKtoLU/g9ZW4895xzrNDC9yRoYSvklnYpM8HerMNf3exZKngkkCnxuA7Zl/5DO80XSeFooYdS7QtfU+x2DbGVX1wyYf+mILBg0 X-Forefront-PRVS: 07665BE9D1 X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4458;23:eY3N2DAtgUW2wIgZD6aArtKZ/w/11K2D/yg7JRM+fRQidzJS1+pC8Cd6GXn9ZpGefuTScuac8nPmFNdxzIMzwAAZAVY/NrEMFM8iIxmoBDey3m27lylIhy2K8r9bCzGdyWtnhQ6cc4YpihE9Kscto8LTRHBCqXxpCrEp+Q0UQ9xnCjk/KBpxMmKpc1LtaHB4rFEIReOiVzfTdc4HdWMsQOWpF9Svk4MU2pw1GMAHZXtiyH/Xu/sURs5AhoRWZmNkzWpT5yKpKGQn6OSnlbasMxsK8iMRsm9+1GnB/dagVOdQZY6+28umss3sc623Ub9s0NWMwmxW3Nysr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Airynvr1uR+gpzKJRXNT9JqRnHwsGQ86oLG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.3451 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d523d215-758f-43b4-94bf-08d60346dde9 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4458 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add firmware request ack enums which will be used in firmware request calls. Signed-off-by: Wendy Liang --- include/linux/firmware/xlnx-zynqmp.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 9c4258f..e3b7292 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -32,6 +32,12 @@ /* Number of 32bits values in payload */ #define PAYLOAD_ARG_CNT 4U +enum zynqmp_pm_request_ack { + ZYNQMP_PM_REQUEST_ACK_NO = 1, + ZYNQMP_PM_REQUEST_ACK_BLOCKING, + ZYNQMP_PM_REQUEST_ACK_NON_BLOCKING, +}; + enum pm_api_id { PM_GET_API_VERSION = 1, PM_IOCTL = 34, From patchwork Thu Aug 16 07:06:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF60E5A4 for ; Thu, 16 Aug 2018 07:07:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DACC829EC2 for ; Thu, 16 Aug 2018 07:07:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD60129EC6; Thu, 16 Aug 2018 07:07:58 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5439929EC2 for ; Thu, 16 Aug 2018 07:07:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389131AbeHPKDa (ORCPT ); Thu, 16 Aug 2018 06:03:30 -0400 Received: from mail-dm3nam03on0044.outbound.protection.outlook.com ([104.47.41.44]:61036 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389124AbeHPKD3 (ORCPT ); Thu, 16 Aug 2018 06:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HzaMtsiYm6GcH5cczvdYtG1Os9UG29mMMxSqhQyL9hw=; b=o9LSYQdqwiWjMIUqp/HhS0uL1H7s8VLDW7W2gQ3QsAHHbOZTOwgLI/+ENJcsZxGukOKR9kypdRACtI1O5OHJXkd2QgusYLaJumNQ49qwEwJpth02iexCWCxQZ8K6JgPSz316SCqSn0Gti4s3tx2ccnmvYKZ9wG7Sm4L5f6Gn+64= Received: from CY4PR02CA0045.namprd02.prod.outlook.com (2603:10b6:903:117::31) by BYAPR02MB4326.namprd02.prod.outlook.com (2603:10b6:a03:56::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.25; Thu, 16 Aug 2018 07:07:03 +0000 Received: from CY1NAM02FT058.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::205) by CY4PR02CA0045.outlook.office365.com (2603:10b6:903:117::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.19 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT058.mail.protection.outlook.com (10.152.74.149) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50220 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007Ho-KK; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-FK; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76jCc005161; Thu, 16 Aug 2018 00:06:46 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMn-0000pj-K2; Thu, 16 Aug 2018 00:06:45 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 3/7] firmware: xilinx-zynqmp: Add request access capability macro Date: Thu, 16 Aug 2018 00:06:26 -0700 Message-ID: <1534403190-28523-4-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(136003)(376002)(346002)(39860400002)(2980300002)(438002)(199004)(189003)(50226002)(16586007)(36756003)(54906003)(4326008)(26005)(106002)(110136005)(316002)(63266004)(186003)(77096007)(8936002)(336012)(126002)(2616005)(11346002)(426003)(14444005)(7696005)(47776003)(9786002)(476003)(107886003)(486006)(76176011)(446003)(51416003)(44832011)(2201001)(6636002)(2906002)(8676002)(36386004)(81166006)(356003)(5660300001)(106466001)(6666003)(305945005)(50466002)(478600001)(48376002)(81156014)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR02MB4326;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT058;1:DvqM2wrQ/yW7UlhygmBlAd6Rb4h8sQHNwTxzeietTMjBtj6pBdHDxnng7x/XL/ux8zYz/UudHpJDsSJxPayiBmzd9bvz3jJet8/N9qSJCSkvVtaaiRJiTAaeIRLGZcqE MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dfd32b5d-9228-420c-64a4-08d60346dded X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:BYAPR02MB4326; X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4326;3:+qkfq80Vcc+Q7Itw5dfSVXYHIweLBIfjxbsDQKJ1f3TBidOeiUXbwozLtFL8Cr+ujS9Mhsu6o6HTF3k7vZSTkuvHdJGTa4HG/AKnVWrtrtp44NBLcP84xFj1RaOo76jblNi/35GUiCnvDtReKqHbKM8grCOJUVhGZEY8H4E3JIuUo60wtaf0tuTBiABpkB0kklWgI/0m1nhKW/0Xvtm6TD4sPntBV2BkUyctNgc51zjQ7F6P0Ny6N8LSzulsJZima/ZpmgdBJNUCUYkw4MUwcAvggpMnPojT1Avs4T/I3RDqxQikS0LqKdSl+r80yu437BdS3/GC3bg2W9fj3Kpevmbfd4CERMeaM959eNkpF7M=;25:czxDmSJ2kxpSZcyyWCMk0lNvPRXp+LmGYw7nGkeXZbHKJ9A0nazNJQA5cCfumcYpkRX/6vxOohhiM8E0aTS9BNA5emDstsVG4WEt2lDcN7RuoqBCYjzNsSQIGUxUl3PefC1z4xVR/VFbaOC0RJ6RKr5JtavLTmrYV1bKg/xkMCw9JWCjIcrLQI0S7LcmIZheT+JRemup0L4oND7KDtC21INXhYvakcsZGzikPp+hm/48Sz68vTZBUhOgkBv1cXW1y2VdBI0PKuQnsMoi3+5BtEGMt+oQRe9YUz6tns/IqVgYMnQ0HhUxX7STEB1sULws5llZXsxmkW9q3uByHbCiZQ== X-MS-TrafficTypeDiagnostic: BYAPR02MB4326: X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4326;31:RFZivNCScT+7nM5e5uMiVVjP/w2k3KEwIOYCIIidcBOT6o9Cda7E53fGYInnU2w/6KY5pBe46m0kMMUAopzQmMHzPqyxiyt0+QcPngrpkyHie6ik5yviFmwC2C5Xjgfk3rS8jcb98H/3qnBrvpDIcjN9peKh05JMS5cdhgxwKIo5k8MQ9ZwEZ9gJFGrRbywnGGFEK00MxQgvxexeUQixKamUM+WtIhgUPgejbQLB7hY=;20:x+KPgcHd72gumQYpDp7xN6ic7e8ITWK8v39mtGF/GmPdbHq2mbw0A0ok0rDFOBAE1iAJSBqWCyIMD2bikT8TKy60qGz9TKPcdjcrMDmqxnHdCkvAycFdgC3OuUeXmMUsM5pZWHOpSg2G/So9yJTg8IgQLaIJLpY1wHJA/2IFdNl2s25Ol9fVUkUvmZIis20QgBjy+ZrOr9rwOflKL99pzf//7LXj97VeyU+mpxbQsRiLj8NVVYXvx6muANiFpGc4TrqMPKQqMXilB7hRf8e7M9Cc8gf27dKuIvz8vV95AeXXvmpmZRS7jisQi9SerND/UxAWYBWbyjqe+jadgls2fvJqg5EW7cTDBcmh0OmdRsuxtBvIGfNVcjuEn2GZSdOijEXXApXz7GSCP93YYJdkmfZo6qOQqn9r3cyMgAElNnvJ+2kMQgmCbwbWzwpXIjXYKX1QBAlYlSOuxCAT7kmpldSv/eipuiUqutCUXHVKemcv1pdclBNfLYEGiSu9l4Wc X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699016);SRVR:BYAPR02MB4326;BCL:0;PCL:0;RULEID:;SRVR:BYAPR02MB4326; X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4326;4:S9oS1mQnV1aNsPYHZy58S6UOYoGI9i97d+3+wjBBbltpzqho+ivune/SzkoWbcB8SU2OWuF7Sz5UsLIQZksB15LVW8CE4ZVtwdjikqK5asY0pM0/GMPYzFCznmg7+N2qzuf6bYhoemXd+vMYPnT8c07kR0/SOH5hO611TazoQNHRRukGXZ4hniYvJllfLb+Ym5Crdkfv3kqars0ImuZvj8UydX4TprglT+tPhuwTydz43CAPWTJXqCGphqJGderEFtnIo577TJNSrn2EXqsDyVKvr7cSJcfL/EXaD099zeeuooIwaJNaB186lTA28ua7 X-Forefront-PRVS: 07665BE9D1 X-Microsoft-Exchange-Diagnostics: 1;BYAPR02MB4326;23:uMBsn6KpsnMu+YUFm+iczc/Hji3j6XOguREnbsPZlyBeYazoDjGuRH3dgvVko27p04xUMZS4VawFX5rnizV/2RXnBdqWfhA1U7jqnxDHmC5i2dQr+tu0KWPatiYeFJr90NPSeL4iXMviOIpQT+29cPKGBVwayv/vrSOYydD/asaOcpq7GG+nBBarapyhMaKr2IJqYIdkI9pf78QfGZy/NCxcWI8KCBFH0Q1pkNif6i0VO3MOhv4WhklyZcz85KzJyvpdNZ/WwWt48Hu/pppV9UtAkvnq7l7Djx5bSw465xf0qkTQbCEJaxxcuQSH4LFRN9gGQbh3e/gSHR/kd5aKsRzfI/kAmpYr3E3ir3szkqH7L2E5Jus+qXbHpSO9/IY2nTGdjNVD820OT+PVqMBKi3XFu9LGs06pcv5EQyVGjKDLhokl7gKIb0r5HMteN2nW/Yq5LXPmJa88SJvfruemLsfvtXFzaksFX3LXvqP4vG3vTLjAJhyk8DA8yDHFN5kS4+q/D5LxoLtwS4b/NYKCsBH33zQoIe/kDWG/UzLZa+XsjCJ+hV7J7HT8fwvWZLuVffLr6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gFYiuRVWjYF+EUrag59tHj7cYy/Q+50ZmI/r868GcFuVxh85Jnk2a9Ss+2IsjmjLEkpn49mSdk6bjDT7Jkm3ZcqjqvpY6PmimfJUkzr+i0TM6h15II6oq/7/0cAl/sII2YVJ3Ybl+U1A7w16cYPoLLSoPcD/Od8JP0756KBvAwtBqT1birK0JjRKWqhbYABQFLhVlXm+/Ar9g83Fhr1GycA2WXSuen4iLjl7BRHpRpdhIKTyCQ1YsphmhuD05pTwhYmdfe6LX8fej0WqWd8QOKt0SJ2wK6nMmDN7ojpnMrTf6GqPucq7db/k1q0CG92VZd4Ol2BvMtaIvbC1yfzEqrM/fqQgAA3qI3+IVNN112H/GgkSD7f95LXNzqbnloissP/nZIdnhDIvluAfjdPWfKdcJKI3Nopma+SoEcN/AxPD82hMX1q/jw1M3JJqPA==;5:JSXTds63L3/y8Kycgr3+3lOWUZUwAHsn9xrEejFEn8TirVeuI9iN5DAcJDqh1EjpCKC7pnKno3FV7MKGMMLhhxLWUsfb/DWitfEwoKeSk3hKYIuXffCbG0066NMouc0pfqiB3NvqzR+oISg3ivWsi4V/yqlyMYIiIIag4+KkzVs=;7:XQQOCAWxqHgfdDSqadyhBfdHcd+Ucz2CwpBWhisG0lnB4pDIWvmEZIY80PeEY1C3APjgkr/ajtkTxXn9hky9t4aH/qc6p6B+6cOEMIwMs9Q0QF8JzF2priUqUppAfN2twl0RGH5j4sJSOCddsJAwneDXgupV/KEKWGLHyhRi2Fnhuo8D3phcnyKgKfX1VTFNTHfV0exEmtErOnK4IE27Pw30a50fXWrEAnKNcKGUoZiStLh4p7PfdZJXWoVwA2M5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.0889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dfd32b5d-9228-420c-64a4-08d60346dded X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR02MB4326 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add request access capability macro which will be used to request access to a device node from Xilinx firmware. Signed-off-by: Wendy Liang --- include/linux/firmware/xlnx-zynqmp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index e3b7292..83ebadf 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -32,6 +32,9 @@ /* Number of 32bits values in payload */ #define PAYLOAD_ARG_CNT 4U +/* Request capability of a device node */ +#define ZYNQMP_PM_CAPABILITY_ACCESS 0x1U + enum zynqmp_pm_request_ack { ZYNQMP_PM_REQUEST_ACK_NO = 1, ZYNQMP_PM_REQUEST_ACK_BLOCKING, From patchwork Thu Aug 16 07:06:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567025 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D131214E1 for ; Thu, 16 Aug 2018 07:07:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBC562AB62 for ; Thu, 16 Aug 2018 07:07:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF0E82AB66; Thu, 16 Aug 2018 07:07:49 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E85D2AB62 for ; Thu, 16 Aug 2018 07:07:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389211AbeHPKED (ORCPT ); Thu, 16 Aug 2018 06:04:03 -0400 Received: from mail-eopbgr690050.outbound.protection.outlook.com ([40.107.69.50]:17152 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389126AbeHPKDa (ORCPT ); Thu, 16 Aug 2018 06:03:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hzvjgdsoh4VGgAtjmPY+LVxBRdDaPT9HGt6kzW02COk=; b=17b8wrWOkUNpFcRlObjC+8NQ4MrrDy8ofz50AHw/ijEpHw2Osbo2Thak2kVHxYaV8SK9FehyYgOMUU7oOhjvwr9InaYDFL/oTN7kE5rqM1K0RW8WmZutbViCRk/FiJDdkq33jMnqjgu4tQ/qg26c+TlXR/FuNRnHLz6T8pk9cAw= Received: from MWHPR0201CA0080.namprd02.prod.outlook.com (2603:10b6:301:75::21) by MWHPR0201MB3514.namprd02.prod.outlook.com (2603:10b6:301:77::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Thu, 16 Aug 2018 07:07:03 +0000 Received: from BL2NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::201) by MWHPR0201CA0080.outlook.office365.com (2603:10b6:301:75::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.19 via Frontend Transport; Thu, 16 Aug 2018 07:07:03 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by BL2NAM02FT005.mail.protection.outlook.com (10.152.76.252) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50246 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007Hq-Vq; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-QY; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76kAB028379; Thu, 16 Aug 2018 00:06:46 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMo-0000pj-Iv; Thu, 16 Aug 2018 00:06:46 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 4/7] firmware: xlnx-zynqmp: Add request/release node Date: Thu, 16 Aug 2018 00:06:27 -0700 Message-ID: <1534403190-28523-5-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(376002)(136003)(396003)(39860400002)(2980300002)(438002)(189003)(199004)(356003)(50466002)(4326008)(36756003)(316002)(54906003)(76176011)(305945005)(36386004)(51416003)(110136005)(16586007)(11346002)(44832011)(14444005)(426003)(446003)(2616005)(126002)(186003)(486006)(336012)(48376002)(47776003)(6636002)(26005)(107886003)(6666003)(476003)(77096007)(2201001)(8676002)(81156014)(81166006)(106466001)(2906002)(478600001)(8936002)(50226002)(63266004)(7696005)(9786002)(106002)(5660300001)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0201MB3514;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BL2NAM02FT005;1:bv+MaKKYtAZ/9SNEoMtD3iaaZFZfRM8/5rc3ZHpP9W5fVzJgMpCI/7vC3dlc7cWxWLiH2XTrp5obRldBtoqAFrQxodvKlRVLPodcH0IygbKZ5/VnvJRnHSGyHVwTx1mo MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3b041f3a-c37e-47d7-7489-08d60346de18 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:MWHPR0201MB3514; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;3:a6VB30rrt1i57SRNProKdQ6DVZPoPPBCL6tQPBfZSPQSjElrmOte1ydWwVdD+zREXOSXpHz1QO62FyxeDopAjduyoBNIobZnol9FHbr76is3qWzHD/D2erpfcvZAoczg4tyTcDZxiMQaofzdTMp1oGuFZxf+HKKhAmTFbghmhsM2rI83Tg+CzVbEJw8Czn4aiGMBkLkoN9+S77VWJhDuoSw9GY89gy6b0bLl6nw6v1fDMvIyyV5BhWu6v4qPJ6+mrV0AX5zb3WEeCEmPGTcqMlGUDqEnK58g0IBZ7GSR4EphzgfjYowfvBa1kYDR6kX/tivnGD+w3KJlq/7ZJAQJS2st41hT2/saCGtyeX3XuQA=;25:ldN8UKlrnyeo+LJMK6/DD/u+VHdR3GryKclLUaclP/93UC7c6PVbts2Eqx2ukeNXazEGl8fD6g0Z7MkuzWpZPnpTUVr8a2Nb8HiG1YyV+VbPeJl8q19IXvx29O7hpO4ZZn+fURPP0YCYi7pVJNk5PLTur+roOMeTGwQZpbvPHEa2JMfW3x5xiazuzqB2AL9NTpz+W27lxYcTG8Neq6nbhgtFEve0mDnvK7GxJjyi7EVN447uVBZ5IA2camI/0zEbCY00a/UfetbHJYrTRuCCN+JMreaTu/I7IaK91CYs6qj2vkak43UJtKD3IfpRBusU7UzdIyTYM0C4V037zmOx4A== X-MS-TrafficTypeDiagnostic: MWHPR0201MB3514: X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;31:oR/m2d7idvILtpf74pOoMFPBTtPKQQjknKL9lIeAr4U53Be5HCHBlLnzI+cPj+fB8VyGafKGiya2HPmGyLQvjUr/D7IemL9N8M1HiWyP4WZYqc3mrElx0vvp44ki0O80W1Jl5udAU4/7UB2nltMW0VqVb0a0q3dlIXtjtu21zNSJiaf8XIhLVcKSVt15ekrkkEVBYydzKegacfaHZ0iisOX9qVj/sZcr1FWYIiLAuoE=;20:Eb7oxnwAZX5PZ8vRMCChwcYlmuoMeFBh9gxJICIJvWwLom6/b0Ni6FnZw4T2GWECPG9bhnAxqsPMYso2kYbEkA7iybwol+D5UGZQgDpNhwwpnc8CqkbO6OGOw7Wx0I4B2bzAc21p3xrFtg9SgCmTUL8W2fdhgjKlVm1VQWCZ+esUQz/OUvIu/kv3L4YTUTAZW0Mz1FnnWFs1hnyO2kJjE87e+amhnrmrufHAEj8UZ3ufAxsybHJPqJ7BwgLEkdVEdwq+hS/SsNCtyqduxk4+rimT0EwCCcFSPBc43+DfTbA6GUnF5ZOP3tpKCHk17elTjNRSIZTsPTlpITgNjIan2RG328xlXHrb8yziVRwp6Z5ua1D4+onWsSA1xUOI49n6hwYzZPvwy/2utrWU1GDsn37j30UtkCoR4UpERJ5tuSHAy/89dMZQJa5/AUuVQ7FLfikWEuNqFtg80yiJORF0kOqps86fmtWkAUdZKmP3sQsJAmq0KsoQEceR64RWLjel X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016);SRVR:MWHPR0201MB3514;BCL:0;PCL:0;RULEID:;SRVR:MWHPR0201MB3514; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;4:e3p8QnQ8sm3F2QOHjKwaiVNnlRHNkr3K97CicLi0aZUP5DT1M7VgN6Zq4USsp6am/5ZzK/Gtucv/CgMQuCPGUzXEHdZt5u7p6J6gQo+R3uHrE9XKCaZ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7M3N5/+c+QQNNK3BxxCIa07CWw91mvLpdcwlUzbW6RmIIVS85glIqSTTjiwFHStYcP9AuZQfX2v89cyLu4YufCVdbxBguf5MrzFnk/FG7YH2FP7S6/6R658H+W0DgzpaATved13B24JMubOEH1GvW79Re00hgOEG+kFce8daDORtil+JyxJwIRVPnj9xuVQqTZOBA36LEvVNCvxdlN4IypXO+TveDrewjqgYw==;5:i8TzBJNLopINT389kkFeqPuu6pF7UCZjuEQAl9IC5q231bLyNCM1QWyU/mdxU4XMTANuViP/b7L2koQykrcYm/QZ4d7gmFvC8Ro/QStCCEjy2nENHMUaETvsdppA53g9pyZaSmLksk+Uw9LFLSQNRfX3y77PDR0BFrpv1yR0Lvc=;7:k+xfqHlB1MYVue3+mbeueTTfApw82STkDJWpAwGFHFxkmHYR+D1m2rmTUsDVJ35LSQpqHptr61NHyxCSPVFzxR+fHS7mM31RlaIJy9ptsqX37ut/IyuGc35bDD4F9ZIHjnZHwea+DIvzGcwTBkVBC7tF8n3PvGJKjMakThhixV9d+LmcJRKl4cpBQxeSbeZXG+P4dpA1mS0cKzre62gw4krZFY1sBmJw2JVXHhWZL+gs7V/xUtjJD4z/wCvZg8w0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.5742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b041f3a-c37e-47d7-7489-08d60346de18 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3514 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add request/release resource node EEMI operations. Signed-off-by: Wendy Liang --- drivers/firmware/xilinx/zynqmp.c | 30 ++++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 7 +++++++ 2 files changed, 37 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index ce6c746..2e97f60 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -447,6 +447,34 @@ static int zynqmp_pm_clock_getparent(u32 clock_id, u32 *parent_id) return ret; } +/** + * zynqmp_pm_request_node - PM call to request a node with specific capabilities + * @node: Node ID of the slave + * @capabilities: Requested capabilities of the slave + * @qos: Quality of service (not supported) + * @ack: Flag to specify whether acknowledge is requested + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_request_node(const u32 node, const u32 capabilities, + const u32 qos, + const enum zynqmp_pm_request_ack ack) +{ + return zynqmp_pm_invoke_fn(PM_REQUEST_NODE, node, capabilities, + qos, ack, NULL); +} + +/** + * zynqmp_pm_release_node - PM call to release a node + * @node: Node ID of the slave + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_release_node(const u32 node) +{ + return zynqmp_pm_invoke_fn(PM_RELEASE_NODE, node, 0, 0, 0, NULL); +} + static const struct zynqmp_eemi_ops eemi_ops = { .get_api_version = zynqmp_pm_get_api_version, .ioctl = zynqmp_pm_ioctl, @@ -460,6 +488,8 @@ static const struct zynqmp_eemi_ops eemi_ops = { .clock_getrate = zynqmp_pm_clock_getrate, .clock_setparent = zynqmp_pm_clock_setparent, .clock_getparent = zynqmp_pm_clock_getparent, + .request_node = zynqmp_pm_request_node, + .release_node = zynqmp_pm_release_node, }; /** diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 83ebadf..02067a3 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -54,6 +54,8 @@ enum pm_api_id { PM_CLOCK_GETRATE, PM_CLOCK_SETPARENT, PM_CLOCK_GETPARENT, + PM_REQUEST_NODE = 13, + PM_RELEASE_NODE = 14, }; /* PMU-FW return status codes */ @@ -130,6 +132,11 @@ struct zynqmp_eemi_ops { int (*clock_getrate)(u32 clock_id, u64 *rate); int (*clock_setparent)(u32 clock_id, u32 parent_id); int (*clock_getparent)(u32 clock_id, u32 *parent_id); + int (*request_node)(const u32 node, + const u32 capabilities, + const u32 qos, + const enum zynqmp_pm_request_ack ack); + int (*release_node)(const u32 node); }; #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP) From patchwork Thu Aug 16 07:06:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 694EF14E1 for ; Thu, 16 Aug 2018 07:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53F8C29EC2 for ; Thu, 16 Aug 2018 07:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 480D729EC6; Thu, 16 Aug 2018 07:08:00 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7E7529EC2 for ; Thu, 16 Aug 2018 07:07:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389127AbeHPKD3 (ORCPT ); Thu, 16 Aug 2018 06:03:29 -0400 Received: from mail-eopbgr690050.outbound.protection.outlook.com ([40.107.69.50]:17152 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389122AbeHPKD3 (ORCPT ); Thu, 16 Aug 2018 06:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lZp7WUNm4zqCk8btYnfKJfdwp1W27f8Whr6aEPBE93I=; b=IU+ZwKhi3xXhzybG8IwHU92tLYm7HpiOD1esAqtU6oBFSsGFmhnRm1szIyndqm8HU8zdQxvGleOmw60wbLC0dwHdOggRU89kqc77SFDl6l+fql7QZPVHFNcBrhdNMplcnWkP+xceBQwzxjN6b2GD7Q3mVIIEjGe3uSU/QIJvckg= Received: from SN6PR02CA0022.namprd02.prod.outlook.com (2603:10b6:805:a2::35) by MWHPR0201MB3514.namprd02.prod.outlook.com (2603:10b6:301:77::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Thu, 16 Aug 2018 07:07:03 +0000 Received: from CY1NAM02FT061.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::202) by SN6PR02CA0022.outlook.office365.com (2603:10b6:805:a2::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1059.20 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT061.mail.protection.outlook.com (10.152.75.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007uI-JH; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-Dl; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76lqE028381; Thu, 16 Aug 2018 00:06:47 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMp-0000pj-98; Thu, 16 Aug 2018 00:06:47 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 5/7] firmware: xlnx-zynqmp: Add shutdown/wakeup request Date: Thu, 16 Aug 2018 00:06:28 -0700 Message-ID: <1534403190-28523-6-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(376002)(136003)(396003)(39860400002)(2980300002)(438002)(189003)(199004)(356003)(50466002)(4326008)(36756003)(316002)(54906003)(76176011)(305945005)(36386004)(51416003)(110136005)(16586007)(11346002)(44832011)(14444005)(426003)(446003)(2616005)(126002)(186003)(486006)(336012)(48376002)(47776003)(6636002)(26005)(107886003)(6666003)(476003)(77096007)(2201001)(8676002)(81156014)(81166006)(106466001)(2906002)(478600001)(8936002)(50226002)(63266004)(7696005)(9786002)(106002)(5660300001)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0201MB3514;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT061;1:TlTFj4xdVzoLGzmYsmTfrdMQZKK+uzw+7MVlSkm832bpyk3BPM7NmWTzfQTno9OgiJG3HTMb4DjeRGfYl9RbTMKpMfGC5QGkazakaWpi+jdBcEpEsFwRcDE9wvsZw8uR MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e7c68f0-e0cd-4cd6-dd9c-08d60346dded X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:MWHPR0201MB3514; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;3:NuOjHiC0bcfM/TTcGmzGcEnK/hhpuisGe2BW6E/WgMKXzRb1XYjJAMUsqT7uzNlmS5e1RbpbxFFMS5LouvlcP3NKuYZkyastzRMfB6r26Ahq7y9Zf0g8ekstkBv3Utns95PJ0RYaeB/nmygMzx/wRaaCyC+wr1GBzfoeDQ0Nc4xgLhIiZFkWnvubR+SJwxBwuQruXRKnL4GTaVp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Oe6ingvBNDo2jme+AAJU4lrL1P3KMEcyX9F9uFd8XJKL1tM9KRbghhmpm+oTv19+xB7wd20LWr8LRaLFgCaMw8nxqorx2NGPmKTSlvPwmvnwn7uKbw9u5auPFt0UsrjqttQcJ9v2ddhM93sOM2WtgAL5OOoqE1h7giRLsMMeP1Lv5xZ2Hj0MBRpG9MMORdLstiAlO7l4cbv47dFL8EBh/ZHLPSP9qwYPs6MNDE6sshOmwt5pRYNvXXFk1IRSc X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016);SRVR:MWHPR0201MB3514;BCL:0;PCL:0;RULEID:;SRVR:MWHPR0201MB3514; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;4:Ed4Rb5srQNg4nrhQ7u+e87+3YQAEfVpR2gIUbY//shp07PzxnRBBwRVeEKCP9JlrhO+HPd3pgW5q+sL28WmFsQvwUdp435pVdATK7xG6rFTsekx41F6QxsYXuCYiBGUHbb+Id+84IzRMxtMmSMRtmqx6PqAQyjGaVvGTzqgRHnJz1FSrF0Dof++9bySYB6wWuPqWGTI8z7CrRXDhSukbdqPaqPWxqLVW1QWbIOVcLu4QLgZrikxP7+zy/9k3tAPL1l4ncMDjxlDkLJ7Dh7dMdsGTta28kXSrMX/com5ATtXW+g1Qx4b306dG4db6ZLXa X-Forefront-PRVS: 07665BE9D1 X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3514;23:HLK5UVJqkix76cUWwnJ1E6GjjpxLglBpQW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q5S/2LbsoNYiGDD0grZZpQFneanbaTzcc5fmo1xzreG4/rGA7ExfTn3plWGiEvyUBgyDU=;7:ycLlEwEW0mMgr45GjTPip0BCkFcPoI9SvA2a8oTnShzZlruCnBlzYL2EiVsWMe+O4w7vZHFWY75OYfW92B+5H9ELl9v41eJcd+iue6iLFYTobDARrgKqT+GQ/oGUheIZWhV28YBf5ZWF/S7C+B4nL9GQRLzMZ18+XtYBNC38wSti6sCBcR/Dlz8xZjvsxJBlN9OtkA+qqURsToOJD1udfdW+h0VDCJrotJ0zf5EqR92RTxKK8Wcmv8y0or/yWfE1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.0295 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e7c68f0-e0cd-4cd6-dd9c-08d60346dded X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3514 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add shutdown/wakeup a resource eemi operations to shutdown or bringup a resource. Signed-off-by: Wendy Liang --- drivers/firmware/xilinx/zynqmp.c | 35 +++++++++++++++++++++++++++++++++++ include/linux/firmware/xlnx-zynqmp.h | 8 ++++++++ 2 files changed, 43 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index 2e97f60..aa83262 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -475,6 +475,39 @@ static int zynqmp_pm_release_node(const u32 node) return zynqmp_pm_invoke_fn(PM_RELEASE_NODE, node, 0, 0, 0, NULL); } +/** + * zynqmp_pm_force_powerdown - PM call to request for another PU or subsystem to + * be powered down forcefully + * @target: Node ID of the targeted PU or subsystem + * @ack: Flag to specify whether acknowledge is requested + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_force_powerdown(const u32 target, + const enum zynqmp_pm_request_ack ack) +{ + return zynqmp_pm_invoke_fn(PM_FORCE_POWERDOWN, target, ack, 0, 0, NULL); +} + +/** + * zynqmp_pm_request_wakeup - PM call to wake up selected master or subsystem + * @node: Node ID of the master or subsystem + * @set_addr: Specifies whether the address argument is relevant + * @address: Address from which to resume when woken up + * @ack: Flag to specify whether acknowledge requested + * + * Return: Returns status, either success or error+reason + */ +static int zynqmp_pm_request_wakeup(const u32 node, + const bool set_addr, + const u64 address, + const enum zynqmp_pm_request_ack ack) +{ + /* set_addr flag is encoded into 1st bit of address */ + return zynqmp_pm_invoke_fn(PM_REQUEST_WAKEUP, node, address | set_addr, + address >> 32, ack, NULL); +} + static const struct zynqmp_eemi_ops eemi_ops = { .get_api_version = zynqmp_pm_get_api_version, .ioctl = zynqmp_pm_ioctl, @@ -490,6 +523,8 @@ static const struct zynqmp_eemi_ops eemi_ops = { .clock_getparent = zynqmp_pm_clock_getparent, .request_node = zynqmp_pm_request_node, .release_node = zynqmp_pm_release_node, + .force_powerdown = zynqmp_pm_force_powerdown, + .request_wakeup = zynqmp_pm_request_wakeup, }; /** diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h index 02067a3..efc73bc 100644 --- a/include/linux/firmware/xlnx-zynqmp.h +++ b/include/linux/firmware/xlnx-zynqmp.h @@ -54,6 +54,8 @@ enum pm_api_id { PM_CLOCK_GETRATE, PM_CLOCK_SETPARENT, PM_CLOCK_GETPARENT, + PM_FORCE_POWERDOWN = 8, + PM_REQUEST_WAKEUP = 10, PM_REQUEST_NODE = 13, PM_RELEASE_NODE = 14, }; @@ -137,6 +139,12 @@ struct zynqmp_eemi_ops { const u32 qos, const enum zynqmp_pm_request_ack ack); int (*release_node)(const u32 node); + int (*force_powerdown)(const u32 target, + const enum zynqmp_pm_request_ack ack); + int (*request_wakeup)(const u32 node, + const bool set_addr, + const u64 address, + const enum zynqmp_pm_request_ack ack); }; #if IS_REACHABLE(CONFIG_ARCH_ZYNQMP) From patchwork Thu Aug 16 07:06:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD42614E1 for ; Thu, 16 Aug 2018 07:07:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5A8E2AB60 for ; Thu, 16 Aug 2018 07:07:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8BD62AB65; Thu, 16 Aug 2018 07:07:34 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47C682AB60 for ; Thu, 16 Aug 2018 07:07:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389193AbeHPKDr (ORCPT ); Thu, 16 Aug 2018 06:03:47 -0400 Received: from mail-by2nam03on0080.outbound.protection.outlook.com ([104.47.42.80]:57960 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389125AbeHPKDb (ORCPT ); Thu, 16 Aug 2018 06:03:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=quY6qzD9nwm/qmutVepZhhxGZe2/Ceiw1PXj2TOZn18=; b=poIx8WKZjZm/jtror5W9e55GhgDaD1MEJFqDbS4uZBia/NgpeUgm40ISXbp4DRipBwPz/XMPOuuboSwjqa56xUbEYdZB/CohoiCxZFgIET8VUk9rNP+gob4V9Rv7VAk5hIKocl7JMajs+h7cnFl97Vf1z+Qcphv6CU2y+4KCxaE= Received: from SN6PR02CA0013.namprd02.prod.outlook.com (2603:10b6:805:a2::26) by DM6PR02MB4330.namprd02.prod.outlook.com (2603:10b6:5:2a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Thu, 16 Aug 2018 07:07:03 +0000 Received: from CY1NAM02FT055.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by SN6PR02CA0013.outlook.office365.com (2603:10b6:805:a2::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1038.22 via Frontend Transport; Thu, 16 Aug 2018 07:07:03 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT055.mail.protection.outlook.com (10.152.74.80) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007uK-VK; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-P0; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76mQB028389; Thu, 16 Aug 2018 00:06:48 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMq-0000pj-0i; Thu, 16 Aug 2018 00:06:48 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 6/7] remoteproc: Add Xilinx ZynqMP R5 remoteproc Date: Thu, 16 Aug 2018 00:06:29 -0700 Message-ID: <1534403190-28523-7-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(346002)(136003)(396003)(39860400002)(376002)(2980300002)(438002)(189003)(199004)(51234002)(2201001)(36756003)(47776003)(305945005)(575784001)(9786002)(81156014)(2906002)(356003)(81166006)(8676002)(8936002)(44832011)(478600001)(106466001)(50226002)(63266004)(4326008)(107886003)(110136005)(54906003)(50466002)(336012)(16586007)(446003)(486006)(11346002)(5660300001)(48376002)(476003)(2616005)(426003)(106002)(126002)(316002)(6666003)(6636002)(76176011)(36386004)(14444005)(7696005)(77096007)(26005)(186003)(51416003)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR02MB4330;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-83.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT055;1:oUFJC2K4urqULV3/DpuZXF/pRoeYfasfByjHWTgWr7qniyZncGbGRTkuBb4NEV1YvV2iFXEIgFQZR85t9w3Ivy4YvvCrE8Gn5KmSUgGCTOUDT7SoNbxWOFGqDCzm2Gg6 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df8c04f4-dd15-4c23-3d73-08d60346de38 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:DM6PR02MB4330; X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4330;3:WDLriTQsh9h0ARZXt1mQHSEvQ62xom6Hu1i7pBvXHdbBeGILJNEz/SCZxSuke+z2mhClHlWKOtgjE9uET1CuxPvUH4D46d3nDBc9ovv/cUlD8e/zJq4ibrHTG/U8wOnVLuvw0M84lWtIoxyJY+mpKc60S+v2QE7wObJd4+D5Rnf1/zAibcdZm2PHiV1Hvx5iBcyGCOVwjQYU6Xjzx+cTkPLTVEvfDW4Mx8nVfY8gEkMZFX7alrHpuXNWd1NvP7I+07SUmcd/240qiWHo3WyOb187itdWNvDQNdtEm2rPCSTJY3uSTgUjTBh0SyV+5YLGUCl5QqDiO/HT1ku2TScMpdF/7+Yof5GUkdfLsw29CqA=;25:ZZAd9MVt7424lQLmRl1oyJAPctKfSrIOo38S7A5+SKBmVaLOQdgJfFJUm02LcKp4TDMpaOruPtTobE4MI2On7elJpfKQekhtG+MT5slO7WBIqmLAGyEJ9M23u7rTm5z2xT59GRcn+vkOc83q9UhQ46KuQnSyE5cmFiFnxK8Ab/79vTasSZ3FlAwQONw8lSmgzjfuczfMKmqF/tqzHY5pqkYceO/9eQXl9tSHCcKOLEfLpFczZvMV9HcoILNOkl1gJRlqGflGZu5aJ4/J+4OIq29vXq6mJpF9FG/nBRYcubmK8Dg+28zw2IbMvT3MdlEXSlebhpk+VbZ9wXZTtuEpRw== X-MS-TrafficTypeDiagnostic: DM6PR02MB4330: X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4330;31:bxMEqZREiykq7oK+uc+eafT5dlwEBi9hlp9oixm4d1tzExFiliXeSc8lJc7TuSFqgKY1uKEw//GQlO6sZJemReE4XdXys19QYuI61/hAdIPIqKBZ0pjLUO9uP8+Vihq21LLbMm+Onqq/y4JKmjxvzRBypUZaNXSaX809M/j20CISXf0Z2mBTtLCwY3v3axtH70I9gk6fHupbxOmVQGI2R5025guQs9nhUam8e22AfeU=;20:x9wkd+lu649CHx5YIilRZxAK+hn6tJkjOTlAwDS+joS5Rdgo2vmi/z4/9Lf62VjJRAwf9GYG8VP/ttBisd9LdvEXsFfPivyj967Burk95VVKEUWpC5Xn+6MdyQF8u9jOpwsJ3qLjbtZnB+G911wiaGZFJoPSC39GHIGMIo6CVp356Ip3f6bzgy7xDz3w7h4J6bTEpUJNniM5/PXuuL1wVX/NFiQhKi6yi6kmeDb6A5Vqdq109qkX7C0GHRwESatHciyAvLxT2zb0X/GtQuOPROrBHiraIuT8nKjeTHIHFraFyU71lqR/WCOG3WNfgx3Lre8xNw+j1HnYpMPnfjtruFHMhgKxNzBCNHCok2it80sv5XKv7i+/WHk2jTi34glifMjlf24zlJb1Kz9MF8jVLNieeO5muqDBwegI7GYdgCkO7B8dVDOAa0T/sophIbqClyoi+FvCukZwBjGhTenKBhT1ZSYKVsLihNp21X9Ak26dCM2Ttr36uX44osIrtnOf X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699016);SRVR:DM6PR02MB4330;BCL:0;PCL:0;RULEID:;SRVR:DM6PR02MB4330; X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4330;4:IfAArWxBEwWqevrrQfsA/0dz4SBDIpTozW5HHUDG+IO3a7Jy8FSkrkByCfFTeVyHYKNWdRQMb3MidSQUKMiwhROqaeGwNuUffgLyc4qmJhp064NIj+gC1cJ4AeZ4nHSMQ1qh7yq/CSlQEhrWp6KCjNi/3pwDmVHUu5N1EF/aTP4FEA1K0/SIc2yfmM9g6HEA5kDWOReLbwehkVJ1Ifq/hPE8uMZWUckdvwVBZqVxt49FkfqLTkDak4k6tnsKswwb31A1BNpxUJ9bIn9PN2bg3y24v6xrYZX6CjGd1CbZCEZZnhrSd1FOMpYCxWQvbljC X-Forefront-PRVS: 07665BE9D1 X-Microsoft-Exchange-Diagnostics: 1;DM6PR02MB4330;23:2rihax1r7gaghXy3GscHfs8ANzT20UdR7zt2yJx/q5y8vYS5Ax3mA33a7yPPQujWTteHxR8O77hGJLVvH4iACzy6FtKo+N5Fj4IY3YeXoX5KT9TkAxBwGD6uemW6S02Yn2LoDXxkDWrlS45lLXem0U40KcHnDQuutPRe+AmI5sHE9C24ko5unnWKNlg8+uJVvvyn8DRU6cq320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O/bZYQTApj/lflI1UUYziiqAUauZPWo3z0a9D9wLa84iKS9yy7CMp4/a/s7KitWXinpi5whwBLu/gVsPlDp64Jv4ks4Wk59UVBEr2mNEeEXORvb85YGETGB7edKIrQWjwhKeJOCIBuOSAr8SvGTwD9tnZn/6sdYg0nN7Q6a75hJXvg1zK9/6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.4388 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df8c04f4-dd15-4c23-3d73-08d60346de38 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4330 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are cortex-r5 processors in Xilinx Zynq UltraScale+ MPSoC platforms. This remoteproc driver is to manage the R5 processors. Signed-off-by: Wendy Liang --- drivers/remoteproc/Kconfig | 9 + drivers/remoteproc/Makefile | 1 + drivers/remoteproc/zynqmp_r5_remoteproc.c | 692 ++++++++++++++++++++++++++++++ 3 files changed, 702 insertions(+) create mode 100644 drivers/remoteproc/zynqmp_r5_remoteproc.c diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index cd1c168..83aac63 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -158,6 +158,15 @@ config ST_REMOTEPROC config ST_SLIM_REMOTEPROC tristate +config ZYNQMP_R5_REMOTEPROC + tristate "ZynqMP_r5 remoteproc support" + depends on ARM64 && PM && ARCH_ZYNQMP + select RPMSG_VIRTIO + select ZYNQMP_FIRMWARE + help + Say y here to support ZynqMP R5 remote processors via the remote + processor framework. + endif # REMOTEPROC endmenu diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile index 02627ed..147923c 100644 --- a/drivers/remoteproc/Makefile +++ b/drivers/remoteproc/Makefile @@ -23,3 +23,4 @@ qcom_wcnss_pil-y += qcom_wcnss.o qcom_wcnss_pil-y += qcom_wcnss_iris.o obj-$(CONFIG_ST_REMOTEPROC) += st_remoteproc.o obj-$(CONFIG_ST_SLIM_REMOTEPROC) += st_slim_rproc.o +obj-$(CONFIG_ZYNQMP_R5_REMOTEPROC) += zynqmp_r5_remoteproc.o diff --git a/drivers/remoteproc/zynqmp_r5_remoteproc.c b/drivers/remoteproc/zynqmp_r5_remoteproc.c new file mode 100644 index 0000000..7fc3718 --- /dev/null +++ b/drivers/remoteproc/zynqmp_r5_remoteproc.c @@ -0,0 +1,692 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Zynq R5 Remote Processor driver + * + * Copyright (C) 2015 Xilinx, Inc. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "remoteproc_internal.h" + +/* IPI reg offsets */ +#define TRIG_OFFSET 0x00000000 +#define OBS_OFFSET 0x00000004 +#define ISR_OFFSET 0x00000010 +#define IMR_OFFSET 0x00000014 +#define IER_OFFSET 0x00000018 +#define IDR_OFFSET 0x0000001C +#define IPI_ALL_MASK 0x0F0F0301 + +/* RPU IPI mask */ +#define RPU_IPI_INIT_MASK 0x00000100 +#define RPU_IPI_MASK(n) (RPU_IPI_INIT_MASK << (n)) +#define RPU_0_IPI_MASK RPU_IPI_MASK(0) +#define RPU_1_IPI_MASK RPU_IPI_MASK(1) + +/* PM proc states */ +#define PM_PROC_STATE_ACTIVE 1u + +/* Maximum TCM power nodes IDs */ +#define MAX_TCM_PNODES 4 + +/* Register access macros */ +#define reg_read(base, reg) \ + readl(((void __iomem *)(base)) + (reg)) +#define reg_write(base, reg, val) \ + writel((val), ((void __iomem *)(base)) + (reg)) + +#define DEFAULT_FIRMWARE_NAME "rproc-rpu-fw" + +static bool autoboot __read_mostly; + +struct zynqmp_r5_rproc_pdata; + +/** + * struct zynqmp_r5_rproc_pdata - zynqmp rpu remote processor instance state + * @rproc: rproc handle + * @workqueue: workqueue for the RPU remoteproc + * @ipi_base: virt ptr to IPI channel address registers for APU + * @rpu_mode: RPU core configuration + * @rpu_id: RPU CPU id + * @rpu_pnode_id: RPU CPU power domain id + * @mem_pools: list of gen_pool for firmware mmio_sram memory and their + * power domain IDs + * @mems: list of rproc_mem_entries for firmware + * @irq: IRQ number + * @ipi_dest_mask: IPI destination mask for the IPI channel + */ +struct zynqmp_r5_rproc_pdata { + struct rproc *rproc; + struct work_struct workqueue; + void __iomem *ipi_base; + enum rpu_oper_mode rpu_mode; + struct list_head mems; + u32 ipi_dest_mask; + u32 rpu_id; + u32 rpu_pnode_id; + int irq; + u32 tcm_pnode_id[MAX_TCM_PNODES]; +}; + +/** + * r5_boot_addr_config - configure the boot address of R5 + * @pdata: platform data + * @bootmem: boot from LOVEC or HIVEC + * + * This function will set the RPU boot address + */ +static void r5_boot_addr_config(struct zynqmp_r5_rproc_pdata *pdata, + enum rpu_boot_mem bootmem) +{ + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + + pr_debug("%s: R5 ID: %d, boot_dev %d\n", + __func__, pdata->rpu_id, bootmem); + + if (!eemi || !eemi->ioctl) { + pr_err("%s: no eemi ioctl operation.\n", __func__); + return; + } + eemi->ioctl(pdata->rpu_pnode_id, IOCTL_RPU_BOOT_ADDR_CONFIG, + bootmem, 0, NULL); +} + +/** + * r5_mode_config - configure R5 operation mode + * @pdata: platform data + * + * configure R5 to split mode or lockstep mode + * based on the platform data. + */ +static void r5_mode_config(struct zynqmp_r5_rproc_pdata *pdata) +{ + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + + pr_debug("%s: mode: %d\n", __func__, pdata->rpu_mode); + + if (!eemi || !eemi->ioctl) { + pr_err("%s: no eemi ioctl operation.\n", __func__); + return; + } + eemi->ioctl(pdata->rpu_pnode_id, IOCTL_SET_RPU_OPER_MODE, + pdata->rpu_mode, 0, NULL); +} + +/** + * r5_release_tcm() - release TCM + * @pdata: platform data + * + * Release TCM + */ +static void r5_release_tcm(struct zynqmp_r5_rproc_pdata *pdata) +{ + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + int i; + + if (!eemi || !eemi->release_node) { + pr_err("Failed to release TCM\n"); + return; + } + + for (i = 0; i < MAX_TCM_PNODES; i++) { + if (pdata->tcm_pnode_id[i] != 0) + eemi->release_node(pdata->tcm_pnode_id[i]); + } +} + +/** + * disable_ipi - disable IPI + * @pdata: platform data + * + * Disable IPI interrupt + */ +static inline void disable_ipi(struct zynqmp_r5_rproc_pdata *pdata) +{ + /* Disable R5 IPI interrupt */ + if (pdata->ipi_base) + reg_write(pdata->ipi_base, IDR_OFFSET, pdata->ipi_dest_mask); +} + +/** + * enable_ipi - enable IPI + * @pdata: platform data + * + * Enable IPI interrupt + */ +static inline void enable_ipi(struct zynqmp_r5_rproc_pdata *pdata) +{ + /* Enable R5 IPI interrupt */ + if (pdata->ipi_base) + reg_write(pdata->ipi_base, IER_OFFSET, pdata->ipi_dest_mask); +} + +/** + * event_notified_idr_cb - event notified idr callback + * @id: idr id + * @ptr: pointer to idr private data + * @data: data passed to idr_for_each callback + * + * Pass notification to remoteproc virtio + * + * @return: 0. having return is to satisfy the idr_for_each() function + * pointer input argument requirement. + */ +static int event_notified_idr_cb(int id, void *ptr, void *data) +{ + struct rproc *rproc = data; + + (void)rproc_vq_interrupt(rproc, id); + return 0; +} + +static void handle_event_notified(struct work_struct *work) +{ + struct rproc *rproc; + struct zynqmp_r5_rproc_pdata *local; + + local = container_of(work, struct zynqmp_r5_rproc_pdata, workqueue); + rproc = local->rproc; + idr_for_each(&rproc->notifyids, event_notified_idr_cb, rproc); +} + +static int zynqmp_r5_rproc_start(struct rproc *rproc) +{ + struct device *dev = rproc->dev.parent; + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + enum rpu_boot_mem bootmem; + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + + dev_dbg(dev, "%s\n", __func__); + + if (!eemi || !eemi->force_powerdown || + !eemi->request_wakeup) { + pr_err("Failed to start R5\n"); + return -ENXIO; + } + + /* Set up R5 */ + if ((rproc->bootaddr & 0xF0000000) == 0xF0000000) + bootmem = PM_RPU_BOOTMEM_HIVEC; + else + bootmem = PM_RPU_BOOTMEM_LOVEC; + dev_info(dev, "RPU boot from %s.", + bootmem == PM_RPU_BOOTMEM_HIVEC ? "OCM" : "TCM"); + + r5_mode_config(local); + eemi->force_powerdown(local->rpu_pnode_id, + ZYNQMP_PM_REQUEST_ACK_BLOCKING); + r5_boot_addr_config(local, bootmem); + /* Add delay before release from halt and reset */ + usleep_range(400, 500); + eemi->request_wakeup(local->rpu_pnode_id, + 1, bootmem, + ZYNQMP_PM_REQUEST_ACK_NO); + + /* Make sure IPI is enabled */ + enable_ipi(local); + + return 0; +} + +/* kick a firmware */ +static void zynqmp_r5_rproc_kick(struct rproc *rproc, int vqid) +{ + struct device *dev = rproc->dev.parent; + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + + dev_dbg(dev, "KICK Firmware to start send messages vqid %d\n", vqid); + + /* + * send irq to R5 firmware + * Currently vqid is not used because we only got one. + */ + if (local->ipi_base) + reg_write(local->ipi_base, TRIG_OFFSET, local->ipi_dest_mask); +} + +/* power off the remote processor */ +static int zynqmp_r5_rproc_stop(struct rproc *rproc) +{ + struct device *dev = rproc->dev.parent; + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + struct rproc_mem_entry *mem, *nmem; + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + + dev_dbg(dev, "%s\n", __func__); + + if (!eemi || !eemi->force_powerdown) { + pr_err("Failed to stop R5\n"); + return -ENXIO; + } + + disable_ipi(local); + eemi->force_powerdown(local->rpu_pnode_id, + ZYNQMP_PM_REQUEST_ACK_BLOCKING); + + return 0; +} + +static void *zynqmp_r5_rproc_da_to_va(struct rproc *rproc, u64 da, int len) +{ + struct rproc_mem_entry *mem; + void *va = NULL; + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + + list_for_each_entry(mem, &local->mems, node) { + int offset = da - mem->da; + + /* try next carveout if da is too small */ + if (offset < 0) + continue; + + /* try next carveout if da is too large */ + if (offset + len > mem->len) + continue; + + va = mem->va + offset; + + break; + } + return va; +} + +static int zynqmp_r5_parse_fw(struct rproc *rproc, const struct firmware *fw) +{ + int ret; + + ret = rproc_elf_load_rsc_table(rproc, fw); + if (ret == -EINVAL) + /* No resource table */ + return 0; + else + return ret; +} + +static struct rproc_ops zynqmp_r5_rproc_ops = { + .start = zynqmp_r5_rproc_start, + .stop = zynqmp_r5_rproc_stop, + .kick = zynqmp_r5_rproc_kick, + .da_to_va = zynqmp_r5_rproc_da_to_va, +}; + +/* Release R5 from reset and make it halted. + * In case the firmware uses TCM, in order to load firmware to TCM, + * will need to release R5 from reset and stay in halted state. + */ +static int zynqmp_r5_rproc_init(struct rproc *rproc) +{ + struct device *dev = rproc->dev.parent; + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + + dev_dbg(dev, "%s\n", __func__); + enable_ipi(local); + return 0; +} + +static irqreturn_t r5_remoteproc_interrupt(int irq, void *dev_id) +{ + struct device *dev = dev_id; + struct platform_device *pdev = to_platform_device(dev); + struct rproc *rproc = platform_get_drvdata(pdev); + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + u32 ipi_reg; + + /* Check if there is a kick from R5 */ + ipi_reg = reg_read(local->ipi_base, ISR_OFFSET); + if (!(ipi_reg & local->ipi_dest_mask)) + return IRQ_NONE; + + dev_dbg(dev, "KICK Linux because of pending message(irq%d)\n", irq); + reg_write(local->ipi_base, ISR_OFFSET, local->ipi_dest_mask); + schedule_work(&local->workqueue); + + return IRQ_HANDLED; +} + +/* zynqmp_r5_get_tcm_memories() - get tcm memories + * @pdev: pointer to the platform device + * @pdata: pointer to the remoteproc private data + * + * Function to create remoteproc memory entries for TCM memories. + */ +static int zynqmp_r5_get_tcms(struct platform_device *pdev, + struct zynqmp_r5_rproc_pdata *pdata) +{ + static const char * const mem_names[] = {"tcm_a", "tcm_b"}; + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + int num_mems = 0; + int i, ret; + struct property *prop; + const __be32 *cur; + u32 val; + const struct zynqmp_eemi_ops *eemi = zynqmp_pm_get_eemi_ops(); + + /* Get TCM power node ids */ + i = 0; + of_property_for_each_u32(np, "tcm-pnode-id", prop, cur, val) + pdata->tcm_pnode_id[i++] = val; + + /* Request TCMs */ + for (i = 0; i < MAX_TCM_PNODES; i++) { + if (pdata->tcm_pnode_id[i] != 0) { + ret = eemi->request_node(pdata->tcm_pnode_id[i], + ZYNQMP_PM_CAPABILITY_ACCESS, 0, + ZYNQMP_PM_REQUEST_ACK_BLOCKING + ); + if (ret < 0) { + dev_err(dev, "failed to request TCM: %u\n", + pdata->tcm_pnode_id[i]); + return ret; + } + dev_dbg(dev, "request tcm pnode: %u\n", + pdata->tcm_pnode_id[i]); + } else { + break; + } + } + /* Create remoteproc memories entries for TCM memories */ + num_mems = ARRAY_SIZE(mem_names); + for (i = 0; i < num_mems; i++) { + struct resource *res; + struct rproc_mem_entry *mem; + dma_addr_t dma; + resource_size_t size; + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + mem_names[i]); + mem = devm_kzalloc(dev, sizeof(struct rproc_mem_entry), + GFP_KERNEL); + if (!mem) + return -ENOMEM; + /* Map it as normal memory */ + size = resource_size(res); + mem->va = devm_ioremap_wc(dev, res->start, size); + mem->len = size; + dma = (dma_addr_t)res->start; + mem->dma = dma; + /* TCM memory: + * TCM_0: da 0 <-> global addr 0xFFE00000 + * TCM_1: da 0 <-> global addr 0xFFE90000 + */ + if ((dma & 0xFFF00000) == 0xFFE00000) { + if ((dma & 0xFFF80000) == 0xFFE80000) + mem->da -= 0x90000; + else + mem->da = (dma & 0x000FFFFF); + } + dev_dbg(dev, "%s: va = %p, da = 0x%x dma = 0x%llx\n", + __func__, mem->va, mem->da, mem->dma); + list_add_tail(&mem->node, &pdata->mems); + } + return 0; +} + +/* zynqmp_r5_get_reserved_mems() - get reserved memories + * @pdev: pointer to the platform device + * @pdata: pointer to the remoteproc private data + * + * Function to create remoteproc memory entries from memory-region + * property. + */ +static int zynqmp_r5_get_reserved_mems(struct platform_device *pdev, + struct zynqmp_r5_rproc_pdata *pdata) +{ + struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; + int num_mems; + int i; + + num_mems = of_count_phandle_with_args(np, "memory-region", NULL); + if (num_mems <= 0) + return 0; + for (i = 0; i < num_mems; i++) { + struct device_node *node; + struct resource res; + resource_size_t size; + struct rproc_mem_entry *mem; + int ret; + + node = of_parse_phandle(np, "memory-region", i); + ret = of_device_is_compatible(node, "rproc-prog-memory"); + if (!ret) { + /* it is DMA memory. */ + dev_info(dev, "%s, dma memory %d\n", __func__, i); + ret = of_reserved_mem_device_init_by_idx(dev, + np, i); + if (ret) { + dev_err(dev, "unable to reserve DMA mem.\n"); + return ret; + } + continue; + } + ret = of_address_to_resource(node, 0, &res); + if (ret) { + dev_err(dev, "unable to resolve memory region.\n"); + return ret; + } + mem = devm_kzalloc(dev, sizeof(struct rproc_mem_entry), + GFP_KERNEL); + if (!mem) + return -ENOMEM; + /* Map it as normal memory */ + size = resource_size(&res); + mem->va = devm_ioremap_wc(dev, res.start, size); + mem->len = size; + mem->dma = (dma_addr_t)res.start; + mem->da = (u32)res.start; + dev_dbg(dev, "%s: va = %p, da = 0x%x dma = 0x%llx\n", + __func__, mem->va, mem->da, mem->dma); + list_add_tail(&mem->node, &pdata->mems); + } + return 0; +} + +static int zynqmp_r5_remoteproc_probe(struct platform_device *pdev) +{ + const unsigned char *prop; + struct resource *res; + int ret = 0; + struct zynqmp_r5_rproc_pdata *local; + struct rproc *rproc; + + rproc = rproc_alloc(&pdev->dev, dev_name(&pdev->dev), + &zynqmp_r5_rproc_ops, NULL, + sizeof(struct zynqmp_r5_rproc_pdata)); + if (!rproc) { + dev_err(&pdev->dev, "rproc allocation failed\n"); + return -ENOMEM; + } + local = rproc->priv; + local->rproc = rproc; + + platform_set_drvdata(pdev, rproc); + + /* Override parse_fw op to allow no resource table firmware */ + rproc->ops->parse_fw = zynqmp_r5_parse_fw; + + ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) { + dev_err(&pdev->dev, "dma_set_coherent_mask: %d\n", ret); + goto rproc_fault; + } + + /* Get the RPU power domain id */ + ret = of_property_read_u32(pdev->dev.of_node, "rpu-pnode-id", + &local->rpu_pnode_id); + if (ret) { + dev_err(&pdev->dev, "No RPU power node ID is specified.\n"); + ret = -EINVAL; + goto rproc_fault; + } + dev_dbg(&pdev->dev, "RPU[%d] pnode_id = %d.\n", + local->rpu_id, local->rpu_pnode_id); + + prop = of_get_property(pdev->dev.of_node, "core_conf", NULL); + if (!prop) { + dev_warn(&pdev->dev, "default core_conf used: lock-step\n"); + prop = "lock-step"; + } + + dev_info(&pdev->dev, "RPU core_conf: %s\n", prop); + if (!strcmp(prop, "split0")) { + local->rpu_mode = PM_RPU_MODE_SPLIT; + local->rpu_id = 0; + local->ipi_dest_mask = RPU_0_IPI_MASK; + } else if (!strcmp(prop, "split1")) { + local->rpu_mode = PM_RPU_MODE_SPLIT; + local->rpu_id = 1; + local->ipi_dest_mask = RPU_1_IPI_MASK; + } else if (!strcmp(prop, "lock-step")) { + local->rpu_mode = PM_RPU_MODE_LOCKSTEP; + local->rpu_id = 0; + local->ipi_dest_mask = RPU_0_IPI_MASK; + } else { + dev_err(&pdev->dev, "Invalid core_conf mode provided - %s , %d\n", + prop, local->rpu_mode); + ret = -EINVAL; + goto rproc_fault; + } + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ipi"); + if (res) { + local->ipi_base = devm_ioremap(&pdev->dev, res->start, + resource_size(res)); + if (IS_ERR(local->ipi_base)) { + pr_err("%s: Unable to map IPI\n", __func__); + ret = PTR_ERR(local->ipi_base); + goto rproc_fault; + } + } else { + dev_info(&pdev->dev, "IPI resource is not specified.\n"); + } + dev_dbg(&pdev->dev, "got ipi base address\n"); + + INIT_LIST_HEAD(&local->mems); + /* Get TCM memories */ + ret = zynqmp_r5_get_tcms(pdev, local); + if (ret < 0) { + dev_err(&pdev->dev, "failed to get TCM memories.\n"); + goto rproc_fault; + } + dev_dbg(&pdev->dev, "got TCM memories\n"); + /* Get reserved memory regions for firmware */ + ret = zynqmp_r5_get_reserved_mems(pdev, local); + if (ret < 0) { + dev_err(&pdev->dev, "failed to get reserved memories.\n"); + goto rproc_fault; + } + dev_dbg(&pdev->dev, "got reserved memories.\n"); + + /* Disable IPI before requesting IPI IRQ */ + disable_ipi(local); + INIT_WORK(&local->workqueue, handle_event_notified); + + /* IPI IRQ */ + if (local->ipi_base) { + ret = platform_get_irq(pdev, 0); + if (ret < 0) { + dev_err(&pdev->dev, "unable to find IPI IRQ\n"); + goto rproc_fault; + } + local->irq = ret; + ret = devm_request_irq(&pdev->dev, local->irq, + r5_remoteproc_interrupt, IRQF_SHARED, + dev_name(&pdev->dev), &pdev->dev); + if (ret) { + dev_err(&pdev->dev, "IRQ %d already allocated\n", + local->irq); + goto rproc_fault; + } + dev_dbg(&pdev->dev, "notification irq: %d\n", local->irq); + } + + ret = zynqmp_r5_rproc_init(local->rproc); + if (ret) { + dev_err(&pdev->dev, "failed to init ZynqMP R5 rproc\n"); + goto rproc_fault; + } + + rproc->auto_boot = autoboot; + + ret = rproc_add(local->rproc); + if (ret) { + dev_err(&pdev->dev, "rproc registration failed\n"); + goto rproc_fault; + } + + return ret; + +rproc_fault: + rproc_free(local->rproc); + + return ret; +} + +static int zynqmp_r5_remoteproc_remove(struct platform_device *pdev) +{ + struct rproc *rproc = platform_get_drvdata(pdev); + struct zynqmp_r5_rproc_pdata *local = rproc->priv; + struct rproc_mem_entry *mem; + + dev_info(&pdev->dev, "%s\n", __func__); + + rproc_del(rproc); + + list_for_each_entry(mem, &local->mems, node) { + if (mem->priv) + gen_pool_free((struct gen_pool *)mem->priv, + (unsigned long)mem->va, mem->len); + } + + r5_release_tcm(local); + of_reserved_mem_device_release(&pdev->dev); + rproc_free(rproc); + + return 0; +} + +/* Match table for OF platform binding */ +static const struct of_device_id zynqmp_r5_remoteproc_match[] = { + { .compatible = "xlnx,zynqmp-r5-remoteproc-1.0", }, + { /* end of list */ }, +}; +MODULE_DEVICE_TABLE(of, zynqmp_r5_remoteproc_match); + +static struct platform_driver zynqmp_r5_remoteproc_driver = { + .probe = zynqmp_r5_remoteproc_probe, + .remove = zynqmp_r5_remoteproc_remove, + .driver = { + .name = "zynqmp_r5_remoteproc", + .of_match_table = zynqmp_r5_remoteproc_match, + }, +}; +module_platform_driver(zynqmp_r5_remoteproc_driver); + +module_param_named(autoboot, autoboot, bool, 0444); +MODULE_PARM_DESC(autoboot, + "enable | disable autoboot. (default: true)"); + +MODULE_AUTHOR("Jason Wu "); +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("ZynqMP R5 remote processor control driver"); From patchwork Thu Aug 16 07:06:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaying Liang X-Patchwork-Id: 10567013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EE125A4 for ; Thu, 16 Aug 2018 07:07:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49FD32A97F for ; Thu, 16 Aug 2018 07:07:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E14A2AB66; Thu, 16 Aug 2018 07:07:22 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECF5C2A97F for ; Thu, 16 Aug 2018 07:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389177AbeHPKDh (ORCPT ); Thu, 16 Aug 2018 06:03:37 -0400 Received: from mail-eopbgr720070.outbound.protection.outlook.com ([40.107.72.70]:45121 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729566AbeHPKDg (ORCPT ); Thu, 16 Aug 2018 06:03:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/LTLvod/Vzc3+uX/yI5dCRhRzIYe1r+iayxuBlUavJE=; b=i7cKH97vDU4MIa7FUQAS8WwSfSfaGqr7DTAnqs9jA7rmcRkyEdoMhB+aOCtGeqKYQi8PcQ3dOSHil+ShefVpt30Cxie6wOiTi8eaNS/zlcLOaDB1HKyGvo5wCnLuw55keO6utmai4KkXziAOnK/a18IAh4M7JL3lSOvfC0uxksg= Received: from BYAPR02CA0052.namprd02.prod.outlook.com (2603:10b6:a03:54::29) by MWHPR0201MB3516.namprd02.prod.outlook.com (2603:10b6:301:77::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1059.20; Thu, 16 Aug 2018 07:07:09 +0000 Received: from CY1NAM02FT032.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by BYAPR02CA0052.outlook.office365.com (2603:10b6:a03:54::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1038.22 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT032.mail.protection.outlook.com (10.152.75.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1059.14 via Frontend Transport; Thu, 16 Aug 2018 07:07:02 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:50223 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1fqCN3-0007Hp-Ly; Thu, 16 Aug 2018 00:07:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1fqCMy-0000y9-H2; Thu, 16 Aug 2018 00:06:56 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w7G76mNo005191; Thu, 16 Aug 2018 00:06:48 -0700 Received: from [172.19.2.167] (helo=xsjjliang50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1fqCMq-0000pj-Li; Thu, 16 Aug 2018 00:06:48 -0700 From: Wendy Liang To: , , , , , , CC: , , , , Wendy Liang Subject: [PATCH 7/7] Documentation: devicetree: Add Xilinx R5 rproc binding Date: Thu, 16 Aug 2018 00:06:30 -0700 Message-ID: <1534403190-28523-8-git-send-email-jliang@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534403190-28523-1-git-send-email-jliang@xilinx.com> References: <1534403190-28523-1-git-send-email-jliang@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39850400004)(396003)(136003)(376002)(346002)(2980300002)(438002)(199004)(189003)(6666003)(16586007)(44832011)(316002)(36756003)(6636002)(110136005)(50226002)(2201001)(8936002)(106002)(2616005)(63266004)(126002)(426003)(5660300001)(9786002)(486006)(476003)(446003)(186003)(336012)(11346002)(26005)(77096007)(478600001)(356003)(305945005)(4326008)(50466002)(76176011)(47776003)(2906002)(8676002)(36386004)(54906003)(106466001)(48376002)(81156014)(81166006)(7696005)(51416003)(107886003)(14444005)(107986001)(5001870100001);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR0201MB3516;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT032;1:a0nqH3+byvMN515/O/WFX1UiDiMhVG9XWbowQ6fiR0Vn4f2GF6BklNGxi7MEPuT0OXWdzFDT0GTUwuiUT9wbhGiIS6GiL5wmy0yDrBYaSfhiLwjUUm7ogHX0eAOw/grE MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8fe7677d-4d56-4995-a973-08d60346de03 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:MWHPR0201MB3516; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3516;3:l1wz0GY0HeqkM8iwhMlEVg3l5svyMKY4zML6YTXP+X3Eb71TmDST3F1EdGs0QFw1MLRTv18lT9ecVVGznfKWSnPq05ISikcBre4U6OVza90e3nbeSsqAPbTJy4SX3lNeayakghCSQD1LCMqnL8+240iLnk+yt+3TjT8pdU+vMTqEuQ+l7CoymZqmJEF/ewkNY86MBiIchQHmBxLnDKtH2Wq0lElkO6iRt+oPGrxNu1QY8fKccLVV0JSFF5EcnHVwox5WjYIWGBb9pn1r2RqAI1W3xCPHhrAQta1SABfys3cUDgrYdO9HrgImb66ONAxfmrW6e6PaovClLf6MTF2in9d88sNKWgHcyBwtdzJwuS8=;25:1OsMVhTrXjcAlcM5fja67N4s4tBHe/VP0FMDfenMaHQSrkp9urZ8nO8r+5By6IKPpEW748xXWu8cWwPeVdvTYxTH88E/aP5lzkagdWBm2BGXJwx/GT3xkuRPN9ZVfFpCuEc3ykVLasvNvdUKbXTn/m8AKnwqFHGJmIW0vlRTUg//W9FNR/gxle2au9LYnGHgkF5D2uPdOLtaYdCVEZpSZc9FtuLh6bo4fBknelvaEHCuNMrt6IB4+tjk+ZcXKjz3W9K0F4Dxmjc4QuE6vNCUajEIsyxctMxlfBtKjPWNUDOd6ZEDMKl9jQcG4zp/7R0IUa3w73N1AFLjx/AqwBSPvA== X-MS-TrafficTypeDiagnostic: MWHPR0201MB3516: X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3516;31:iCRR2rWMyVQKv0rZYKl5z88Kgrq6n3ufBCMUT9IGP4REKhzkxs6/c6ClqMTKUOY127nipLVTiV1EvKEDX4nVDPcDah0iN9NWttURW1hFdoLJfPZY4kGSZX+ZWdUe5ERkTmtnfQIRxp16K7n7QmLUx5ym4xDxesx979nNDvA51kO++H2cQ/NCQL2BOQw6LpebAocMWhkFBrNXNIMbSWInNNo1+O5FdIQ9tpTAGT8FaLA=;20:hvDZ3IoVIqVra9AxHmXxyvLG+c8wGv3YQbeUIWUiEMRA1AvYK0CmotF108C4NQ21RqRGJ+uxnG8lWy87ORJCrQyo0E7jFv8PAEnjX6/CkQz0fC4K7OlYbP5LCjF80l/lMgBX97OKlShnIMCYRQwamul+68uMOZZjZrcxamj1wcaw3yq72gBjKcpADAJMhzIDxLU/5UsKB0D0Q8ObPTdGkEDCipYeqMNlmwW0/L7QruApF3KVEtiXS97ilJeN44YXe8hw/3mbjFqOlvu0QCtyeQgipBridO6+kGEukYuTlqE330Ml6l+nc1UlotufH6SKr2jK+RcBD1MUP1pqQmXpEfSqQhZ88j5AGaUOeJArSlwUGs9qViRXNh//RfRU9RJ0LkvmQpyeVxd2GpruuYl5q/gT5taKzkVqmYRlpwihrRLvaJVfXBkdzrfRWh2ronTDrWoknpTso/CB8SD3GCzbZBxQZ/PtOsC/nPrbFm7iO6rpb5oa1Hpn+87LXtplm6eh X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699016);SRVR:MWHPR0201MB3516;BCL:0;PCL:0;RULEID:;SRVR:MWHPR0201MB3516; X-Microsoft-Exchange-Diagnostics: 1;MWHPR0201MB3516;4:IHNRkuwaS5PYd1UYPjSCrj7PE22n6KoNEJs5Ogaxfp31SwUcq07rYi2A1wuN4uEbOsT3uC/J83aOAGrdbgeEe4tBI6IVp+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QDdbncgSoIoGkcoEk7UQeoFf9JjlDrAAD2IT+yE0fgWU5BJn0kmxPMHK838c9w44lm4+mKgTdOAm7/mWwTzJidVIVq5MeCeJ/8vnONcZjq804ugqYT8+1pRwOBVtHAj3Tp1GdFHWqxHiUYyVaSWFhueAgEXZFKinYSEmXdsEo2nOEMUfRviq/Vnk+/cioWIGgFM7ACx/DGFnW6f3DVsHXb8PQ==;5:VcFRgm7XORJ9mHrVVSM65yLqHuE6pM+qNMzxBJFhWlKvsbKpiY74S/MTIMyj651Yig+FBUwQtvCS2nkhH5pv80QrNPeLlZFDGxUtfUpIlPBYeiLVaeG7S+tZELdsqrVfnpLlHpx1wO4qbG5USZR8/YUMlaVVJ0HUE5AVLzeC650=;7:BtfwZ9GYa2z0Aszv3jgYquaxVdYjkE1e/9t15n7ryBX0XO3Vu065R7y/iGHzBacQBFLv+I8ejofZnVPiZwjcDvw0Z3gXA9HMjVnXUI0HdxNruXv+ueg1Y1yP+hNTu9OGMrmWni3LyxBv0nIU/GhGN3UYKeiZiRTEq1nAoAbz3mgFCQDnCwf6MAHevNruh4d/baVyhScHH3aIR6cyCzWh1de6eiTjcngjqVCY4zRU4HuVB0fR66xDQGYBvOM9lUs6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2018 07:07:02.1724 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8fe7677d-4d56-4995-a973-08d60346de03 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.100];Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3516 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add device tree binding for Xilinx Cortex-r5 remoteproc. Signed-off-by: Wendy Liang --- .../remoteproc/xlnx,zynqmp-r5-remoteproc.txt | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5-remoteproc.txt diff --git a/Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5-remoteproc.txt b/Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5-remoteproc.txt new file mode 100644 index 0000000..3940019 --- /dev/null +++ b/Documentation/devicetree/bindings/remoteproc/xlnx,zynqmp-r5-remoteproc.txt @@ -0,0 +1,81 @@ +Xilinx ARM Cortex A53-R5 remoteproc driver +========================================== + +ZynqMP family of devices use two Cortex R5 processors to help with various +low power / real time tasks. + +This driver requires specific ZynqMP hardware design. + +ZynqMP R5 RemoteProc Device Node: +================================= +A zynqmp_r5_remoteproc device node is used to represent a R5 IP instance +within ZynqMP SoC. + +Required properties: +-------------------- + - compatible : Should be "xlnx,zynqmp-r5-remoteproc-1.0" + - reg : Address and length of the register set for the device. It + contains in the same order as described reg-names + - reg-names: Contain the register set names. + "tcm_a" and "tcm_b" for TCM memories. + If the user uses the remoteproc driver with the RPMsg kernel + driver,"ipi" for the IPI register used to communicate with RPU + is also required. + Otherwise, if user only uses the remoteproc driver to boot RPU + firmware, "ipi" is not required. + - tcm-pnode-id: TCM resources power nodes IDs which are used to request TCM + resources for the remoteproc driver to access. + - rpu-pnode-id : RPU power node id which is used by the remoteproc driver + to start RPU or shut it down. + +Optional properties: +-------------------- + - core_conf : R5 core configuration (valid string - split0 or split1 or + lock-step), default is lock-step. + - memory-region: memories regions for RPU executable and DMA memory. + - interrupts : Interrupt mapping for remoteproc IPI. It is required if the + user uses the remoteproc driver with the RPMsg kernel driver. + - interrupt-parent : Phandle for the interrupt controller. It is required if + the user uses the remoteproc driver with the RPMsg kernel + kernel driver. + +Example: +-------- + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + rproc_0_fw_reserved: rproc@3ed000000 { + compatible = "rproc-prog-memory"; + no-map; + reg = <0x0 0x3ed00000 0x0 0x40000>; + }; + rproc_0_dma_reserved: rproc@3ed400000 { + compatible = "shared-dma-pool"; + no-map; + reg = <0x0 0x3ed40000 0x0 0x80000>; + }; + }; + + firmware { + zynqmp_firmware: zynqmp-firmware { + compatible = "xlnx,zynqmp-firmware"; + method = "smc"; + }; + }; + + zynqmp-r5-remoteproc@0 { + compatible = "xlnx,zynqmp-r5-remoteproc-1.0"; + reg = <0x0 0xFFE00000 0x0 0x10000>, + <0x0 0xFFE20000 0x0 0x10000>, + <0x0 0xff340000 0x0 0x100>; + reg-names = "tcm_a", "tcm_b", "ipi"; + dma-ranges; + core_conf = "split0"; + memory-region = <&rproc_0_fw_reserved>, + <&rproc_0_dma_reserved>; + tcm-pnode-id = <0xf>, <0x10>; + rpu-pnode-id = <0x7>; + interrupt-parent = <&gic>; + interrupts = <0 29 4>; + } ;