From patchwork Thu Nov 28 16:49:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 180455 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp373337ile; Thu, 28 Nov 2019 08:50:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwJnjusk8CU4nu5fyu9SupsuY9LFoUPGnDp8nmJbXZOQ9yWIIqqyQPgt/gmvHARUhF7UlaH X-Received: by 2002:a17:906:cd27:: with SMTP id oz39mr8178701ejb.48.1574959815625; Thu, 28 Nov 2019 08:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574959815; cv=none; d=google.com; s=arc-20160816; b=ZOqI4LbODV7h31NNu5LYbo3vaEWtOmYeFU4KfsnsuDMa8lj0eg23gMriVmjxIoY20o fe4P4zsnklZvToTkc75YhXYAu2fJV3SSlNa+j8RjQHaippW/3o7LGCneRG13v/ZwOmVI /Wv6pP+ACSF/UJsaQC/PMqlI891uhI0K9xeEEVzxRTVOBpzXuCCuXRB9MY0c/f+8eKRa iLQoUtNwvnh0a+h8cqs2QqWYnmTiLMbCgXuhadgIulc0j9O1rWrUn7NUJUNyTCSy9aRx 3X/HMx6FZnNGc365ZGqxTrXrLKF27z9QV08djuNag0Q7Cd6o0A+Xtm6sPpBS7yUVrnDK EsRQ== 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=WWGEc85+KcM+sGpnyTytKb3X6CvK3FAE9bn+Wq10lGo=; b=hC1rAd+80afsfDrgQMLL6XVwieqA36CuYzM1fMPqgJUzLeJapy1jKfDzhkTqFCy8Nl F8TVP+JRRowt2c2aJ5b0Yh7npIwLB0Haqkz1lppgJSZqMhXc1R5b2UZC9c0Vh0XQhx7q ZvMVTajEqrRHCnVRvSPDdCY+61+TvvvhJFWH0XDwKGCWpVkNnnWkas7UMUfnPnsI8L6W S7g5v0VeZgeZQvAeMs3r6ASPDMM/l6GRjkPKTpk6o1udPIgPxfPp8qNJ3COm9xy+M8G7 P+QiQ5F9qKnSNLYcs/1OLJuzibS50ykhO8rHNo/pAxjK3Ci7Wtb7BQ/57A3JQdCQ5gn3 YgyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bb++BL38; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 e26si12800266edv.82.2019.11.28.08.50.15; Thu, 28 Nov 2019 08:50:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=bb++BL38; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1727022AbfK1QuO (ORCPT + 15 others); Thu, 28 Nov 2019 11:50:14 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43794 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfK1QuN (ORCPT ); Thu, 28 Nov 2019 11:50:13 -0500 Received: by mail-pf1-f194.google.com with SMTP id h14so3190792pfe.10 for ; Thu, 28 Nov 2019 08:50:13 -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=WWGEc85+KcM+sGpnyTytKb3X6CvK3FAE9bn+Wq10lGo=; b=bb++BL38yQuo7KNIuQMOdkHafzxGcwnlx5bZPHOIdY6ABklHc3dFnGxtGBwC02EwY2 +vEMBkw/f3ymqZG5gg+5F4x+feO8IGCmzyBWtZ10BLuGTI3Lcid68VnHZpjz3tpappoU nus2CQyYFsvCqXzxXQ8z5hHfp/lQ+6G0VKKca/7ULAMmCZJclI97Vd9c9ZVg2TjZVVGH Pwpr1YsxzFlPUgjFuFE7KgYGWLLESq4ceWMXNOnKPO1h9G9QK38u1pVmAHIDV+IQYC7H IvMQDLqlQfbw4QrD0nGQZWsYZ8UJC+/7kNv0JEHAf/WtrnwcWL6Pye1Xsz/x+JrptJyz DqZA== 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=WWGEc85+KcM+sGpnyTytKb3X6CvK3FAE9bn+Wq10lGo=; b=MSrF4gjNe7ZC+2wggiLINPGmoqoUQrLbCSEbogxfpK65mzvlROB21vUscea9GMxjDn ipJWWJdhQag07KONElaSCmUtRcUlibjqZ0p4hb2LFbjdH4+Y70ziR+DEAmh4oWVWrAdP yUqEWeaXTp8yaQcz5o8yUsoGl5aoyH6XIlcKnppScCXCjC7Y0dSmmD/gay4gHmgo4gWX 9GPE2tLb/oFM8qvdpqpejvfvHPviw0GV/1+Hw6ENUqldJpEpH+XzE3lpbg2PNq3a5T87 VquJL2pecc/B1qgqug3iMpVQYFexTjO17n2asMa3yCvgqq8cqNu0RoFe22lmSIV7Bc7u ChTQ== X-Gm-Message-State: APjAAAWqrCFyRBwbO9MXYQp/pnnkRBK3yZibapQQ8awtKOl01vOEg0bE 9sGuHMjlZyJDSMYI5KJVH3oqXbAa7kg= X-Received: by 2002:a62:ae17:: with SMTP id q23mr54443120pff.2.1574959812598; Thu, 28 Nov 2019 08:50:12 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm2450343pfh.169.2019.11.28.08.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 08:50:12 -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 09/17] clk: stm32mp1: add CLK_SET_RATE_NO_REPARENT to Kernel clocks Date: Thu, 28 Nov 2019 09:49:54 -0700 Message-Id: <20191128165002.6234-10-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128165002.6234-1-mathieu.poirier@linaro.org> References: <20191128165002.6234-1-mathieu.poirier@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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)),