Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1374395ybz; Fri, 1 May 2020 21:41:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLsoXeDv/OBbr3Me6QkfLpKaxvO4MBMrdL5xflHSgL674H9IEX2EAZQXay8K50oGSASfs4q X-Received: by 2002:a05:6402:31b1:: with SMTP id dj17mr6000029edb.146.1588394504026; Fri, 01 May 2020 21:41:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588394504; cv=pass; d=google.com; s=arc-20160816; b=Ia8fwOmFfqlcWMpZYpW5YUXBW/qgnUnn8nHZnRSSEWlbUtG9XAUrRUZ0NX6xLzTckP ICZ6AzG8WSw1xjK6CThl/HaPwNOB2fMaPPFNMibQq4Ti/2rzPySBT9896ASz8NY8dhLm zvkorvSIYfd7IXF7t/5bWS504ucMcTvE5D77z9ztMg+xQeCwqMiYmiLTZ7FvhDn6Hdfr OLz3xbs8gSulJ/BGDS+cfV7LOknN8jtaVPeLAWcABnmYNjnLIto6TYx/PdZyUWJdYzMe Tew4pOvjnCrt767uZ0B36cyxDYyXO+Xy/ewoFttu6y8wHDqZ5DYuToUjtRKKNpHH4LNG hiqg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QJfiyrZ9gRa2hO4SmvSP/QAj6O9n7lxEUGz9Ogi1kMI=; b=S2VTLBh4CmoliU9u7Z/DCMqB/cEEORUL1c3ATjJc4f2axeFHdBnjiKUgQOlmkvdGmx +l5+5iBNNDISFGmVgLrlMDDOY3r8/BZmText+ZqRZDti8MDdofLw8q2tAqXMiR2f1dkq ffVVQzzxt/MELJNS/g/LuFAIQlShW8oU4fEx292QBVgnISM9BrKUfugijv1vzr6vjp8I FUnrY0xWWKBztOyrQM4NjqapmaSyp3yUpADfWqz9KDZprL0k3LvRa4cgBIcdESb2Q1kc Ge5r72oEcgise0OD/wUqpwloJMesY7rJf1wRlWEnauK24IgPGrW98FaMgBBoElJFU4Rd jtUA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=pV8ZvRgo; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd8si3156438ejb.486.2020.05.01.21.41.21; Fri, 01 May 2020 21:41:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@xilinx.onmicrosoft.com header.s=selector2-xilinx-onmicrosoft-com header.b=pV8ZvRgo; arc=pass (i=1 spf=pass spfdomain=xilinx.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727889AbgEBEh3 (ORCPT + 99 others); Sat, 2 May 2020 00:37:29 -0400 Received: from mail-dm6nam11on2074.outbound.protection.outlook.com ([40.107.223.74]:6039 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726764AbgEBEhU (ORCPT ); Sat, 2 May 2020 00:37:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aVWYEdWWm5r8J4302K/amhzEf3c0Mm7nUQakiGzqJmA4Sjpt8AiFHwB59qKx0EDXWvgp3ztti2GN/h9PlS/BZXvv7//YTdV8t9kuvjtmbAugDkiAWLCDrnG1WUBlizOSip1y+FxgQWCcWlUjzY4T1bjp3rzVyJGWCIJy3Q2PLeRe9RAchfEOxxRxBn70Q+OlOHEkxqzUbCSW1dmb5xLgiyWBWFwuSF2T4cqfBb5fRJIGiaQhFgDqZ9/MjvJTo7uih3fkpEa6Rn3Cz9UGh/w5UArfElIpXTWJEvDxO2+0oalA97W1psuIfmHQXGk9WfHhbYBjz3YEwcejSixWHmtdOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJfiyrZ9gRa2hO4SmvSP/QAj6O9n7lxEUGz9Ogi1kMI=; b=En0kHX1U4Idy0pI0wMATRqGBS5ynBzjVHO45uJMgLnw1kw/QRAbrYJQXFS0hCNVcJ9yIOjnbqgubnCKkHtodeV8YBEwbg8WhNUEWmwb4y3jr/aR7y9pLpDy+apo2tIi+8ZS5swEbYbn1NVMIUNo2xhi9I6G73TkNPZ2/VcpVDtwAb+BKMTgxlgMGwCzIajae8bfYykvpBgYZ7XvofvY0GC3GsLrQvOAPuEvyRWy0dGwqpSF9lSesAF5ZQazeGh4+bjxDEHB1v2APouP73ODLoo2nCLpO6EjApvPsZ5XIdg3yFbVelyUFF1HMIRJSb48jLYYqxUtvkOq2IsB0J/k/Dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJfiyrZ9gRa2hO4SmvSP/QAj6O9n7lxEUGz9Ogi1kMI=; b=pV8ZvRgoJGp6ocb5tBonZQiOnYxPol4QIMWLj58gPo6VQrHIW4AeSraQLaYyz3gcS1mH22rkGFfoiDJAnTlMnz49P2EtINIo+LKdniIIMlbBiQubStETBZlMi3aaQ3lqA8dmj22ZVeN6oAXYGdlXBr80D+egB4tlUSGJQlAAJik= Received: from MN2PR20CA0014.namprd20.prod.outlook.com (2603:10b6:208:e8::27) by BY5PR02MB6723.namprd02.prod.outlook.com (2603:10b6:a03:213::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.27; Sat, 2 May 2020 04:37:15 +0000 Received: from BL2NAM02FT017.eop-nam02.prod.protection.outlook.com (2603:10b6:208:e8:cafe::81) by MN2PR20CA0014.outlook.office365.com (2603:10b6:208:e8::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Sat, 2 May 2020 04:37:14 +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 BL2NAM02FT017.mail.protection.outlook.com (10.152.77.174) with Microsoft SMTP Server id 15.20.2958.27 via Frontend Transport; Sat, 2 May 2020 04:37:14 +0000 Received: from [149.199.38.66] (port=34452 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.90) (envelope-from ) id 1jUjtn-0002fk-Dh; Fri, 01 May 2020 21:37:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1jUjtp-0004eZ-U7; Fri, 01 May 2020 21:37:13 -0700 Received: from xsj-pvapsmtp01 (smtp-fallback.xilinx.com [149.199.38.66] (may be forged)) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id 0424b50g002110; Fri, 1 May 2020 21:37:05 -0700 Received: from [172.19.3.8] (helo=xsjamitsuni50.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1jUjth-0004de-AM; Fri, 01 May 2020 21:37:05 -0700 From: Amit Sunil Dhamne To: mturquette@baylibre.com, sboyd@kernel.org, michal.simek@xilinx.com, mark.rutland@arm.com, linux-clk@vger.kernel.org Cc: rajanv@xilinx.com, jollys@xilinx.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rajan Vaja , Tejas Patel , Jolly Shah , Amit Sunil Dhamne Subject: [RESEND PATCH v2 3/4] drivers: clk: zynqmp: Fix invalid clock name queries Date: Fri, 1 May 2020 21:37:02 -0700 Message-Id: <1588394223-257635-4-git-send-email-amit.sunil.dhamne@xilinx.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588394223-257635-1-git-send-email-amit.sunil.dhamne@xilinx.com> References: <1588394223-257635-1-git-send-email-amit.sunil.dhamne@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;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapsmtpgw01;PTR:unknown-60-83.xilinx.com;CAT:NONE;SFTY:;SFS:(4636009)(346002)(376002)(396003)(39860400002)(136003)(46966005)(70586007)(70206006)(107886003)(356005)(26005)(82310400002)(186003)(478600001)(8676002)(336012)(4326008)(9786002)(8936002)(2616005)(36756003)(426003)(5660300002)(47076004)(2906002)(6666004)(54906003)(81166007)(7696005)(82740400003)(316002)(42866002);DIR:OUT;SFP:1101; MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 23a80819-1019-498c-71a3-08d7ee527cb1 X-MS-TrafficTypeDiagnostic: BY5PR02MB6723: X-Microsoft-Antispam-PRVS: Content-Transfer-Encoding: quoted-printable X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-Forefront-PRVS: 039178EF4A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: olngKhVorikGE6Atky4gSX2JM/94fD6XF38srnqeEca/uW/ERypmHuYuM1sdNrWsLnu6OT+QYJZF3fNdKZ3Vuxn43VdCqZakk1Nz31AzpWHRgF9mLWd2N1+X8vkOse0ybNtIhuAxusyRFdSa+QMNxqONquKHmU3N1KABMdIjWsQjQp+hhwO9wkAyrrF38oYsm+mT1B7q4Xis4nW1ieQOCjc/hKfTy4CR9r6fU7xMaRsXXTPgldnj2ToX527NXPbjKFCwk13hGsX6odo9AFp87eLySACH6oIIgvO1L0aar9IGo3N9QidwdB8A14BU019ocVhx5aRQLem7edOPwZc856xcLJQ8ljzXM6Hoq/86KLdISNV/9y2y0//sNizlYB0kgv+bfHTnmoEmIQokMxtiGaK/CjaTzhfrDAo6nOUiI50C0GO6oHlaWyCaYo/A9IpAMufmR7ifCXIm+iy108SmSlzp8ce6IksoZK002ayBjO1ngZsXbUQPPdrGvQWTq9+meja26auVUw7XKPZqQaiYHllTges9phliiYy61lCFJEs= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 May 2020 04:37:14.2857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23a80819-1019-498c-71a3-08d7ee527cb1 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: BY5PR02MB6723 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rajan Vaja The clock driver makes EEMI call to get the name of invalid clk when executing versal_get_clock_info() function. This results in error messages. Added check for validating clock before saving clock attribute and calling zynqmp_pm_clock_get_name() in versal_get_clock_info() function. Signed-off-by: Rajan Vaja Signed-off-by: Tejas Patel Signed-off-by: Jolly Shah Signed-off-by: Amit Sunil Dhamne --- drivers/clk/zynqmp/clkc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c index 10e89f2..3e83c51 100644 --- a/drivers/clk/zynqmp/clkc.c +++ b/drivers/clk/zynqmp/clkc.c @@ -663,6 +663,11 @@ static void zynqmp_get_clock_info(void) continue; clock[i].valid =3D FIELD_GET(CLK_ATTR_VALID, attr.attr[0]); + /* skip query for Invalid clock */ + ret =3D zynqmp_is_valid_clock(i); + if (ret !=3D CLK_ATTR_VALID) + continue; + clock[i].type =3D FIELD_GET(CLK_ATTR_TYPE, attr.attr[0]) ? CLK_TYPE_EXTERNAL : CLK_TYPE_OUTPUT; -- 2.7.4 This email and any attachments are intended for the sole use of the named r= ecipient(s) and contain(s) confidential information that may be proprietary= , privileged or copyrighted under applicable law. If you are not the intend= ed recipient, do not read, copy, or forward this email message or any attac= hments. Delete this email message and any attachments immediately.