From patchwork Fri Nov 15 22:33:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 179528 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp13126406ilf; Fri, 15 Nov 2019 14:34:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxNlS5928OtYhZFD+29c7kw1VFHggLgpyn1grshI6GbYlxc7g9OrvYDFLmgu+vhIsd3l8tp X-Received: by 2002:a17:906:3606:: with SMTP id q6mr4306078ejb.307.1573857251568; Fri, 15 Nov 2019 14:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573857251; cv=none; d=google.com; s=arc-20160816; b=CSemgOZ0mwqxcf/iBz2nh00+pCWBBHvBLv7zjBGQghW/tbJYfPh6IRUG8OMBJ1Ms5u Bot7Q96yEIt7rDKNqyuD+D8ik+VcvXBQw2aUPVBvXLnUbrZK15pFjC0ybyCedpXzR4aR YMsUlr4WbofX17SQFs0fIy6t2UewQCTE2AuCTSJP0YT5NCGzyzcplL2MzwihjyUT5H40 hrQz32GOjQDxxKkBycGgZ79BHQEFCOer+CohmhzlhAesdpLqE8Mj+GWGMPWll8TAJqnf WESkbKnL8/C2faTXTorBMAT38FRDGbb/mLhOWMy+rXnKa/2WS4p2fc6SQC5RtsZO48iM XywQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/sm9ffuHyQlqHKvL/cAQ/Bj58CBN3LS1S5BSazdWb9s=; b=nj1qP1rnDh7bSXjAMrs1HwO2mmFp0d5uon+BYHwkAb+bmRSm+TXRjZp7NDg9jr5S2H J7SfJyPL8mzfS28Aqa3nEVwKiqzMnN3P7uMg6cPVamp6EQWcCJFmXRPLDqpf2bGraTRH nxsHzHilS/JAJmjyPl+N2rtRZ0YxhF43aTyGDZDHC9+07rVyw8d7tWpaI5R+KBmvIMpp JvTZQfSxxru7eg3i7ZK2jwkugmLdH9OmJiR11vMt2w01SByc0ApixesJXfJvojrwaZ4x huhrNEsJW8tbZ5rXLGcQW/2dMqBbtwARKIIyDjHzyV3Yh1fkWHb3BixVErjgxL2q+oWe ji3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pM8P5t4P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be23si6995091edb.103.2019.11.15.14.34.11; Fri, 15 Nov 2019 14:34:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pM8P5t4P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727352AbfKOWeK (ORCPT + 26 others); Fri, 15 Nov 2019 17:34:10 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45907 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727296AbfKOWeI (ORCPT ); Fri, 15 Nov 2019 17:34:08 -0500 Received: by mail-pg1-f194.google.com with SMTP id k1so5313075pgg.12 for ; Fri, 15 Nov 2019 14:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/sm9ffuHyQlqHKvL/cAQ/Bj58CBN3LS1S5BSazdWb9s=; b=pM8P5t4PtpN4KMbwNUNzh+mn2x2kH6Il5JxeWrKcKQ8kx58doVIPMM4rtWksFJl4Yi xpsRjLEis5CKrLOAjaRS2tsUqYI7mBV7IEsmC35MdUVzIJq1+U59yl5C8M/5ckGv0OO2 WsTXDoKyWjG+RTKzRIP3NmhG82iAuiyJHdHZJlXS2fg0egy7r7NhIwEmTwuwZI/snEuz HyEtEYXEheT/4bI8e0D8VFssUGtO3ESnWqkrCqal5Bv0wWXjt+RLeWPfWKS2b2ElEOdH b5dok1fcKq2xCkY6DxuuptOWNO3qxCRJOsuscR83yFKy8B3Q3vLeQv1yOg9D+rhmxnPG /v0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/sm9ffuHyQlqHKvL/cAQ/Bj58CBN3LS1S5BSazdWb9s=; b=Ju4Dszw09ENSkH7A4cFltRB5iE7hYriMhBdhJE00NLUiDmJYP4WHVB9enw4KmouUQq n9l9J6V6y4AIyKjdjVvrbXkMEhWPwT1OqOe0QxF3plCCG+OnSEvBSOWKBomYVy2uEsIM A1RzE24zbE7WdRlJ66Os16Q+srr1dfqzZxPGZe426mMWD/zu+xhte1rWp9uSMvwvkVFn +bLmGdpyeBK1g3+4ocV0Wt2tAmX15Wj9WTAntiCLecoRhHyhvW2fSHpBnwC3NxR93A69 RrVOifrtrcGW+Ad7nCT3E6+buZJvIw+Kqjl9DtWKrnSn/pC0DIhl4W2SaXBUamEF7CJx J5MQ== X-Gm-Message-State: APjAAAWr76efhzACLCSZ0jbMDfzqY2j4OBLs6nMy4CWIFpRRje2RvyIY x2ETXnoXDzr4BaT5I6c2yA5yfQ== X-Received: by 2002:a63:9247:: with SMTP id s7mr19675322pgn.334.1573857246932; Fri, 15 Nov 2019 14:34:06 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id m15sm11699724pfh.19.2019.11.15.14.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 14:34:06 -0800 (PST) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [stable 4.19+][PATCH 11/20] clk: stm32mp1: add CLK_SET_RATE_NO_REPARENT to Kernel clocks Date: Fri, 15 Nov 2019 15:33:47 -0700 Message-Id: <20191115223356.27675-11-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191115223356.27675-1-mathieu.poirier@linaro.org> References: <20191115223356.27675-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gabriel Fernandez commit 72cfd1ad1057f16fc614861b3c271597995e57ba upstream STM32MP1 clock IP offers lots of Kernel clocks that are shared by multiple IP's at the same time. Then boot loader applies a clock tree that allows to use all IP's at same time and with the maximum of performance. Not change parents on a change rate on kernel clocks ensures the integrity of the system. Signed-off-by: Gabriel Fernandez Signed-off-by: Stephen Boyd Cc: stable # 4.19+ Signed-off-by: Mathieu Poirier --- drivers/clk/clk-stm32mp1.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c index 851fb4e9ac44..8e25ed62f67b 100644 --- a/drivers/clk/clk-stm32mp1.c +++ b/drivers/clk/clk-stm32mp1.c @@ -1286,10 +1286,11 @@ _clk_stm32_register_composite(struct device *dev, MGATE_MP1(_id, _name, _parent, _flags, _mgate) #define KCLK(_id, _name, _parents, _flags, _mgate, _mmux)\ - COMPOSITE(_id, _name, _parents, CLK_OPS_PARENT_ENABLE | _flags,\ - _MGATE_MP1(_mgate),\ - _MMUX(_mmux),\ - _NO_DIV) + COMPOSITE(_id, _name, _parents, CLK_OPS_PARENT_ENABLE |\ + CLK_SET_RATE_NO_REPARENT | _flags,\ + _MGATE_MP1(_mgate),\ + _MMUX(_mmux),\ + _NO_DIV) enum { G_SAI1, @@ -1952,7 +1953,8 @@ static const struct clock_config stm32mp1_clock_cfg[] = { MGATE_MP1(GPU_K, "gpu_k", "pll2_q", 0, G_GPU), MGATE_MP1(DAC12_K, "dac12_k", "ck_lsi", 0, G_DAC12), - COMPOSITE(ETHPTP_K, "ethptp_k", eth_src, CLK_OPS_PARENT_ENABLE, + COMPOSITE(ETHPTP_K, "ethptp_k", eth_src, CLK_OPS_PARENT_ENABLE | + CLK_SET_RATE_NO_REPARENT, _NO_GATE, _MMUX(M_ETHCK), _DIV(RCC_ETHCKSELR, 4, 4, CLK_DIVIDER_ALLOW_ZERO, NULL)),