Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9649323imu; Wed, 5 Dec 2018 08:09:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/V+VPdL/al9FmgNhQxlRE6KH+rQeYiEZJ1SUR0trpCW9HgerqFaIBE1R6O8MW2ADEsw2P50 X-Received: by 2002:a62:7652:: with SMTP id r79mr25813419pfc.241.1544026160720; Wed, 05 Dec 2018 08:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544026160; cv=none; d=google.com; s=arc-20160816; b=U2jd0AXAwpREii/a6qNCpoIxe+5UOZxcU5mCm/jUFUN6TTXJB1QmC8AQCttqqbVvYI AkHqRz8jpg1nmLX/YEc+uQgV4tv/zeVHHtV5HQRChwdtq7ZfjaiNmfyh9jHEH3g0cYKf S193W3Af7v3KkLhu8Q9SO39X54Kx8DG9VhF2ooMcABbQU9WPOI9jmTmcXPMqPLf4KsJR sErG4/P7Bz0Wv5eR43StqMX7aHK/HMwhc2+BOUtNLFSCykeoktM2xvRhMDZoTIu3gpK+ gigSIuxPAeP5WQ9KaCrOM08Vgx++tFkmgBWDe096hPg/43go1Mi2NqslxPkpH0l6P60c DCNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=/l7S3aUmomKfepTqvD1Y8uHIXlWt/XsbCSPYrgqfbDY=; b=TvCJR33K9obxikeqhc+zaCJqAI+hPiAvqp8n7r1jRhM6PA3ZTO4YL3S4oI8bGDNOi8 w8vjWd+nh0T8m+WWNXn925MNLZtB0Glep9Bn05GZYyQAkH7tyrpJAdktUwjmREf8wPyr pnQ0u3XEM1DRPTfm52VFUHvSIhfw2KwYsEhEC9uTbBP1HXzohyJuO+J1Ad15z1sTHEUY 9la3AglUcuo3L7sljUioKSM6wa8yKuFo/pBhPAQqJCeH6VQXshOH3E4zM2b0vDLSxn7P 89OOljc32lD9jNNMnD5+FSJLPNVesp9G0MIOSrV6lHDziRC6hslslX9gX3VZxlDcgedh +orQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=default header.b=XksMBmHl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v32si22054211plb.369.2018.12.05.08.09.05; Wed, 05 Dec 2018 08:09:20 -0800 (PST) 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=fail header.i=@kernel.org header.s=default header.b=XksMBmHl; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbeLEQIC (ORCPT + 99 others); Wed, 5 Dec 2018 11:08:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:34376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727103AbeLEQIC (ORCPT ); Wed, 5 Dec 2018 11:08:02 -0500 Received: from localhost (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 8B6BE2084C; Wed, 5 Dec 2018 16:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544026081; bh=/UF/MxvG92TnyDRm5hcG3+fOPtnFWrk4VZx+jrKEyM0=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=XksMBmHlS6sPDomWwXj6+pM+Y681CsdvtgXywZx1Baas4NmgDQH1QtpWiUycPYv00 q6+Jsvnu/m/P7tBV4HgdH4bXSgkYA+4GcWMmgCRHDx9RZBdkGtq5IQ/B0ucera57OC /OzR4YywFNHaCSg/L9OhClrxAvIdeVT9RqUuk1fk= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Sylwester Nawrocki From: Stephen Boyd In-Reply-To: <3bb9f4b5-e069-79fe-6ab3-2750c6191e57@samsung.com> Cc: k.konieczny@partner.samsung.com, linux-samsung-soc@vger.kernel.org, Chanwoo Choi , Rob Herring , Mark Rutland , Kukjin Kim , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20181204165248.17572-1-k.konieczny@partner.samsung.com> <20181204165248.17572-6-k.konieczny@partner.samsung.com> <154394884525.88331.3007383362383800806@swboyd.mtv.corp.google.com> <3bb9f4b5-e069-79fe-6ab3-2750c6191e57@samsung.com> Message-ID: <154402608077.88331.684195407604647728@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v3 5/5] clk: samsung: exynos5433: add imem clocks Date: Wed, 05 Dec 2018 08:08:00 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Sylwester Nawrocki (2018-12-05 02:57:32) > On 12/4/18 19:40, Stephen Boyd wrote: > > Quoting Kamil Konieczny (2018-12-04 08:52:48) > >> + > >> +static const unsigned long imem_clk_regs[] __initconst =3D { > >> + ENABLE_ACLK_IMEM, > >> + ENABLE_ACLK_IMEM_INT_MEM, > >> + ENABLE_ACLK_IMEM_SSS, > >> + ENABLE_ACLK_IMEM_SLIMSSS, > >> + ENABLE_ACLK_IMEM_RTIC, > >> + ENABLE_ACLK_IMEM_SMMU_SSS, > >> + ENABLE_ACLK_IMEM_SMMU_SLIMSSS, > >> + ENABLE_ACLK_IMEM_SMMU_RTIC, > >> + ENABLE_ACLK_IMEM_ARBG_TX, > >> + ENABLE_ACLK_IMEM_SMMU_ARBG_TX, > >> + ENABLE_PCLK_IMEM, > >> + ENABLE_PCLK_IMEM_SSS, > >> + ENABLE_PCLK_IMEM_SLIMSSS, > >> + ENABLE_PCLK_IMEM_RTIC, > >> + ENABLE_PCLK_IMEM_SMMU_SSS, > >> + ENABLE_PCLK_IMEM_SMMU_SLIMSSS, > >> + ENABLE_PCLK_IMEM_SMMU_RTIC, > >> + ENABLE_PCLK_IMEM_SMMU_ARGB_TX, > >> +}; > >> + > >> +static const struct samsung_gate_clock imem_gate_clks[] __initconst = =3D { > >> + /* ENABLE_ACLK_IMEM */ > >> + GATE(CLK_ACLK_AXI2AHB_IMEMH, "aclk_axi2ahb_imemh", "aclk_imem_= 200", > >> + ENABLE_ACLK_IMEM, 24, 0, 0), > = > I don't think that clock will ever need to be disabled/enabled, so I would > drop this definition. The clock will remain in its default state after re= set > (enabled). > = > >> + GATE(CLK_ACLK_AXIDS_SROMC, "aclk_axids_sromc", "aclk_imem_200", > >> + ENABLE_ACLK_IMEM, 23, CLK_IGNORE_UNUSED, 0), > > = > > Why is there so much use of CLK_IGNORE_UNUSED in this file? > = > I suppose CLK_IGNORE_UNUSED is needed because there is no drivers that > would enable required clocks. For some clocks the flag could probably > indeed just be omitted, e.g. SLIMSSS clocks. = > = > I'm inclined to just define clocks that we are confident about and which > are needed now. i.e. the SSS IP block clocks. So in include/dt-bindings/ > clock/exynos5433.h we would have something like: Agreed, it doesn't make much sense to add clk support for clks that you'll never need to modify one way or the other. > = > +/* CMU_IMEM */ > +#define CLK_ACLK_SSS 1 > +#define CLK_PCLK_SSS 40 > = > +#define IMEM_NR_CLK 41 > = > The other clocks could be added later as needed by someone who has = > detailed knowledge about respective peripheral blocks. > = The slow addition of new clks to the binding header file makes for an integration problem, so can we try to expose any clks that we know about now as defines and make them not work if the driver isn't implementing support for those clks? That way the binding is not changing but the implementation can decide to support or not support certain clks.