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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 48B99C43381 for ; Mon, 18 Mar 2019 11:28:58 +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 151AC2085A for ; Mon, 18 Mar 2019 11:28:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ejBpQBa8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bgDk5B/H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 151AC2085A 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=LG/Fp6UgdSXxTO5R1RVCFQnaV2/3A8uRd/s8/6lRY+8=; b=ejBpQBa87BHoNQ 9nM4CozSe6mnkdjMYHQpBfdlHmkTNur/1jdpfybyxbGkdaBXm+c8+USmolfZLCaxo9BQU9bPBzJmq mF8eWQ94C0f/XS5Gl8PzVbmrxFXp/JX8ONfQBBoYmsn8zHpmsHfcWeTw09pj4rNzr1CoaO/D9inrR y9m0PpxbEc3mnjD6ZFd0IoAdHY0jhh7RtfiBPQIIJ8HHzid9gqiPB6ryFcPQX8y8OtWCtLzKHbnW8 /NC0SoCxULkgGU2FkImO/lT8Rx2oKFnFIpGHbbzp8h/dssNw64L9007tX4xhNkZAMUe9xs+BLEGYX E5fAt+D5z9104ZLWMU9w==; 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 1h5qRo-0003Up-Vs; Mon, 18 Mar 2019 11:28:52 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5qRm-0003UN-CG for linux-arm-kernel@lists.infradead.org; Mon, 18 Mar 2019 11:28:51 +0000 Received: by mail-wr1-x441.google.com with SMTP id s15so1234170wra.12 for ; Mon, 18 Mar 2019 04:28:49 -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:in-reply-to:user-agent; bh=a4doGWECzAdoH4DIANgLxT21jGEVCsDGKNKRlTBOk30=; b=bgDk5B/HagChofXlvB+Yi8rzcUn8HymHmMMaKADEjUq/Rro62Rf/xtE9ejsuCpBcRs 24LdLks8BBbeY/sGbI3eS0Rm71AQEWjyxoVu0ucupz5xRIJAS9T5xfX4Vj/QFvLbvO8W 1EdG9mU2r5pstcpXoD61INTpmSYn53l01LVru80VE+gZKxJDL/oSdnq0B1kKL9EqYCul rL5oVOlf+7Cp9ChMmKZ/QnzEYH4BgIvmZ9+CBtca2eH90AtF7y5kTX7C2wlZ7qd8DHAK OMr3RwbIXSpiF0gWU1QxtfmYLOd/WsJrty7S16q88162wGzceNfaGntKrXVcixhLa3qB IzNA== 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:in-reply-to:user-agent; bh=a4doGWECzAdoH4DIANgLxT21jGEVCsDGKNKRlTBOk30=; b=kOHShxyHnUu9uZNjMNbsO1eZqPgA8mvGIDsBdWzK0o2IKPFnUHytY8XNX8zSdHA2Wd DwQyQoqkXxw4vRJM8sSumiFDLzc2dcOFOPn3cTCdgMdGFm6OBz2yaR1U3syHTtPGWo/z 0ljGpA2Sqb7f1b5EXbET3I552U7Y4Yl8ieh8kifXVjWxv0uPAhFnsxOqCbkoiQtNeJ3Q HXt1w97/8j2Bziui07MEMu+NHfMl/jSWP6M1BvTRNU1hCOCpVpPd/xSjhYZsAIRLDuq9 m1vN71Jkq/FaoIGhy7QhqHYO7OEsgMWmvmL+wVgsBgrAN1smI840wWqdWSh0cuLv9/8K xQRA== X-Gm-Message-State: APjAAAXTtdD2UxgQuCPtBey7z3NfPO4sqHsppYVhtlPwLUV5W6SGAbnm 1puA9Oji4zZPJIs8holovn/vDH2SoyU= X-Google-Smtp-Source: APXvYqy2Dzm7GzoPse5AJO3QLfAlhdZzuRVcl2Nw1K9K3s4jsYzr0fCsPZ3qWNxk2IJIjm3cvdxKUw== X-Received: by 2002:adf:c002:: with SMTP id z2mr7720149wre.177.1552908528320; Mon, 18 Mar 2019 04:28:48 -0700 (PDT) Received: from apalos (ppp-94-64-206-130.home.otenet.gr. [94.64.206.130]) by smtp.gmail.com with ESMTPSA id u4sm11311386wmb.25.2019.03.18.04.28.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 04:28:47 -0700 (PDT) Date: Mon, 18 Mar 2019 13:28:44 +0200 From: Ilias Apalodimas To: Gregory CLEMENT Subject: Re: [PATCH] clk: mvebu: armada-37xx-periph: Fix initialization for cpu clocks Message-ID: <20190318112844.GA1708@apalos> References: <20190313163558.6705-1-gregory.clement@bootlin.com> <20190314121541.GB19385@apalos> <20190314134428.GA24768@apalos> <874l85v8p6.fsf@FE-laptop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <874l85v8p6.fsf@FE-laptop> 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-20190318_042850_431747_20E2A499 X-CRM114-Status: GOOD ( 21.86 ) 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 , Stephen Boyd , Mike Turquette , linux-pm@vger.kernel.org, "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Maxime Chevallier , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Thomas Petazzoni , Viresh Kumar , linux-clk@vger.kernel.org, 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 Gregory, > Hi Ilias, > > On jeu., mars 14 2019, Ilias Apalodimas wrote: > > > 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, because if > >> I take a newer kernel (4.19.20/27) without the patches it also does not > >> work. A kernel 4.19.17 does work for me. My opinion on that is that this is > >> another problem which does just occure now because now the cpu frequency > >> 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 > > Curently my espressobin is broken so I tested the patches on the Armada > 3700 DB and I didn't observe the issue you had. > > The 3700 DB I used is configured to run at 800MHz. > > Could you apply the following patch and sent me the boot log? > > diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c > index 26ed3c18a239..f814ade5cd80 100644 > --- a/drivers/clk/mvebu/armada-37xx-periph.c > +++ b/drivers/clk/mvebu/armada-37xx-periph.c > @@ -452,14 +452,17 @@ static int clk_pm_cpu_set_parent(struct clk_hw *hw, u8 index) > > /* Set the parent clock for all the load level */ > for (load_level = 0; load_level < LOAD_LEVEL_NR; load_level++) { > - unsigned int reg, mask, val, > + unsigned int reg, mask, val, old, > offset = ARMADA_37XX_NB_TBG_SEL_OFF; > > armada_3700_pm_dvfs_update_regs(load_level, ®, &offset); > > val = index << offset; > mask = ARMADA_37XX_NB_TBG_SEL_MASK << offset; > + regmap_read(base, reg, &old); > regmap_update_bits(base, reg, mask, val); > + pr_err("%s old=%X -> val=0x%X load_level=%d\n", > + __func__, old, val, load_level); > } > return 0; > } > > > [ 14.909524] clk_pm_cpu_set_parent old=28004840 -> val=0x6000000 load_level=0 [ 14.916424] clk_pm_cpu_set_parent old=2E004840 -> val=0x600 load_level=1 [ 14.923315] clk_pm_cpu_set_parent old=8880A8C0 -> val=0x6000000 load_level=2 [ 14.930572] clk_pm_cpu_set_parent old=8E80A8C0 -> val=0x600 load_level=3 Let me know if you need anything else Regards /Ilias _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel