Received: by 10.213.65.68 with SMTP id h4csp4309444imn; Tue, 10 Apr 2018 12:43:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx48yLsm59UIFKAVkG2/MIB+h+XnOPO7cBOkT3sLSj3psHxg6iBU3qxSgzt6T7DCezXwDSxpQ X-Received: by 10.101.96.141 with SMTP id t13mr1246867pgu.222.1523389434778; Tue, 10 Apr 2018 12:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523389434; cv=none; d=google.com; s=arc-20160816; b=jnabx1Du23nKTGIh/y7lGQERPWRyTfDIi+WZScOTR/8hz3B2bNIHbHorFGN32jy4jV b9oZ9asaAFmrBZkPp4lwtigLFDA1w2V4Jc8KZXLlhHebbAY6EOVMgkb/sOljCon5VUHM IpghrE6v664aDwhNwdvJHBaeSrSabv79zaAwmbgTLrxlLT/WjprMlX/Z/G+tbFZMtS+L HzOuOpW6i2z9z0B8W+7YBcB5iO5O9ae7N6zXdjND0QTsLK1GVva/3D4og/H/norZyQhm 7AGAX110hYh9PYgt8kSIBzSLMsuoqfa5/JGKYf+rzM+E8g8nUS0BrRyAt+MR9u/sUD2p GfrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=yFKNOYCTBnAp2XKhWwX4T3pNPVojbKSGdsBSJVUc9Cg=; b=QniOaEUd/3L0YZy4HdReAY2sZrdiyPRhclDPqfmfGuc+ujctbHohFtiB/Mz+42YgQI tUbZWJuIm/Ff+VhdCl/w5rvlyrV+N1P+vXhNcr8ECxPP/ECZbf6DTBPzE7OX/sxEfTJ+ ohVIoOnUb33otjLKk0U3iVX0Sv5SpAEQFOvkrKlKJydu7V5XfHYwvfeu1F71PrIy59YL OX88ZM9C+EvgmhnHjWfNpTJc2b/nqiESB6PsIx4FAdAcL7H6PZGu3Y2HYPuomaQv/+wW Fkn4xD70YaTtbUFkkOOPLI7MtO+D5DzJdLwHencUKACU0Tv7PJH9UPCXywwXx8bnlD6k EPyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=jmllj4Yz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t73si2619070pfg.114.2018.04.10.12.43.17; Tue, 10 Apr 2018 12:43:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector1-xilinx-com header.b=jmllj4Yz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753402AbeDJTjr (ORCPT + 99 others); Tue, 10 Apr 2018 15:39:47 -0400 Received: from mail-by2nam03on0063.outbound.protection.outlook.com ([104.47.42.63]:11301 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753256AbeDJTje (ORCPT ); Tue, 10 Apr 2018 15:39:34 -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; bh=yFKNOYCTBnAp2XKhWwX4T3pNPVojbKSGdsBSJVUc9Cg=; b=jmllj4YzQggQph4vSFDDtqjE0/VfzfoiLCujxG+GS+pZZiCZmxLEcGhqlEhwyJU3bOqm1O8Au8LU8Rma9u8ziWlzWwhYhzHNLunWcZEGeBVjGBS4FF3vB83Gi4gqJzUIqzjKnw7u3I1M2CFik/3iVVcvXL6Wkd0M2ctg5chqKvk= Received: from MWHPR0201CA0076.namprd02.prod.outlook.com (2603:10b6:301:75::17) by CY1PR0201MB0586.namprd02.prod.outlook.com (2a01:111:e400:4c26::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Tue, 10 Apr 2018 19:39:30 +0000 Received: from CY1NAM02FT026.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::203) by MWHPR0201CA0076.outlook.office365.com (2603:10b6:301:75::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.675.9 via Frontend Transport; Tue, 10 Apr 2018 19:39:29 +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 CY1NAM02FT026.mail.protection.outlook.com (10.152.75.157) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.653.8 via Frontend Transport; Tue, 10 Apr 2018 19:39:28 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:54247 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1f5z71-00011a-Vq; Tue, 10 Apr 2018 12:39:27 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1f5z6w-0006GI-Sc; Tue, 10 Apr 2018 12:39:22 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w3AJdG3N030931; Tue, 10 Apr 2018 12:39:16 -0700 Received: from [172.19.2.91] (helo=xsjjollys50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1f5z6q-0006FF-7K; Tue, 10 Apr 2018 12:39:16 -0700 From: Jolly Shah To: , , , , , , , , , , , , , CC: , , , , Jolly Shah Subject: [PATCH v6 09/11] firmware: xilinx: Add debugfs for clock control APIs Date: Tue, 10 Apr 2018 12:38:45 -0700 Message-ID: <1523389127-14243-10-git-send-email-jollys@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523389127-14243-1-git-send-email-jollys@xilinx.com> References: <1523389127-14243-1-git-send-email-jollys@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)(346002)(376002)(39860400002)(39380400002)(2980300002)(438002)(189003)(199004)(7416002)(5660300001)(8936002)(16586007)(106002)(81166006)(72206003)(426003)(110136005)(54906003)(50466002)(48376002)(316002)(2201001)(356003)(81156014)(486006)(336012)(2616005)(9786002)(36386004)(50226002)(476003)(126002)(106466001)(305945005)(11346002)(446003)(2906002)(8676002)(59450400001)(186003)(478600001)(107886003)(26005)(77096007)(36756003)(47776003)(76176011)(63266004)(51416003)(39060400002)(6666003)(4326008)(7696005)(107986001)(921003)(5001870100001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0201MB0586;H:xsj-pvapsmtpgw02;FPR:;SPF:Pass;LANG:en;PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;CY1NAM02FT026;1:464WpdrsZl+2e9+JfTi1JtqFmHAriAK6jYL8HgHPjdqkynkkJWLMxex98SahXGFtt7dlKkqHRFFLfCPCiZMsElIh0AaAHr6zLkl0iDyKhtLy7DxvrUWT6UepkTiewXDy MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060);SRVR:CY1PR0201MB0586; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB0586;3:GYn/qUqL8E6ehKNBPP4unLzOI8pcJ717FS7L500GUxoTbCanbMUCcNVHoTPbOuYFuCejITN+ocAaMEDhhcABjR0oo9fqzdSeRwctMkpWvD1R9Rh9bDB1mpcg6wln4t+2cK7hLdMPrDlr6gYRKKBCsDI66f/NGl5EU7sx62BAkyfTH3HiuG/SnrnRXIxcoZMwN6bK/VB3lbAFLUhEMHsore78roBJWXjbTo6M/LSkftamIjYXqT3TZ62w2r6OW/oraCgoKwwrDWZr88jDgR7SPf79vmBmTLmnrYQWS/VE5cWvtZ8MYeMEkReMaq2w5KoEXEEhgODlQON/BiNifebz056GLD2zV2LI8UxNq+hEavA=;25:y5o81oI+fo1tQAU91Tawj2V7SKtOAkMOd1Hi6C/67EnwLMQXfuCgHGV9huHHXU3Ks4crEzs/7UsPxw/F0T24U5i7WEPmtOVhqjw2Gqb369BzV4i+etDKmMmxEE5cMoVeZZ86GREyUtbAVes7jcuoAKl6Q44QJGMbmoM5kZYXSEpsDZ8rr2dX1YJICYAJPdHBE48Fb3uC9KIuDkQV4Ex70ruyouH4q9MXpXsh9RkTufLRiO++IV3G6nj5rXRu1dpuaa50eEwtQbCYJbEtloth3qexovk7fZ9FzEynontg1LxE0wFonh7lhUtsKzpL6gvh3gqA10WVqFwHLem/Zld0jw== X-MS-TrafficTypeDiagnostic: CY1PR0201MB0586: X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB0586;31:tHyUaYU1DUBjdVZlLfvCCRWnLm5GT3VISVyyNF41ahbUtXn4VujEMK1Qi6V1TtRSyYi5B/vv0gcf32waf6mxMBDkaeiB0WDnrxtvxTATKwg23JlQsgmdwZncs/WX/D2vgKkops9et2Rh5HSFr78fRpJcoXMvMFTePqIuu1ljcUNcFZV1FVRQ/DqZvbUb+S59G96dYeMOWiqtZZ0LNayUSY5ZzbXsK1VIhVoBlP3yWEw=;20:3L66DhFwUCEVquzeEEYFTQdQWCNLW8UFrcRMUpXVTNVjXCsKEpNbTQAjT90mP/pgkBUBA0ZVaANUSyP41znayeNGKLT7XG9qbakiXq6pa1TBTByj4oQaZytJrMUbKaPp04AzWdIbWMFdbxDQXRz3vTNGKxBWRpvSBiJASnZT8gzQ34RXb81CyEPl1WfMEuBkEO1gTcXaxXp+BcuWs1ql3Urwj2AfLQvvPcGKeTb/xJrgXDMA6SlKghuSrDUHJRuE8vY2qgtJIDWGbPij7w0twH2onAgNi4WnYeupbrvubJXq+7y1KU4hsFl6mDwn1FVj6ScYR10dlr7/tH1BdWobD1Cb+4ZfNbNuax7fnmV/t4yhrpEelgEspXoDB4sbOVv3YmrlbNP0sDO9g2YhAWXsRtFcL4KbIHWD0ZfIA64CqjI+wdNZfqqnBM03SJvbxybcstEmuhzLQgdxBKtRzNmi/DAbQH/kYk+Ek15FN/GohZWV3NjNawS4+MGCLwBnFEHE X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011);SRVR:CY1PR0201MB0586;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB0586; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0201MB0586;4:NqAnac3/dn2cUeQAQLJj2BwW16jpLHN2ZXYGhWGbV+eSVBHh92j5WlRehrZmf1VJVoyVDtiFMnxN87LkCqou2RJ7ncaExLMiv+We0S/DRm1AB7h/zTO5p4x/FGL7mwfPIA0vdVNJBjGu5TGDVQBem/inNWHpL2JF43fECGzvhVF4eRBPWYaKcE6NqvYfbgVCy8YOCnJyterX5VIYUigeCgpERCSTmSTWJm1z9xBbrJYKCGwmub2o9oIw9ZBK6d6KNEgASE7iXkl2B/SlurxuORCcYMQe+Ny5/Z7RUIUd0U/N0wUfN24uhlRWMQm6sPkm X-Forefront-PRVS: 0638FD5066 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0201MB0586;23:QWBCj77uveN2b1J5X5SQ5YQg9K2OAl+r3rDVCQY?= =?us-ascii?Q?03S4DKBWQ2hj1iEt35fMmshbnsmnEeIkN3zC0LNspm/5g5Fi+D+Nm4FBNJwy?= =?us-ascii?Q?eURXdNzOB6EYVhBx3AzzZVyLoJvRdP6elT3Drof2hyg30j85YeoqW+UDjbaX?= =?us-ascii?Q?WJNRSnkFXkvKcadtKaO3qAt61POsDAEiAI3eZQjQGdz3g8X99tmECzjQZ9cU?= =?us-ascii?Q?PZWepKg7vm2cvaLhf5LV68OI8b38qbqUw4buu943hiI7LqqmcDJ9hwy0/WHE?= =?us-ascii?Q?/HrnjrAXR0F9PMea+BxKytYsNnPhSYMEslpgc9yiQ+OAn20E6updhgnCZOn6?= =?us-ascii?Q?Bnc1bqCEI/KcIjyVUlyq7Kz9arDxwWkQTtW9jhFzKNRsGmMpdCWegAkcapTa?= =?us-ascii?Q?bQC3zyWUfM1JeHtFuxTKLk6xFex4XsIu25dKYzbm5yrIdfCCz7+Axnv4PFfL?= =?us-ascii?Q?8x7dLS1LCkJ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Fjytpp6vMNT7+6CIK1Qkj+9VyvTMLdx6Fcgj3iueb++wHtN3UH8wtaOzF39PdJOLtWD+cRDY4euTFKFULJsmarif5bwIeGlEBupgolmzIvB1+oXEzA5h8yHz6S/nrujVAE31zCHQogF914VXxw1OiiytDcCYG7BTDb08FXCbXY3shotqzWP6yHajjV7/m3+nAtDx3n/OdPP2e/ImocPyhfaDR6y05KsQRqOrlSV X-MS-Office365-Filtering-Correlation-Id: b35675ad-baec-4a1b-6f22-08d59f1ac6ab X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2018 19:39:28.4507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b35675ad-baec-4a1b-6f22-08d59f1ac6ab 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: CY1PR0201MB0586 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajan Vaja Add debugfs file to control clocks using firmware APIs through debugfs interface. Signed-off-by: Rajan Vaja Signed-off-by: Jolly Shah --- drivers/firmware/xilinx/zynqmp-debug.c | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c index 1cb69f7..837fcd1 100644 --- a/drivers/firmware/xilinx/zynqmp-debug.c +++ b/drivers/firmware/xilinx/zynqmp-debug.c @@ -34,6 +34,15 @@ static struct pm_api_info pm_api_list[] = { PM_API(PM_GET_API_VERSION), PM_API(PM_IOCTL), PM_API(PM_QUERY_DATA), + PM_API(PM_CLOCK_ENABLE), + PM_API(PM_CLOCK_DISABLE), + PM_API(PM_CLOCK_GETSTATE), + PM_API(PM_CLOCK_SETDIVIDER), + PM_API(PM_CLOCK_GETDIVIDER), + PM_API(PM_CLOCK_SETRATE), + PM_API(PM_CLOCK_GETRATE), + PM_API(PM_CLOCK_SETPARENT), + PM_API(PM_CLOCK_GETPARENT), }; /** @@ -87,6 +96,7 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret) const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops(); u32 pm_api_version; int ret; + u64 rate; if (!eemi_ops) return -ENXIO; @@ -132,6 +142,44 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret) pm_api_ret[2], pm_api_ret[3]); break; } + case PM_CLOCK_ENABLE: + ret = eemi_ops->clock_enable(pm_api_arg[0]); + break; + case PM_CLOCK_DISABLE: + ret = eemi_ops->clock_disable(pm_api_arg[0]); + break; + case PM_CLOCK_GETSTATE: + ret = eemi_ops->clock_getstate(pm_api_arg[0], &pm_api_ret[0]); + if (!ret) + sprintf(debugfs_buf, "Clock state: %u\n", + pm_api_ret[0]); + break; + case PM_CLOCK_SETDIVIDER: + ret = eemi_ops->clock_setdivider(pm_api_arg[0], pm_api_arg[1]); + break; + case PM_CLOCK_GETDIVIDER: + ret = eemi_ops->clock_getdivider(pm_api_arg[0], &pm_api_ret[0]); + if (!ret) + sprintf(debugfs_buf, "Divider Value: %d\n", + pm_api_ret[0]); + break; + case PM_CLOCK_SETRATE: + ret = eemi_ops->clock_setrate(pm_api_arg[0], pm_api_arg[1]); + break; + case PM_CLOCK_GETRATE: + ret = eemi_ops->clock_getrate(pm_api_arg[0], &rate); + if (!ret) + sprintf(debugfs_buf, "Clock rate :%llu\n", rate); + break; + case PM_CLOCK_SETPARENT: + ret = eemi_ops->clock_setparent(pm_api_arg[0], pm_api_arg[1]); + break; + case PM_CLOCK_GETPARENT: + ret = eemi_ops->clock_getparent(pm_api_arg[0], &pm_api_ret[0]); + if (!ret) + sprintf(debugfs_buf, + "Clock parent Index: %u\n", pm_api_ret[0]); + break; default: sprintf(debugfs_buf, "Unsupported PM-API request\n"); ret = -EINVAL; -- 2.7.4