Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7289537imu; Wed, 14 Nov 2018 14:58:57 -0800 (PST) X-Google-Smtp-Source: AJdET5cAgjs3mkQ67fpQECrQFYO6trboRD/zHhvWpjVQV5P2RektNbwTF6bnWoULGMxQxNkJvXCR X-Received: by 2002:a63:990a:: with SMTP id d10mr3524285pge.279.1542236336975; Wed, 14 Nov 2018 14:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542236336; cv=none; d=google.com; s=arc-20160816; b=wgY62cxmplEmR5It9iM4SmSx6QVGPmbgfZ2FFPYR0AgVtKMcPagGWeInc58VBnBrT5 BaOF0mpQSj3xqgpMrQMEA+6c+NtUg59AwpXvdO+MgCT627D8iTvZUVEbrF3eOYbVSyPz XSpE1LPzm7OBfaG9vEnNQYL55WbAkAwM9IeYiZN6l3lPg9IjXlP4Vd76rWuXej1nagdm +e38wlzP4a/dP0G9erW9atXuonqQUK5RTFDxBeliJL8SWbgmbTaNZWcRadseF9qzhZyh zy5seu/jb1dhCVkCnr1SLFJJFCcqA+Cf9M/kaQyF/cBfitx9nNABThih3ldBUHZthIPi SFtQ== 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=CVZ5uvw2/86wt6Serx6lIpgnovwRR9rOzr4LZhzakUs=; b=Gr+5jk1Bthoqx4b0CV5wZSZsM7t8K3lCFz8NLG48pHJJgYQSAMgHYs6zk7VeHQ9q+U zbgxLj2ilLDQ4z/Z3RFHzYvGTtGnNSg9EZMQrFMq7uuVv5r1U2XIz5V0JgAUVtcgHzVu S1eamOqMWOcgWGJZeGBJD4ELIUno1C3XpGDODpWBE3lE4pT0uMhx055uJsPeQ/PHFoPS Pzq5LqyzPWzotkde0xH4c9E1yIPC/4BX3CMTfS9U0r6LUuCxl3lJXIN23HDi44F9ZdVB /5qSM6ZPz+Wgk8JQiiEJVFOxSoXy8Ek/i4ooEKtoqMdR3DlggzU9TQ80FKhe5b7T/A7u ycHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=q838D237; 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 bg1-v6si24483016plb.165.2018.11.14.14.58.42; Wed, 14 Nov 2018 14:58:56 -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=q838D237; 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 S1729044AbeKOJDQ (ORCPT + 99 others); Thu, 15 Nov 2018 04:03:16 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53086 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728508AbeKOJDP (ORCPT ); Thu, 15 Nov 2018 04:03:15 -0500 Received: by mail-wm1-f68.google.com with SMTP id r11-v6so16974729wmb.2; Wed, 14 Nov 2018 14:57:59 -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=CVZ5uvw2/86wt6Serx6lIpgnovwRR9rOzr4LZhzakUs=; b=q838D237yNSrJ16Jo5GXvOyCzWY0h6dPjzT8TAAOqnENilInt7Rgzx8PbCRwdBCFNZ 1WfIhM6RVjUQsMcym/TvPDUr+Lczqhbx+aiCgkxLCwkflW/0dhRtUqz+ahhkiaVEOpX2 FL9GBa56vajhsvQADxxeyNMgMbrOD4vqDz8LqmK1P4rVeceL/O4koJBqx/DK6ZMKAYYM 2PgFT3sS4tprwq11Fl0bVm/uaPKGypKQYMLhcWEPVN/arL1kGpeK3Vj9w8+CazOdMQe+ r0F0WiPVJBBlRtlxrPdjqorQ4CIDSQOiY2IQR0hXcI5li456SVHqf1/FlPJIvclY9r/K 3F+A== 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=CVZ5uvw2/86wt6Serx6lIpgnovwRR9rOzr4LZhzakUs=; b=HWNvZYUA+C0SI8fYS6quepsbuDcUziFTrc4rR8SN9i7s1Te8MeyIXidWCfkJqnhzlu HmExUU3EyBxKJLH4q3QBIyVqPRfAAULtEmfVaciplRE9RLruuE+IFprTP7rj681+Jx9W 0ThFrfFGm/IVMh701QuowRAP7Vl1fm0YHnU6DnIPARtxegkq+5qcejvfZsvRMpWuQjIg pqm/D/f59p9rcqo9BEPmoTqFFt9pI8ingzf3X7sISuV8YwepWf0G7d1zU7iyunAYqbsS iflUnnQubVSEe3z3//uCcmIFkZX6ao6NRlSIukNRHwiNilRiZqvsSXqNpn1wBLGVnHV5 M2MQ== X-Gm-Message-State: AGRZ1gKcfv+PGGOj0pJ7aQDPbFZCrnIclxqlnCU5ACB6o+EDHWZ0Xb8Q gNxa+s3SDITKHapHDkapoMI= X-Received: by 2002:a1c:ac85:: with SMTP id v127mr3350283wme.62.1542236278624; Wed, 14 Nov 2018 14:57:58 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD717A100301AB549B11D5ACB.dip0.t-ipconnect.de. [2003:dc:d717:a100:301a:b549:b11d:5acb]) by smtp.googlemail.com with ESMTPSA id n7-v6sm18987784wrt.60.2018.11.14.14.57.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 14:57:57 -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: [RFC v1 7/7] clk: meson: meson8b: allow changing the CPU clock tree Date: Wed, 14 Nov 2018 23:57:25 +0100 Message-Id: <20181114225725.2821-8-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181114225725.2821-1-martin.blumenstingl@googlemail.com> References: <20181114225725.2821-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 --- 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