Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp952943pxp; Wed, 16 Mar 2022 22:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPUus8nUM/VV12VlZDbUAOtG8C6ccezmly9VnTuIfUgpksk+pKSOiH2XESuk2uLWU4dPOl X-Received: by 2002:a63:eb4a:0:b0:382:8e7:9023 with SMTP id b10-20020a63eb4a000000b0038208e79023mr524228pgk.308.1647494901929; Wed, 16 Mar 2022 22:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494901; cv=none; d=google.com; s=arc-20160816; b=F1tvNy9BUvFiPC0OlN/hcHo5vKbPW8w5W2lztffrY2ZcIH6BwGj5qSgp6qvSDOT9Sh MS0cNXuyJnXEFdtsR/imoa13oSPQbtV4b8gy14rvcDjmpenvPLl5RbBD20gG2awT80yI NRIoQcJjwGmIwq59LQ/VwLGA2WmJjBnuGJZCksZPJwC8TjBDCS7tlNax6LyTcBGh1+Gj GyymvkytS2/uoNRe04PchNnVeQWE0y8uA/ehtdmUPm90UknpfWHgPtkW71zylFLAW0mk SSYJUlqz/t6gFsjYDWXj5hsBfQLGM0Fjmbmm5aZ3ftLO2+uI6rRfwYkR3lFj72sbH7+Y mROQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=IW9kIawADzYvfFThBa7KwiX7auKiOm/vBsLnGav6iQs=; b=caTasv/0xZkEOw6N9vbbOJKM3pPJ2uaX8+SPvisRKhTGMdHFUoYvrnMvPU+JaX9Ik5 z0WNQ9GYqA3m/FRWXI6731MyQiHTxVXDAfy/vh75WrCIHcyr2oRHRxjneDQZ++Q5h69u XjrPXT99nUQ1M6WhPKbsg+7RodUvAqFkkEAUJ+a9rULAPg2cpZ2wuCvEfUP9b7weglZN kDBA9ro34EIyKn4GjwB8sxWfdni6O703BrBS0iipD37avTi4M6zLP7zfNHSuUR1nunMp DOMuS8QOloPqQ1jm7/+JSSEIwvRlNGPW+TGMs2ZAV9Gx2echtIafkl6BdhEUVNFALmSR jQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CUfkDOMp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bh9-20020a056a02020900b003816043f096si1037000pgb.651.2022.03.16.22.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:28:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CUfkDOMp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BDF4FF94D8; Wed, 16 Mar 2022 21:29:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352357AbiCOWsU (ORCPT + 99 others); Tue, 15 Mar 2022 18:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352334AbiCOWsR (ORCPT ); Tue, 15 Mar 2022 18:48:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F21E5D1A7; Tue, 15 Mar 2022 15:47:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91D4461456; Tue, 15 Mar 2022 22:47:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE7E8C340E8; Tue, 15 Mar 2022 22:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647384424; bh=86orAlnXxtfNaGMM9WoOgNr7cI+roJgX2Retc4ANSZU=; h=In-Reply-To:References:Subject:From:To:Date:From; b=CUfkDOMp7/G9aS7ZJK8VXoEGwpow29KDhCIiBkqyRUEJoOI4lU/V32HfVdz4XwYJW 9R9s5KFsCQ/d2P6EhvyV0CDyhfAYE0F9Vs59OX/ml0dlmZuUCUHswBJ97BF0WFO6A/ wsF/fGWdQ/tMdYCw9AT2h9mIl94OPkdW4SYh4taBsqZvc9lwWIqIGGg4SrzE4fzAHD IrIlwsyy5qu7VnGRbmFlfKVGktuJaZF3aBiTWl78xEhU9Gby5ZnxTT4rfm51g89fBN hnnOd/xur0WmQBHO0325k72C8OsunMLmuLN+0UJ4u17EB6NMr2LnqogM0mHbU1Y8Ah fnlhFZ6E8dSAA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220313190419.2207-12-ansuelsmth@gmail.com> References: <20220313190419.2207-1-ansuelsmth@gmail.com> <20220313190419.2207-12-ansuelsmth@gmail.com> Subject: Re: [PATCH 11/16] clk: qcom: krait-cc: force sec_mux to QSB From: Stephen Boyd To: Andy Gross , Ansuel Smith , Bjorn Andersson , Jonathan Hunter , Michael Turquette , Peter De Schrijver , Prashant Gaikwad , Rob Herring , Thierry Reding , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Date: Tue, 15 Mar 2022 15:47:02 -0700 User-Agent: alot/0.10 Message-Id: <20220315224703.EE7E8C340E8@smtp.kernel.org> X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Ansuel Smith (2022-03-13 12:04:14) > Now that we have converted every driver to parent_data, it was > notice that the bootloader can't really leave the system in a > strange state where l2 or the cpu0/1 can be sourced in a number of ways > for example cpu1 sourcing out of qsb, l2 sourcing out of pxo. > To correctly reset the mux and the HFPLL force the sec_mux to QSB. >=20 > Signed-off-by: Ansuel Smith > --- > drivers/clk/qcom/krait-cc.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c > index 6530f10a546f..1bdc89c097e6 100644 > --- a/drivers/clk/qcom/krait-cc.c > +++ b/drivers/clk/qcom/krait-cc.c > @@ -15,6 +15,8 @@ > =20 > #include "clk-krait.h" > =20 > +#define QSB_RATE 1 > + > static unsigned int sec_mux_map[] =3D { > 2, > 0, > @@ -178,6 +180,12 @@ krait_add_sec_mux(struct device *dev, struct clk *qs= b, int id, > if (ret) > clk =3D ERR_PTR(ret); > =20 > + /* Force the sec_mux to be set to QSB rate. The comment start should be on a line alone /* * Force the ... > + * This is needed to correctly set the parents and > + * to later reset mux and HFPLL to a known freq. > + */ > + clk_set_rate(clk, QSB_RATE); > + > err_clk: > if (unique_aux) > kfree(parent_name);