Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8619167imu; Thu, 15 Nov 2018 14:42:18 -0800 (PST) X-Google-Smtp-Source: AJdET5cXVy1MRQJg6ICa/2OXD7R9X4MR4IG9XQbR1s0TJQEGxV0lMtE/ue1ySrUFx6Fu8dmT5q2e X-Received: by 2002:a62:c28e:: with SMTP id w14mr1774413pfk.115.1542321738145; Thu, 15 Nov 2018 14:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542321738; cv=none; d=google.com; s=arc-20160816; b=pMbKBuE6PetVy5R6SVooBVculHX+N3RzeovIcXVatGLH4wR0xEqj7APoEwdsTc9bJP 9LNoAcysY8k0zGOIMID70GUcB7Ye4nBZ48m4eLTzn7xDCBWhro/EcDe6R9yk2wgvZDKU bsQ1U1IYr7IIQAHipWfoCsvd1zr3Kfc6XhfIYNHVyLnNubFumqRHOeVYlaiGuJH2tb53 a4xtpg2lg77W9qFLoRHLXsKd3FmYrKghFO7OwB5oV9Ln8nLyF+OphNjuFNVRhBhM2xJW GhLIbgSGGfjVaV2eXoczXmIf936ltpsnuiK+ETRPmQWBvd4zb/90e0IiNg663SvR1sNo h2qQ== 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 :dkim-signature; bh=JvGZTbDWv4lGUG5na7L9lqIQ6L4IllGuR7w0yW3E6tM=; b=R5zx2b9Q5oaQkUvIMK3uq0TAh4pEcnxKqcUyPn6O4OeCr++Zx86f/VT/Z4t4TMp+6o sP6bw/kpkQdd66NSydW4yvRZJmWF7XnGNR5LO03/QkfEhYRnTyx+uqtzog5F5bdlE7o7 Q/p99F9nG4TgmPy69/sGgWgTZkb16m1NsW+BnG2P1t3HR7b+rlJvZ5GOf4zjktacB2dX eE+KsOvisKeF/kIt2vT0A1WEjdxO+AHvm8U3yK3n37oPZ1neHUb2auIMrABi9f1LMgkx e2yq7pzBKvnjJkTrvNVS/4rN3jUu4JDxn0YflKWW+sgA+OJWM++wIphXrhh701k4UQ8w Je+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=oQxAiuhu; 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 n28si5783832pfb.88.2018.11.15.14.42.02; Thu, 15 Nov 2018 14:42:18 -0800 (PST) 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=oQxAiuhu; 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 S2389117AbeKPIvL (ORCPT + 99 others); Fri, 16 Nov 2018 03:51:11 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39955 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbeKPIvJ (ORCPT ); Fri, 16 Nov 2018 03:51:09 -0500 Received: by mail-wr1-f66.google.com with SMTP id p4so13735206wrt.7; Thu, 15 Nov 2018 14:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JvGZTbDWv4lGUG5na7L9lqIQ6L4IllGuR7w0yW3E6tM=; b=oQxAiuhuTC19CmRlMCwooBbPO2w9P3XOaYYQh7Zz/A+hOni6DBJ/8AyWZlnofgQ2OH DifB9Z17WK1WhwNOreLQyDUZ4sPyQuGIzsDtxG1VUKg/Hbc0R6CO07h44gAmF59Z/65I zize5Nhz0jfXBnReE7dKkxYkGCnXQCr8PNYVDdjipAzsqGeOv5AnuM7IiE0/2+PHd3/C yXpRKQ7EpR+3e9yqmwYfyCff6JEzPtZU++cMnoqkTpWx3tUv0qXSaDEEaFwvtdLIolhr PxeX7WpZT7gbXdyGMW8PN8o3oKlPS3W8y4l1b0xmqkS4Ch3q2V2YEg/idBpWom+8Yhlm v18Q== 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:mime-version:content-transfer-encoding; bh=JvGZTbDWv4lGUG5na7L9lqIQ6L4IllGuR7w0yW3E6tM=; b=jP+o3BPW/5IGjivOji/2IYBkhwjFj8+PYzKRMBT9PDJ/Q2DdHhz3NPZ8/g15zuFIqt luDJWHC3XTkHOdWgTcv0aQXhg+oKU3gQY1+3AtZgLSIL5+8t43bDgEMjZw9AXVYGkp5n oZYRMecaxCGXa6Q7IJlWsvwtEpXXAfa/pbJZvlhkqw3JF+5B3XkVoFDTdUdKNYmU3PUU HdMMtjMbRGPDj8yeJUh3Vv3GGCljFv5yGtG30nn+QNo5c7JEMNFTyi928wSqMiXCfD9G UqgWcvcZwwrZhMCKoD4pNP9VhT/c+nJhAObvN6LgPCV/hIYG4ITbaF/U+fn/pZnlZnh/ 9dkQ== X-Gm-Message-State: AA+aEWZvvr1KInWt8gicfoVydX3iZZb+jrTVyFiQqdgIQ8qf6eOF+aNQ g0tQs3XOU2QjmNFQg/7tEJs= X-Received: by 2002:a5d:4c42:: with SMTP id n2-v6mr1698860wrt.298.1542321682553; Thu, 15 Nov 2018 14:41:22 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD717A100B85ACE585A885C51.dip0.t-ipconnect.de. [2003:dc:d717:a100:b85a:ce58:5a88:5c51]) by smtp.googlemail.com with ESMTPSA id x12sm2076388wmc.37.2018.11.15.14.41.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 14:41:21 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, jbrunet@baylibre.com, narmstrong@baylibre.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mturquette@baylibre.com, sboyd@kernel.org, Martin Blumenstingl Subject: [PATCH v2 6/6] clk: meson: meson8b: allow changing the CPU clock tree Date: Thu, 15 Nov 2018 23:40:48 +0100 Message-Id: <20181115224048.13511-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115224048.13511-1-martin.blumenstingl@googlemail.com> References: <20181115224048.13511-1-martin.blumenstingl@googlemail.com> 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 Currently all clocks in the CPU clock tree are marked as read-only (using the corresponding _ro_ clk_ops). This was correct since changing the clock tree could cause the system to lock up. Switch all clocks to their corresponding clk_ops variant which is not read-only to allow changing the CPU clock tree since the bug which locked up the system is now fixed (by switching the CPU clock temporary to run off XTAL while changing the CPU clock tree). Signed-off-by: Martin Blumenstingl Reviewed-by: Jerome Brunet --- drivers/clk/meson/meson8b.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index c06a1a7faa4c..b3bdc7e05441 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -203,7 +203,7 @@ static struct clk_regmap meson8b_sys_pll_dco = { }, .hw.init = &(struct clk_init_data){ .name = "sys_pll_dco", - .ops = &meson_clk_pll_ro_ops, + .ops = &meson_clk_pll_ops, .parent_names = (const char *[]){ "xtal" }, .num_parents = 1, }, @@ -218,7 +218,7 @@ static struct clk_regmap meson8b_sys_pll = { }, .hw.init = &(struct clk_init_data){ .name = "sys_pll", - .ops = &clk_regmap_divider_ro_ops, + .ops = &clk_regmap_divider_ops, .parent_names = (const char *[]){ "sys_pll_dco" }, .num_parents = 1, .flags = CLK_SET_RATE_PARENT, @@ -552,7 +552,7 @@ static struct clk_regmap meson8b_cpu_in_sel = { }, .hw.init = &(struct clk_init_data){ .name = "cpu_in_sel", - .ops = &clk_regmap_mux_ro_ops, + .ops = &clk_regmap_mux_ops, .parent_names = (const char *[]){ "xtal", "sys_pll" }, .num_parents = 2, .flags = (CLK_SET_RATE_PARENT | @@ -606,7 +606,7 @@ static struct clk_regmap meson8b_cpu_scale_div = { }, .hw.init = &(struct clk_init_data){ .name = "cpu_scale_div", - .ops = &clk_regmap_divider_ro_ops, + .ops = &clk_regmap_divider_ops, .parent_names = (const char *[]){ "cpu_in_sel" }, .num_parents = 1, .flags = CLK_SET_RATE_PARENT, @@ -623,7 +623,7 @@ static struct clk_regmap meson8b_cpu_scale_out_sel = { }, .hw.init = &(struct clk_init_data){ .name = "cpu_scale_out_sel", - .ops = &clk_regmap_mux_ro_ops, + .ops = &clk_regmap_mux_ops, /* * NOTE: We are skipping the parent with value 0x2 (which is * "cpu_div3") because it results in a duty cycle of 33% which @@ -646,7 +646,7 @@ static struct clk_regmap meson8b_cpu_clk = { }, .hw.init = &(struct clk_init_data){ .name = "cpu_clk", - .ops = &clk_regmap_mux_ro_ops, + .ops = &clk_regmap_mux_ops, .parent_names = (const char *[]){ "xtal", "cpu_scale_out_sel" }, .num_parents = 2, -- 2.19.1