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=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 076E1C43381 for ; Thu, 14 Mar 2019 14:15:51 +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 CE40B2184E for ; Thu, 14 Mar 2019 14:15:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n4/ySilO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="S2H61cWm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE40B2184E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Sfi3p5sRLhUDJ9nSAy0vboN003ZO2J55FKgLZMKk0+4=; b=n4/ySilOj2ujai nWZFLZzFhMDH93QeSDXuoUPvmJeSUr4GDUOwp+RELHiA+QLe3b4dO3h98y6Rq4QLMmBywBLbrdvf9 UsPj3sN1I/yyeA+q15eyZM3sbC84OHvk3OZcSNl7FENIf36xKUwucPEnpcTKgwO5z2YSaofXXD4So KFpI/SY4Ntt5LfrW/+j6Wl05PZSUOWetGjPLRSjP46JN0Qt2k7qy10P3aJVtTBFHifVatD4/ic0q7 g7hr+kN+P38SnIga7m6Mx7o96JswC7mBV8wpi0H3L8+Atbbx2FO3fVazwAyX+zkfoKN/pm7q9nuht RKexXtrok6wd6lkWkwLA==; 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 1h4R92-0007aR-Db; Thu, 14 Mar 2019 14:15:40 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4R8x-0007a1-Hv for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2019 14:15:37 +0000 Received: by mail-wm1-x341.google.com with SMTP id e16so2929120wme.1 for ; Thu, 14 Mar 2019 07:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=h3eflKZ/U+x1paFTsOvszBUjr9EhFpJqq4bYYQGoa+s=; b=S2H61cWmmfRm4ITfBMNSrHCrGf/GTJgaOwZ4g/FegA2gYJCkz4zn7pytQvsbNB0IOa bLnr7CrxTbu8WqswdvALQ4B7AfEpI2Lz9bqiHTR+6rFxbcplUCZ2VxJHSE9tl1GqxXRn aWzVrwpHSuXC+HzCyGglLNGrVCis3g3oxzPQXi1xlrIKIGpt2ml7CTNWdgJS2V2c7BYi nTpYDa0ns4NVkhDB9XMU45GH0Zl96MM9ONub0LEDEtadWtd5XFFql1+ylJ3V/xUH9GJe 0ZYSoLVnfYr5NP1ANn+SNqjhcBxCpW4uGwxsXW2RvFQp02HCNlgXEQ2ufyJ9Riulb3K7 3dEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=h3eflKZ/U+x1paFTsOvszBUjr9EhFpJqq4bYYQGoa+s=; b=tdZnafK/RWteBUWeoaChcXIJ1wb08Y6DxxDudTsi1dJwHS/0Z3yW+qXZbyatOI5w6S ht0SbrfPu0SUjvMj7NoLHv9aMhk0wY7iGOdKmV/2J4ERaqRoxm+QqZa1XWS3Qv4HpGj0 luV+vsJy6sfnVdEGifp5a1z8K4RHOzg5LFyqUvSOuTcnbH3tCxfvkWquTTdIQc0hKQWA JNrb13cMWjXb0Ta63xXqpR2dEWJ+KaVCCwNZ0J0A/bB0qpjBhXT6SCD4A9kOS4Uc6Bhc FxaA0tiCwNi9iXNBOOn9gE1P3WuUXQag1XxqXiogH5++oNTv9IXehlyxTGsRYoJ/osdG 5D0g== X-Gm-Message-State: APjAAAXe4/iAWPsXpSboZ+gepch28IUOsaOFP05SHMTN7nb/0SJaHF0b i3Er32Wkw+WoCnGUrJ8BEriSTw== X-Google-Smtp-Source: APXvYqyK0Q6clg15VvUmDjviOAXe+jXX97QGLM+FHc8soM2FhJI3TH7F+eHhxxDxOx0AQSXvjOOMqA== X-Received: by 2002:a1c:64c1:: with SMTP id y184mr2752559wmb.0.1552572933333; Thu, 14 Mar 2019 07:15:33 -0700 (PDT) Received: from apalos (ppp-94-64-206-130.home.otenet.gr. [94.64.206.130]) by smtp.gmail.com with ESMTPSA id e12sm17266135wrs.91.2019.03.14.07.15.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:15:32 -0700 (PDT) Date: Thu, 14 Mar 2019 16:15:29 +0200 From: Ilias Apalodimas To: Christian Neubert Subject: Re: [PATCH] clk: mvebu: armada-37xx-periph: Fix initialization for cpu clocks Message-ID: <20190314141529.GA5576@apalos> References: <20190313163558.6705-1-gregory.clement@bootlin.com> <20190314121541.GB19385@apalos> <20190314134428.GA24768@apalos> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_071535_664774_AA263089 X-CRM114-Status: GOOD ( 30.25 ) 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 , linux-pm@vger.kernel.org, Antoine Tenart , Stephen Boyd , Gregory CLEMENT , =?iso-8859-1?Q?Miqu=E8l?= Raynal , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-clk@vger.kernel.org, Thomas Petazzoni , Viresh Kumar , Maxime Chevallier , Mike Turquette , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, > Hi, > = > the cpu frequency scaling never worked right (only on the 4.4 kernel from > marvell). If you use the 1000 MHz firmware you are running with just 800 > MHz (this is the case on my board with a current firmware). > > Just have a look what the kernel thinks it is running at (frequency). Ok, probably my bad here. By 'worked fine' i mean that this didn't lead to = any = freezes or panics. I know the actual frequency wasn't set properly Regards /Ilias > = > Regards, > Christian > = > Ilias Apalodimas schrieb am Do., 14. M=E4rz > 2019, 14:44: > = > > Hello Christian, > > > Hi, > > > > > > I assume you use the 1000 MHz firmware. This does also not work on my > > Rev 7 > > > board. But I'm pretty sure this is not a problem of the patches, beca= use > > if > > > I take a newer kernel (4.19.20/27) without the patches it also does n= ot > > > work. A kernel 4.19.17 does work for me. My opinion on that is that t= his > > is > > > another problem which does just occure now because now the cpu freque= ncy > > > scaling is working with the right frequencies. > > I am not sure which firmware i am running, i did all my tests on 5.0.0 = and > > changing between governors worked fine without the patches > > > > Regards > > /Ilias > > > > > > Ilias Apalodimas schrieb am Do., 14. M= =E4rz > > > 2019, 13:15: > > > > > > > Hi Gregory, > > > > > The clock parenting was not setup properly when DVFS was enabled.= It > > was > > > > > expected that the same clock source was used with and without DVFS > > which > > > > > was not the case. > > > > > > > > > > This patch fixes this issue, allowing to make the cpufreq support > > work > > > > > when the CPU clocks source are not the default ones. > > > > > > > > > > Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") > > > > > Cc: > > > > > Reported-by: Christian Neubert > > > > > Reported-by: Ilias Apalodimas > > > > > Signed-off-by: Gregory CLEMENT > > > > > --- > > > > > drivers/clk/mvebu/armada-37xx-periph.c | 11 +++++++++++ > > > > > 1 file changed, 11 insertions(+) > > > > > > > > > > diff --git a/drivers/clk/mvebu/armada-37xx-periph.c > > > > b/drivers/clk/mvebu/armada-37xx-periph.c > > > > > index 1f1cff428d78..26ed3c18a239 100644 > > > > > --- a/drivers/clk/mvebu/armada-37xx-periph.c > > > > > +++ b/drivers/clk/mvebu/armada-37xx-periph.c > > > > > @@ -671,6 +671,17 @@ static int armada_3700_add_composite_clk(con= st > > > > struct clk_periph_data *data, > > > > > map =3D syscon_regmap_lookup_by_compatible( > > > > > "marvell,armada-3700-nb-pm"); > > > > > pmcpu_clk->nb_pm_base =3D map; > > > > > + > > > > > + /* > > > > > + * Use the same parent when DVFS is enabled that the > > > > > + * default parent received at boot time. When this > > > > > + * function is called, DVFS is not enabled yet, so = we > > > > > + * get the default parent and we can set the parent > > > > > + * for DVFS. > > > > > + */ > > > > > + if (clk_pm_cpu_set_parent(muxrate_hw, > > > > > + > > > > clk_pm_cpu_get_parent(muxrate_hw))) > > > > > + dev_warn(dev, "Failed to setup default pare= nt > > > > clock for DVFS\n"); > > > > > } > > > > > > > > > > *hw =3D clk_hw_register_composite(dev, data->name, > > > > data->parent_names, > > > > > -- > > > > > 2.20.1 > > > > > > > > > Applied this and selected only > > > > > > > > CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=3Dy > > > > CONFIG_CPU_FREQ_GOV_PERFORMANCE=3Dy > > > > CONFIG_CPU_FREQ_GOV_POWERSAVE=3Dy > > > > > > > > After changing the governor from 'powersave' to 'performance' the b= oard > > > > completely froze (i even lost access to the serial port) > > > > > > > > Cheers > > > > /Ilias > > > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel