Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp44194yba; Mon, 20 May 2019 04:43:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+FYXDx7udK4V4LEaHqNcCcuzn6LU0aRKa741Cf5YY67fynGi01lgMrp9zGm50La4FCTHs X-Received: by 2002:a63:560d:: with SMTP id k13mr74645449pgb.124.1558352594189; Mon, 20 May 2019 04:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558352594; cv=none; d=google.com; s=arc-20160816; b=KZG3zPiSv3DcyhmlU4lYxOiJCMhO+3wLDtP8PFiEKlj0WKB1jw1zdSw6gWCQB0g4qA k/GD0pbCyXFMETA9db5W/J1JbstGukUEqWg+GJ6yJ+S9mUffKFimXBOGk2v+JNkOMgoc cbmcQuzOwyYAFlk1fqeC9Bfc8WtDqrF9nQGz6ATmWx04hW4FOClEYPQI1yBSuX0k1zOA tK69TH7E8hkFaXqxmxHLtJkDxP8ZUKNVfd3qTP9VH40HkO7SIouzL7oz6BqJ510UTdpX +SEnW9u8SSD6lS+NaLS46mqRWHvzdt6Yd1nVd9veQ3CXpw3L91ClCxCDqLhWjE3vV9Mg mALg== 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=aYPzIRpJLYmPQJCDTkEHrcRQNdQb6+5U5d8twjv6Mf0=; b=FWhaAkiY27eGlzce705LnpraDhDgughg9QMn2u93NDjtRj54Eb0106Y9d6caWGaCx9 PiAGiXAP2STQBWd4sDgqutBu1b0CZ6Crx1QaIGwwCiL6YVBc6UEaXMYcrIcqAXVdxOBq PiI4iPQrlRbp/fCffWwQsu/02BshVIfLJM5xOTVaDfIXzcJpJ8SjJMRqxLobW7nDqnaR Vc3Ayr8fFt06gA8HBWaC6VCCn5aE5i9tGKlEcQQs0S59t595hY7dXXWC/EdkbRMF0TOa 8XqZ/qRZ+8a/cJJS74icVgc+1TyXUhSEB/89jf4ZkLNgfU/hv117SW/+abLvzkKXWmig 6kCw== 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 129si21826877pfy.160.2019.05.20.04.42.59; Mon, 20 May 2019 04:43:14 -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 S1732040AbfETKrk (ORCPT + 99 others); Mon, 20 May 2019 06:47:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:55356 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730588AbfETKri (ORCPT ); Mon, 20 May 2019 06:47:38 -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 AD1E1AFD3; Mon, 20 May 2019 10:47:36 +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 2/5] clk: bcm2835: set pllb_arm divisor as readonly Date: Mon, 20 May 2019 12:47:04 +0200 Message-Id: <20190520104708.11980-3-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 This divisor is controlled by the firmware, we don't want the clock subsystem to update it inadvertently. 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 c2772dfb155a..5aea110672f3 100644 --- a/drivers/clk/bcm/clk-bcm2835.c +++ b/drivers/clk/bcm/clk-bcm2835.c @@ -465,6 +465,7 @@ struct bcm2835_pll_divider_data { u32 hold_mask; u32 fixed_divider; u32 flags; + u32 div_flags; }; struct bcm2835_clock_data { @@ -1349,7 +1350,7 @@ bcm2835_register_pll_divider(struct bcm2835_cprman *cprman, divider->div.reg = cprman->regs + data->a2w_reg; divider->div.shift = A2W_PLL_DIV_SHIFT; divider->div.width = A2W_PLL_DIV_BITS; - divider->div.flags = CLK_DIVIDER_MAX_AT_ZERO; + divider->div.flags = data->div_flags | CLK_DIVIDER_MAX_AT_ZERO; divider->div.lock = &cprman->regs_lock; divider->div.hw.init = &init; divider->div.table = NULL; @@ -1676,7 +1677,8 @@ 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 | CLK_GET_RATE_NOCACHE), + .flags = CLK_SET_RATE_PARENT | CLK_GET_RATE_NOCACHE, + .div_flags = CLK_DIVIDER_READ_ONLY), /* * PLLC is the core PLL, used to drive the core VPU clock. -- 2.21.0