Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4269257imm; Sat, 21 Jul 2018 14:39:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmCO/cNFf6VmGDm5M/hr5tVs6spwGrmFLr6s6vni5GzxEoy77X1EKFCbg9VRhI615MX33x X-Received: by 2002:a63:7007:: with SMTP id l7-v6mr6854202pgc.206.1532209152993; Sat, 21 Jul 2018 14:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532209152; cv=none; d=google.com; s=arc-20160816; b=LzMN4rZ7uWDyJXiEKkqo+dsoZkK1n8YiVxU+bnSyiPR0EDyP0Ab07uhGGLL+UcV28t Gnvn/T0glonDQSLJv7kowdNe6Dli1r+SDz7liD7vDcZPnziJAWJ8j/FmTfEVz4jeADG/ sdKHg0SK/cYxwkOk+tRfsIuik/yUuBEqAmInrgOXXXokEUEYCbfUD/809zZ0VPOCMoXk sBKCCbuXI+65jtpEUsWfT16SBvQfP+RdoAndSHf2G+GH9WHPXdFrF1hAu1VzikJejFY2 GvSsrLq6UkoBBzKegfmXy2rOCZRaVuUIs2TRov1Sx7O+cDGhQZ7iR6hEUtH98QAv7qUu SFUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=QutLOpSvVW0B4onrIv8a7AA0QY5Ps0W9TgW9mp2EHpQ=; b=gAZjCsWjRA+nt3hB4r06quW3GdrMhG6sMBUrtvrh7BvUu2asF9ftK1hcd4eT4uh1/Y tVfeOLj1Ed5Zfy1tE3MsnT4wqD7PgckTcUoAOJjoGtF+1xCbPuvJ6zwjx2Z2Ma9HuctT vbOBXS+che+HYBAwSX5VYmk3uA+P0DUhGBQ1TwHHSgxz8qDCBCbHInHPa2/BNCVJVVxC nFRf003XmVvTz/+kmuJ9n3ORD/nLwOzwLRmnOlkQoPLLsZFG2OgORauc5m8PzAzUTvTI Efw89yWTrJChz42Lva8u8vP0/jWGQ1p/ZD9CVaW9MHLMnZq03i0/vBigBcaKQ7+m4xFc ldDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=F0D9U6W5; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si4506332plb.187.2018.07.21.14.38.58; Sat, 21 Jul 2018 14:39:12 -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=@googlemail.com header.s=20161025 header.b=F0D9U6W5; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728170AbeGUWcR (ORCPT + 99 others); Sat, 21 Jul 2018 18:32:17 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:37228 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728138AbeGUWcR (ORCPT ); Sat, 21 Jul 2018 18:32:17 -0400 Received: by mail-oi0-f67.google.com with SMTP id k81-v6so27174536oib.4; Sat, 21 Jul 2018 14:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QutLOpSvVW0B4onrIv8a7AA0QY5Ps0W9TgW9mp2EHpQ=; b=F0D9U6W5im4p2SHgxoMl0FA+QbBGtaQO1QiXEeOLdOHM41a03fbcSU8yTDqioW+Kg1 44Q5TpgqJeFrwfK1pPfoJhbVrhtM2lWhnDEQQFYtipV13Vf99pEJg+LFQz8HUkPQfQFe ewKBRWLzp13hGmOQsfd4lpaLVo+Bp7Bj3IY6MFDOO6wQlddTpB7EBqbaTMepYLJu4whJ oj5+T2l9gxC8vNqvphnorXRfa981LCCCSM7aYsvvcSVG3vUiAzEq8ExdyI8tdla6/aes 12cEkoDAGBkNo+fkNU/c/oJ6bK26He/ysm49LKMHPHLpYq2hgjAVcXduIGHo+7hr2ArX y/+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QutLOpSvVW0B4onrIv8a7AA0QY5Ps0W9TgW9mp2EHpQ=; b=ZnwsCXuAOsHQ6C3QiZPKTmWE+juVz0K19H7wNyNA4zPeGIWypvIQwggKSPdNO42tMu 6ah1KD53V03rnuaZHeWzv4VLRQ9hCuEvWGowkkTEI1zX0gYX8FPKR3TayOqGxu9EvWnd WHpVeKXICk9Yfhuq4EangSHxhbyaZ2WDHtBZN9SekEST50T8tMbiEQoO0rya8550LBsr 1HrDU8tgTsyyvsj+ko8FAq4Jk3tLGQPg1VofiqvU7BBbrSr8yI9Gkt0gU9cPl7AhmbsY vOZxFQx+AoQTjB1ZyOThFH2/UdEHzE8tPZctTRRKXFHOSDzIrESNHVckrD+Tkd3+HWGw DZCQ== X-Gm-Message-State: AOUpUlFCtIgqsgMhOVPR+E8MMQI0BIOxpT+gMKinzEScOo+JDi2gkR9S xgGO85npXKS4rKBXAp4kMiyNt+KD42bRzk+ZZfY= X-Received: by 2002:aca:c70f:: with SMTP id x15-v6mr3309135oif.97.1532209085796; Sat, 21 Jul 2018 14:38:05 -0700 (PDT) MIME-Version: 1.0 References: <20180717095617.12240-1-jbrunet@baylibre.com> <20180717095617.12240-3-jbrunet@baylibre.com> <1532205745.26720.81.camel@baylibre.com> In-Reply-To: <1532205745.26720.81.camel@baylibre.com> From: Martin Blumenstingl Date: Sat, 21 Jul 2018 23:37:54 +0200 Message-ID: Subject: Re: [PATCH 2/3] clk: meson: clk-pll: remove od parameters To: jbrunet@baylibre.com Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@baylibre.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jerome, On Sat, Jul 21, 2018 at 10:42 PM Jerome Brunet wrote: > > On Sat, 2018-07-21 at 22:01 +0200, Martin Blumenstingl wrote: > > > +static struct clk_regmap gxbb_hdmi_pll_od = { > > > + .data = &(struct clk_regmap_div_data){ > > > + .offset = HHI_HDMI_PLL_CNTL2, > > > + .shift = 16, > > > + .width = 2, > > > + .flags = CLK_DIVIDER_POWER_OF_TWO, > > > + }, > > > + .hw.init = &(struct clk_init_data){ > > > + .name = "hdmi_pll_od", > > > + .ops = &clk_regmap_divider_ro_ops, > > > + .parent_names = (const char *[]){ "hdmi_pll_dco" }, > > > + .num_parents = 1, > > > + .flags = CLK_GET_RATE_NOCACHE, > > > > why do we need CLK_GET_RATE_NOCACHE here? > > also, shouldn't all _od clocks use CLK_SET_RATE_PARENT? > > (this applies to all new _od clocks, not just this one) > > The goal was to retain the original behavior of the clock. > The pll has CLK_GET_RATE_NOCACHE, which is why I put it again in the od > dividers. Same goes for ro_ops I missed that - thanks for the explanation! > For the particular case of the HDMI PLL, the display driver still set the pll > parameters m, n and ods directly which justify CLK_GET_RATE_NOCACHE for now. > Of course, the goal is to remove this flag someday. I think there has been some > good progress in the DRM driver to reach this goal. > > If we think the use CLK_GET_RATE_NOCACHE is not justified for some other plls, I > would prefer if it was addressed in another patchset. now that the reason is clear to me: I fully agree! > Regarding SET_RATE_PARENT, with the pll set with ro_ops, it does not change > anything but, I agree, it would be better to set flag for the future. I see adding SET_RATE_PARENT will probably save a bit of headache later on when enabling the write operation of the PLL and then wondering why the frequency is not changed Regards Martin