From patchwork Thu Nov 22 21:40:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 10694897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 664685A4 for ; Thu, 22 Nov 2018 21:40:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54FCF2CBED for ; Thu, 22 Nov 2018 21:40:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49A7F2CC45; Thu, 22 Nov 2018 21:40:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB64B2CBED for ; Thu, 22 Nov 2018 21:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qOiSEsJMHtsw1M7P/M9ZZTG0oDpSsW4YHQwvRNBmLXs=; b=fGk7J3tGDbsMEN +KObXnjeHUlFtpQSFwUvcBCtL3baNydpGpqEqI37vxnSAe+8OIvoIyIdVcpy81GYqMW+7Cxb6r7NV 8XN/H+UI5nKGTIxVWSLQuLA02en3oxD43nV/oiI5zrs2V2gDXrbTs2/b4arW2DoBQl1al7JOA0Dx9 98x8OfNjfUDxUMHtTN4PzpxacxANxahxppDyA/y0QOtNOpaT2wDv8hBwg/oB6Dzrve22MaCMbQgjW qdN6fF7J+zDjlqMvwfI/s3oL7ovLKxD8PSeG7wTzPwc+r7zpX1fZ1IOYVRJ0Rt1icsMy4hguoT/Vp gDBK1dBJ+uoZgLHCSHOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPwiI-0006Dx-G5; Thu, 22 Nov 2018 21:40:42 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPwiD-00069J-7x; Thu, 22 Nov 2018 21:40:38 +0000 Received: by mail-wm1-x343.google.com with SMTP id y1so6949800wmi.3; Thu, 22 Nov 2018 13:40:30 -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=DownjwjeOEnZH3e88ykBjvED3HOTGAzn5RoqAbXS+qA=; b=W7EqpwoufhiW52oKaFV8zmAwVwCbly9g/Kp0fQuBw37Y22K2iuhtdmrSgzgmePsj+n YQMkolFBaaWTXAxe/3t0sh/eT9PRFQ5Wa92rtrI4ND52Dzo2SLwci7dRdcXsjCo9ZkfA 2PdzqP1kMGWVksabKMqNh+IgHRiTWWOQG/CFo3lwOZdiHz6cTdS0WQcB3hhoeWUZkX82 MzTOCLeIiZII4wROHaCpUhfowuZcN6bl3NiKFUoQk3XkWuva5322cbGp7+IMlfJ5JSN6 Fo7cIr31tqeOvAEtoLslB9kc0+f32CwvaYKSqeLKUHXyj9HYzyVRdxQdWunsAyvSnCwn zxSA== 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=DownjwjeOEnZH3e88ykBjvED3HOTGAzn5RoqAbXS+qA=; b=mhBEQA96ED84Lsze+UU/9p2QD2o9sjLJbzAlG9kC9kQzh6KVkhjAb4YstwlqDkyQvz IKPggXk8x69qWBHyFO9YdrOHGnE/Bm3B0g5rWZZfUHah8C4qb3XY5cDubUOfksGPtsA4 8Dl/yiXSR9QAsm8ByB24oap+5/MMRH2i6gDEJlXyoXZb0TxxqW3KwkqDXbK6XrNhNg2C 2ghUdPkZJE6xgLSdRxcISreMxsHb2eFKPayIjqxKxLnA5fyUQjx5wFsNe7uMmjJ1SFwt az8z9Bre7AAUbfsimPycVy82N4W4u3RlPBCd5HxsDgWl6flm3uACqoT1eUZL/fIL5NLu I8LA== X-Gm-Message-State: AGRZ1gKev6j4g8m6Vy2hQDW8/OcwafNDNxJ46bLy0cmg1sSCkvD4OEIT LRwCSo7X9wYL0xZrM+572HngbeM9 X-Google-Smtp-Source: AFSGD/XDnHNF1qWcHGFT3fRwS02TvIwwxiWnXZqaCAaQvwA6urL+H6xZwO+Gg8ZDOPXweFl4ribSUg== X-Received: by 2002:a1c:d14d:: with SMTP id i74mr10716213wmg.100.1542922828527; Thu, 22 Nov 2018 13:40:28 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD732F5007DE18DA1F72FF8D9.dip0.t-ipconnect.de. [2003:dc:d732:f500:7de1:8da1:f72f:f8d9]) by smtp.googlemail.com with ESMTPSA id x14sm29755554wrm.65.2018.11.22.13.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 13:40:27 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, narmstrong@baylibre.com, jbrunet@baylibre.com Subject: [PATCH v2 3/4] clk: meson: meson8b: rename cpu_div2/cpu_div3 to cpu_in_div2/cpu_in_div3 Date: Thu, 22 Nov 2018 22:40:16 +0100 Message-Id: <20181122214017.25643-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122214017.25643-1-martin.blumenstingl@googlemail.com> References: <20181122214017.25643-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181122_134037_289193_421098B5 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sboyd@kernel.org, mturquette@baylibre.com, linux-kernel@vger.kernel.org, Martin Blumenstingl , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The "cpu_div2" and "cpu_div3" take "cpu_in" as input and divide that by 2 or 3. The clock controller can also generate various CPU clock post-dividers (2, 3, 4, 5, 6, 7, 8) which are derived from "cpu_clk". When adding support for these post-dividers our clock naming could be misleading as we have "cpu_div2" as well as "cpu_clk_div2". Rename the existing "cpu_in" dividers so the name of the divider's parent is part of the divider clock's name. Signed-off-by: Martin Blumenstingl Acked-by: Jerome Brunet --- drivers/clk/meson/meson8b.c | 20 ++++++++++---------- drivers/clk/meson/meson8b.h | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index b3bdc7e05441..010dccc86b5d 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -560,11 +560,11 @@ static struct clk_regmap meson8b_cpu_in_sel = { }, }; -static struct clk_fixed_factor meson8b_cpu_div2 = { +static struct clk_fixed_factor meson8b_cpu_in_div2 = { .mult = 1, .div = 2, .hw.init = &(struct clk_init_data){ - .name = "cpu_div2", + .name = "cpu_in_div2", .ops = &clk_fixed_factor_ops, .parent_names = (const char *[]){ "cpu_in_sel" }, .num_parents = 1, @@ -572,11 +572,11 @@ static struct clk_fixed_factor meson8b_cpu_div2 = { }, }; -static struct clk_fixed_factor meson8b_cpu_div3 = { +static struct clk_fixed_factor meson8b_cpu_in_div3 = { .mult = 1, .div = 3, .hw.init = &(struct clk_init_data){ - .name = "cpu_div3", + .name = "cpu_in_div3", .ops = &clk_fixed_factor_ops, .parent_names = (const char *[]){ "cpu_in_sel" }, .num_parents = 1, @@ -626,12 +626,12 @@ static struct clk_regmap meson8b_cpu_scale_out_sel = { .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 - * makes the system unstable and can result in a lockup of the - * whole system. + * "cpu_in_div3") because it results in a duty cycle of 33% + * which makes the system unstable and can result in a lockup + * of the whole system. */ .parent_names = (const char *[]) { "cpu_in_sel", - "cpu_div2", + "cpu_in_div2", "cpu_scale_div" }, .num_parents = 3, .flags = CLK_SET_RATE_PARENT, @@ -889,8 +889,8 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = { [CLKID_MPLL1_DIV] = &meson8b_mpll1_div.hw, [CLKID_MPLL2_DIV] = &meson8b_mpll2_div.hw, [CLKID_CPU_IN_SEL] = &meson8b_cpu_in_sel.hw, - [CLKID_CPU_DIV2] = &meson8b_cpu_div2.hw, - [CLKID_CPU_DIV3] = &meson8b_cpu_div3.hw, + [CLKID_CPU_IN_DIV2] = &meson8b_cpu_in_div2.hw, + [CLKID_CPU_IN_DIV3] = &meson8b_cpu_in_div3.hw, [CLKID_CPU_SCALE_DIV] = &meson8b_cpu_scale_div.hw, [CLKID_CPU_SCALE_OUT_SEL] = &meson8b_cpu_scale_out_sel.hw, [CLKID_MPLL_PREDIV] = &meson8b_mpll_prediv.hw, diff --git a/drivers/clk/meson/meson8b.h b/drivers/clk/meson/meson8b.h index 1c6fb180e6a2..9cba34c6cb92 100644 --- a/drivers/clk/meson/meson8b.h +++ b/drivers/clk/meson/meson8b.h @@ -63,8 +63,8 @@ #define CLKID_MPLL1_DIV 97 #define CLKID_MPLL2_DIV 98 #define CLKID_CPU_IN_SEL 99 -#define CLKID_CPU_DIV2 100 -#define CLKID_CPU_DIV3 101 +#define CLKID_CPU_IN_DIV2 100 +#define CLKID_CPU_IN_DIV3 101 #define CLKID_CPU_SCALE_DIV 102 #define CLKID_CPU_SCALE_OUT_SEL 103 #define CLKID_MPLL_PREDIV 104