Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1634256pxa; Thu, 13 Aug 2020 13:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFAStZvb8M5Kh9uBDDbzveG22IDaMz8SkBvP84fd6gaEqTJIhoaqnZN7B6tzQzix3LJ4/a X-Received: by 2002:a17:907:2087:: with SMTP id pv7mr6313804ejb.452.1597349581593; Thu, 13 Aug 2020 13:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597349581; cv=none; d=google.com; s=arc-20160816; b=ZlsZ8CB57C9yEN72lPgQT3VwvEqSkRijSg7ue23Lad2bkM8IQgluLX/9S2hmiFBLxk VRIC2Fa6hGN0BsdpmUv/4IAAge5B/5b/4cK6MPFVx3l6Z0ydpQAJZh5/Il37YWYcNm8r AToiu462l4Z/nB3hhbIohvH0AuW1XBZ9icKhg1Ta99IL/+t3zX+rtedV8MAKCoWD6f1H 6QZhj4DqBC5ARydio1vT9hMa5R4Udc14nANn/SxQOsq/1ubKn+iUCG1m8YWyK2gFMuNd PVa1qzZv5hPB27yoA/QbBYY98T6jMmVfbt2YPHd2FcW22AvAvUb6sqGJ9c0GcR1FFIoH nfJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=u2yIndohcAS2SUxtUsdmbFc2gyRKoiwOEF5InLMIw/g=; b=iXoriXuN57CBLVDZhXsI+elarMrW6Xlb4tXeCsuvZHk4lDg21aIXBV70q8cMaYhMO8 MtKvcyuC1xOfq5MkrPMn9Gfh8OdRkV6slA3TPlxAMPXN382G/MseChqI6Ox3lO6Etom+ xaUw3VbCEKP7TR87BzqFQRVaxLoIY6+UyqPjqMDT5GqGVnwe03GXTmeqSPXaztyQHwLG obtYQZ1kd6R6S8W7Mou4eKwzfVrwbGjXZ4OOB/PQGOGzuxFv+Zzi98CUO2AQP8aycJ7o WUuQON9KdRINmdyJgc53Oh+y4UO9/+u5M+PT8q4O6i9FutpDvP6AYefge+5M+SWHao0n rSew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ol/0ePVa"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si3970965eji.408.2020.08.13.13.12.35; Thu, 13 Aug 2020 13:13:01 -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=@kernel.org header.s=default header.b="ol/0ePVa"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbgHMUJq (ORCPT + 99 others); Thu, 13 Aug 2020 16:09:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:53094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbgHMUJq (ORCPT ); Thu, 13 Aug 2020 16:09:46 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFD1F20675; Thu, 13 Aug 2020 20:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597349386; bh=9o4NwebGGbxvd/86oZSJIvwqTDkh55whrbF7MItOn4o=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=ol/0ePVa0tGAd9lxW9H0i6YdWritPzpkZlvmOPNfNU+LFlNlcLXVGVMjYJvE3Ej1E dFCFlu8ujl0DbSihAgGSDUjakJ4j9RXrLW/Vh8totrkas5/MjuG8hPMYLrMshMaqSH fXf0ZuhMiB3oe4iSkWg5UKod5Vo5PT05UNS9s26k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1596523457-40465-2-git-send-email-amit.sunil.dhamne@xilinx.com> References: <1596523457-40465-1-git-send-email-amit.sunil.dhamne@xilinx.com> <1596523457-40465-2-git-send-email-amit.sunil.dhamne@xilinx.com> Subject: Re: [PATCH v3 1/3] clk: zynqmp: Use firmware specific common clock flags From: Stephen Boyd Cc: rajanv@xilinx.com, jollys@xilinx.com, tejasp@xilinx.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rajan Vaja , Tejas Patel , Amit Sunil Dhamne To: Amit Sunil Dhamne , linux-clk@vger.kernel.org, m.tretter@pengutronix.de, mark.rutland@arm.com, michal.simek@xilinx.com, mturquette@baylibre.com Date: Thu, 13 Aug 2020 13:09:44 -0700 Message-ID: <159734938481.33733.13244969868345160087@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Amit Sunil Dhamne (2020-08-03 23:44:15) > diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c > index db8d0d7..d813c34 100644 > --- a/drivers/clk/zynqmp/clkc.c > +++ b/drivers/clk/zynqmp/clkc.c > @@ -271,6 +271,33 @@ static int zynqmp_pm_clock_get_topology(u32 clock_id= , u32 index, > return ret; > } >=20 > +unsigned long zynqmp_clk_map_common_ccf_flags(const u32 zynqmp_flag) > +{ > + unsigned long ccf_flag =3D 0; > + > + ccf_flag |=3D (zynqmp_flag & ZYNQMP_CLK_SET_RATE_GATE) ? Please use an if condition instead if (zynqmp_flag & ZYNQMP_CLK_SET_RATE_GATE) ccf_flag |=3D CLK_SET_RATE_GATE; if (zynqmp_flag & ...) > + CLK_SET_RATE_GATE : 0; > + ccf_flag |=3D (zynqmp_flag & ZYNQMP_CLK_SET_PARENT_GATE) ? > + CLK_SET_PARENT_GATE : 0; > + ccf_flag |=3D (zynqmp_flag & ZYNQMP_CLK_SET_RATE_PARENT) ? > + CLK_SET_RATE_PARENT : 0; > + ccf_flag |=3D (zynqmp_flag & ZYNQMP_CLK_IGNORE_UNUSED) ? > + CLK_IGNORE_UNUSED : 0; > + ccf_flag |=3D (zynqmp_flag & ZYNQMP_CLK_GET_RATE_NOCACHE) ?