Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2554878ybn; Thu, 26 Sep 2019 13:48:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJrrFPIpiQ1AS37Q8AolZW1x/Ofd2U1VqkdGpW06pGGW72zWdUd3AyENUECMSb28WnjbaB X-Received: by 2002:a50:baab:: with SMTP id x40mr912909ede.60.1569530933474; Thu, 26 Sep 2019 13:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569530933; cv=none; d=google.com; s=arc-20160816; b=YWGTWzc9prnU8J1goF9LppmKnM+jik4ISxtX89sLaKLoyDE1BXYTgI82DbRWOle61k pHIXMjYv8QRJHWUwyxk8YabT7pQwoEbXuotCpAwaGJjAAZ2tqHMjPBMXRcl2QMtqj7FV qhNdN7XUuw8B8Bliq60UPbofcsiaAtwukgefUHxzgY/jPW3k57IHJX2J5pyUmE6zrWkt iUIhmH+up61t4FvtibQ2ClVGOIhd5inuqF0mQs1G7fvGTqFapoABximikivp5WokKueR S5h/sfXd1FthN/EntjfydhOhke1mUKbdz9kk6L25UpuRuB38vidyinvlcachsKYHgGS7 vGFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=5A93QbhcJ9OxEL8d529nmFDwwgHPcXf7jnflqd7ri+Q=; b=Ec4QCK6B7LNO7bpPpPj9zVUcs7tcl8otc3rwxwFZjH7BkdeGu0+NCla7XhE01aSlKZ UNJPazfurU8YtP5ftLlPgPOxVPNdWuS65w1/kiojAhqC/Etn6XCF47eaUrs82O8HnB0N 8FLeVSYOwP9b0DChscOMRYbxyb88zNGxG5D6nq11qKvvlyaY3QE/36+C46MK5WCwqmPv JX5U0XC86QR3Xnw4mZTeIllX5zP8ltnaQVRbvljEM6JJo7gwNM+owVghv5JnkT9aICuM bWQCsDfavtwHWT1Q8sm1tlMpE+lTUjrCBusfJ8EUKM5FHhCBJZ/b/ku8QsWuC+F2p4mz aFiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JD7JeQsA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si1844927ejl.292.2019.09.26.13.48.29; Thu, 26 Sep 2019 13:48:53 -0700 (PDT) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=JD7JeQsA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbfIZUqc (ORCPT + 99 others); Thu, 26 Sep 2019 16:46:32 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38952 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728816AbfIZUqb (ORCPT ); Thu, 26 Sep 2019 16:46:31 -0400 Received: by mail-pg1-f195.google.com with SMTP id o10so2171961pgs.6 for ; Thu, 26 Sep 2019 13:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=5A93QbhcJ9OxEL8d529nmFDwwgHPcXf7jnflqd7ri+Q=; b=JD7JeQsALzOQnI/4qgjCyDszf1kSiggpL1jpjmpP0ZrOIuc+rH3npuK/vS6qQ+APdk DOxSlr0vPjLBh+8bgundu2vrbnLYxdK8cJ9A6n+FIHz1xHDLi0z+VJdL82dvLTGdo8zF HduM+63/IdGaaCFE3qZPWGsNkoTiLLi6WDvI4TVwW4s2I2xZ5uUu+xDZXrPM1SCBrSno 243VhgJkvY50yMHStaZPEVf1H+Otom59J+UCdTgAuVfnoDnn2+GtT1dZFqBM3z7sWZnu I935JuXgwOAV/a1Cyl2iPYd9RP8KwljZunUy8mZqpja4Q9GsaO0IKxZjvyjVaxIis/71 qQ2g== 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:in-reply-to:references:date :message-id:mime-version; bh=5A93QbhcJ9OxEL8d529nmFDwwgHPcXf7jnflqd7ri+Q=; b=W4pZn6whi/tw88IatvtSqAjY2C0Tb6DmJQ8BUELYeEfJ4FFd6UQ3eoAffqRX9sFCZT eKilO0fnr3x3I1vkg+ZQHjBvmRv5gdHxj1nVNq0qsDeZ+nyhscjZG9r2JtynSgHgWiwH xwKazv47Ee0CCmNy66WCkIY/nkh5L8nxEeaZbIT5a1/KtUFLL78c+qoe6kG1MGw79vME ciei2n/yqZvvO0dKP1AQhK8QMAfbVRk5TvkQ3Y4QEGnTkXzLwPMVvSd1l7/eGudnkPWQ 1PDIHmyENbY4bEAtP1hSxys+foIimGwwYYPvLZeUGI6CHtLo1WIJbRk0tDeUoPZiMYwP 0EJw== X-Gm-Message-State: APjAAAVpou6vYgOgH/D1fqADhP0N6zJbRTM+OkKcgr4svOlJ6gnQvXND xLLOXgWlMyrrRXg/gb/3v8M7qQ== X-Received: by 2002:aa7:9a48:: with SMTP id x8mr415038pfj.201.1569530790856; Thu, 26 Sep 2019 13:46:30 -0700 (PDT) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net. [71.197.186.152]) by smtp.gmail.com with ESMTPSA id 195sm169718pfz.103.2019.09.26.13.46.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Sep 2019 13:46:30 -0700 (PDT) From: Kevin Hilman To: Neil Armstrong , sboyd@kernel.org, jbrunet@baylibre.com, mturquette@baylibre.com Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong Subject: Re: [PATCH RFC 0/2] clk: meson: g12a: handle clock hw changes while in suspend In-Reply-To: <20190919102518.25126-1-narmstrong@baylibre.com> References: <20190919102518.25126-1-narmstrong@baylibre.com> Date: Thu, 26 Sep 2019 13:46:29 -0700 Message-ID: <7htv8ykcpm.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Neil Armstrong writes: > This serie aime to support when the suspend/resume firmware alters the > clock tree, leading to an incorrect representation of the clock tree > after a resume from suspend-to-mem. > > For the Amlogic G12A/G12B/SM1 case, the SCPI firmware handling suspend > alters the CPU clock tree in various ways. > > Since we know which part of the tree is possibly altered, we introduce here > the clk_invalidate_rate() function that will rebuild the tree from the > hardware registers in case parents and dividers have changed. > > Finally we call clk_invalidate_rate() from a new resume callback to refresh > the CPU clock tree after a resume. > > With the clock tree refreshed, CCF can now handle the new clock tree > configuration and avoid crashing the system on further DVFS set_rates. For clarification, does this series work without the other proposed fixes[1]? or is this dependent on that? Kevin [1] https://lore.kernel.org/linux-amlogic/20190919093627.21245-1-narmstrong@baylibre.com/