Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp43986yba; Mon, 20 May 2019 04:42:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/pJ7gxK/uBgc7cHglYAXWGjZZHlGW/woUJBCCnT8xZvxLWgnLgoS8uGGZBGbqb3kpbeET X-Received: by 2002:a17:902:d70c:: with SMTP id w12mr27337320ply.95.1558352573768; Mon, 20 May 2019 04:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558352573; cv=none; d=google.com; s=arc-20160816; b=RPMsJP6FrxOuQa+NmpCX+mqRPtUOGLr7iGbSUTh2y/mH3B63S9W9l1biusSjnivOyb Iex5RoWgaTa5Q4v1zE8k5AWh6DCUOhidCpCAeb8D3rW96yHsvXuIbe+m7DynM7qwrNRM 0BcEJCWBIL5QGvy7kg05vdhRO8A8MeH2nGprUpEUE9+VERgqpbFfRDCFGl10Tiv26vkX 2Vck1huR3M+q2rYAtN2qc3XrL5lA00xd6Uub2i2ljlFna7vezXsFsU52YU7QcmQLSDqY nzdYxWQcknxtPRD9vDLmLF4zend1Tt8EFJXWAVAfFvqDeWwBIDm9xVCAsymWdE96Fkwe 1cWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WQkT2wC2aysOpoMmfhTPk+qy7Qrb+lAicY8b/99nAws=; b=ldhiTs8kggT6MRjS1iDvS6sLEEee0A5ukRqbSKlG+CBDogI6eug1rcq1jfKBVhGgfv tUlO3oHDfGMxi6+Cw1dXkDJ9Tc+8LhC24KF3KMJrtFFAns6CtJu7TfkqHoTbGpQ7bXXD lPJ43lQwV8zYncMYEgrMR1qdiJ4rbKtshyF4zUiM0Zcb6OAo1TtF7IEJ9OUGkjCq8KRs Kv1Msdn/BEjLrfby57U1P94rCkzWnEWMP5XDBIkM7IoHBY7eoWUZYBny6y/5UKjaoZBX nITc0Ov4IyjyivVonx21yV4GjksTOuJCDrzpb5gMhBd5flA9u+gtvWxi7aO8NKZ/U9Kx 1O5A== ARC-Authentication-Results: i=1; mx.google.com; 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 q8si16956675pgf.3.2019.05.20.04.42.38; Mon, 20 May 2019 04:42: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; 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 S1731967AbfETKrh (ORCPT + 99 others); Mon, 20 May 2019 06:47:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:55316 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730323AbfETKrh (ORCPT ); Mon, 20 May 2019 06:47:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 91BADAFD2; Mon, 20 May 2019 10:47:35 +0000 (UTC) From: Nicolas Saenz Julienne To: stefan.wahren@i2se.com, Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Eric Anholt Cc: mbrugger@suse.de, viresh.kumar@linaro.org, rjw@rjwysocki.net, sboyd@kernel.org, ptesarik@suse.com, linux-rpi-kernel@lists.infradead.org, ssuloev@orpaltech.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@baylibre.com, linux-pm@vger.kernel.org, Nicolas Saenz Julienne , linux-kernel@vger.kernel.org Subject: [RFC v2 1/5] clk: bcm2835: set CLK_GET_RATE_NOCACHE on CPU clocks Date: Mon, 20 May 2019 12:47:03 +0200 Message-Id: <20190520104708.11980-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520104708.11980-1-nsaenzjulienne@suse.de> References: <20190520104708.11980-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Raspberry Pi's firmware is responsible for updating the cpu clocks and pll. This makes sure we get the right rates anytime. Signed-off-by: Nicolas Saenz Julienne --- drivers/clk/bcm/clk-bcm2835.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c index 770bb01f523e..c2772dfb155a 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -411,6 +411,7 @@ struct bcm2835_pll_data { u32 reference_enable_mask; /* Bit in CM_LOCK to indicate when the PLL has locked. */ u32 lock_mask; + u32 flags; const struct bcm2835_pll_ana_bits *ana; @@ -1299,7 +1300,7 @@ static struct clk_hw *bcm2835_register_pll(struct bcm2835_cprman *cprman, init.num_parents = 1; init.name = data->name; init.ops = &bcm2835_pll_clk_ops; - init.flags = CLK_IGNORE_UNUSED; + init.flags = data->flags | CLK_IGNORE_UNUSED; pll = kzalloc(sizeof(*pll), GFP_KERNEL); if (!pll) @@ -1660,6 +1661,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .ana_reg_base = A2W_PLLB_ANA0, .reference_enable_mask = A2W_XOSC_CTRL_PLLB_ENABLE, .lock_mask = CM_LOCK_FLOCKB, + .flags = CLK_GET_RATE_NOCACHE, .ana = &bcm2835_ana_default, @@ -1674,7 +1676,7 @@ static const struct bcm2835_clk_desc clk_desc_array[] = { .load_mask = CM_PLLB_LOADARM, .hold_mask = CM_PLLB_HOLDARM, .fixed_divider = 1, - .flags = CLK_SET_RATE_PARENT), + .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE), /* * PLLC is the core PLL, used to drive the core VPU clock. -- 2.21.0