From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C672C43381 for ; Wed, 13 Mar 2019 16:40:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29C222087C for ; Wed, 13 Mar 2019 16:40:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CgQrnOav"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SmizgUaS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29C222087C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eTewy2oKzexAVgJ+aJsg5KAgufPt2M6Hhke/FHd3Ewk=; b=CgQrnOavTLbGhv HdLYcw0twMabsoyP8Kf4r16RrdmrY5dCwtKKHpjgy6vUBoSQ8llX6anAmSkbXIsNaFhgwLBYce3Cl 1X7ln8Rt7tkU/bNPdcDa7/81CpX7YPCAWzhnkMfgkFBSLy6rkb+5Y/DdcwI8869wceFbw/z9IJwB7 +2+59ZF7IfAceSnoTVDwlgAniLNspN+Oku1FBaM8OOAxkR9JgeOT49YTZYwoFXfsZ0cWizGlboww/ aRtO1naOjoHDo1tu2QekrO1dDszfH+xoup0qkcNiTbBIcj8U0pYn2fZYldCok7eG1WFByqFBgD+hB pnzR939rOt66kIj2VAGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h46vP-0007Uf-HU; Wed, 13 Mar 2019 16:40:15 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h46vN-0007UW-NR for linux-arm-kernel@bombadil.infradead.org; Wed, 13 Mar 2019 16:40:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WjCjV/F6nr8/UL9RYToBoO/aPLEhv6luv25j7BLovLI=; b=SmizgUaSokn28tsrZUvCgtfdF Ibpz/2hucvXGu5us5S8Aw23mqruhExzlSxaYdzRDNSSojbSbGV7V4rEa98gCHdSFJkIv1ZhHBh8bG n2nY56LqAgwSHortj58LeTRcIHN2Y7TeWVAud2mx1qnEmEpRf8cycJQ80znUw0JffzjQwjjcdespW WthaGLlIjNNkhYkdE5MUDyCM4gfQOWWs6KT2I/gQADkkGr/6DqvTGourihWKV8BJtlStV07hyX7Xq jLmR4FBerQItxI0kMgH0dx4HeuRZHz1e00ojqe6sjr4bCYwDrkEqGV0oNCQrdxARputc+cyQWRNF5 WIPOJZgMg==; Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h46vJ-000253-IJ for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 16:40:11 +0000 X-Originating-IP: 109.213.209.9 Received: from localhost (alyon-652-1-66-9.w109-213.abo.wanadoo.fr [109.213.209.9]) (Authenticated sender: gregory.clement@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 2E0391BF21B; Wed, 13 Mar 2019 16:39:36 +0000 (UTC) From: Gregory CLEMENT To: Viresh Kumar Subject: Re: [PATCH 1/2] cpufreq: armada-37xx: fix clock parenting In-Reply-To: <20190311053130.qrobxd2wn75nrgbf@vireshk-i7> References: <20190308164710.10597-1-gregory.clement@bootlin.com> <20190308164710.10597-2-gregory.clement@bootlin.com> <20190311053130.qrobxd2wn75nrgbf@vireshk-i7> Date: Wed, 13 Mar 2019 17:39:36 +0100 Message-ID: <87pnquvid3.fsf@FE-laptop> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_164009_696895_FFBD8C78 X-CRM114-Status: GOOD ( 14.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Vincent Guittot , Jason Cooper , Christian Neubert , Antoine Tenart , linux-pm@vger.kernel.org, Ilias Apalodimas , "Rafael J. Wysocki" , stable@vger.kernel.org, Maxime Chevallier , Thomas Petazzoni , =?utf-8?Q?Miqu=C3=A8l?= Raynal , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Viresh, On lun., mars 11 2019, Viresh Kumar wrote: > On 08-03-19, 17:47, Gregory CLEMENT wrote: [...] >> parent = clk_get_parent(clk); >> + >> + /* >> + * Unset parent clock to force the clock framework setting again >> + * the clock parent >> + */ >> + clk_set_parent(clk, NULL); >> + >> + /* >> + * For the Armada 37xx CPU clocks, setting the parent will >> + * actually configure the parent when DVFS is enabled. At >> + * hardware level it will be a different register from the one >> + * read when doing clk_get_parent that will be set with >> + * clk_set_parent. >> + */ >> clk_set_parent(clk, parent); >> } > > Maybe this should be done right from the clock driver instead? As cpufreq may or > maynot be enabled by default (Surely most of the people will always enable it, > but I am just trying to find the right place for doing this). The way we are > setting the clock parent isn't that great, and looks a bit hacky just because of > the way clock framework is. Maybe doing it directly, without getting clock > framework in between, from the clock driver may look sane ? I've just sent a patch following your suggestion to the clock mailing but keeping you in CC too. Gregory > > -- > viresh -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel