Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756252AbcKBUEe (ORCPT ); Wed, 2 Nov 2016 16:04:34 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36817 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756126AbcKBUEb (ORCPT ); Wed, 2 Nov 2016 16:04:31 -0400 Date: Wed, 2 Nov 2016 13:04:27 -0700 From: Bjorn Andersson To: Sarangdhar Joshi Cc: Stephen Boyd , Andy Gross , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Jordan Crouse , Trilok Soni Subject: Re: [PATCH 2/3] firmware: qcom: scm: Remove core, iface and bus clocks dependency Message-ID: <20161102200427.GP25787@tuxbot> References: <1477699729-18451-1-git-send-email-spjoshi@codeaurora.org> <1477699729-18451-3-git-send-email-spjoshi@codeaurora.org> <20161101231101.GW16026@codeaurora.org> <67b6f5ae-378e-9306-c717-2529ae84f9f7@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67b6f5ae-378e-9306-c717-2529ae84f9f7@codeaurora.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1542 Lines: 47 On Wed 02 Nov 12:24 PDT 2016, Sarangdhar Joshi wrote: > On 11/01/2016 04:11 PM, Stephen Boyd wrote: > >On 10/28, Sarangdhar Joshi wrote: > >>@@ -380,33 +384,43 @@ EXPORT_SYMBOL(qcom_scm_is_available); > >> static int qcom_scm_probe(struct platform_device *pdev) > >> { > >> struct qcom_scm *scm; > >>+ uint64_t clks; > >> int ret; > >> > >> scm = devm_kzalloc(&pdev->dev, sizeof(*scm), GFP_KERNEL); > >> if (!scm) > >> return -ENOMEM; > >> > >>- scm->core_clk = devm_clk_get(&pdev->dev, "core"); > >>- if (IS_ERR(scm->core_clk)) { > >>- if (PTR_ERR(scm->core_clk) == -EPROBE_DEFER) > >>- return PTR_ERR(scm->core_clk); > >>+ clks = (uint64_t)of_device_get_match_data(&pdev->dev); > >>+ if (clks & SCM_HAS_CORE_CLK) { > >>+ scm->core_clk = devm_clk_get(&pdev->dev, "core"); > >>+ if (IS_ERR(scm->core_clk)) { > >>+ if (PTR_ERR(scm->core_clk) == -EPROBE_DEFER) > >>+ return PTR_ERR(scm->core_clk); > >> > >>- scm->core_clk = NULL; > >>+ scm->core_clk = NULL; > >>+ } > >> } > >> > >> if (of_device_is_compatible(pdev->dev.of_node, "qcom,scm")) { > > > >Why didn't this also get added to the flags feature? I'd prefer > >we either use of_device_is_compatible() for everything, or device > >data to figure out what quirks to apply. > > You're right. These flags are already added for "qcom,scm" compatible. We > can modify this to honor data flags only. I hope it's okay to update it in > the same patch? > Yes, you're replacing the old conditional with a set of new ones, so it should go in this patch. Regards, Bjorn