All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: ralph.siemsen@linaro.org
Cc: geert+renesas@glider.be, linux-clk@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org, phil.edworthy@renesas.com
Subject: [PATCH v2 1/3] clk: renesas: r9a06g032: Fix UART clkgrp bitsel
Date: Wed, 18 May 2022 14:25:27 -0400	[thread overview]
Message-ID: <20220518182527.1693156-1-ralph.siemsen@linaro.org> (raw)
In-Reply-To: <20220518172808.1691450-1-ralph.siemsen@linaro.org>

There are two UART clock groups, each having a mux to select its
upstream clock source. The register/bit definitions for accessing these
two muxes appear to have been reversed since introduction. Correct them
so as to match the hardware manual.

Fixes: 4c3d88526eba ("clk: renesas: Renesas R9A06G032 clock driver")

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
---
v2 changes:
- reverse the comments as well

 drivers/clk/renesas/r9a06g032-clocks.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/renesas/r9a06g032-clocks.c b/drivers/clk/renesas/r9a06g032-clocks.c
index c99942f0e4d4..abc0891fd96d 100644
--- a/drivers/clk/renesas/r9a06g032-clocks.c
+++ b/drivers/clk/renesas/r9a06g032-clocks.c
@@ -286,8 +286,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
 		.name = "uart_group_012",
 		.type = K_BITSEL,
 		.source = 1 + R9A06G032_DIV_UART,
-		/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
-		.dual.sel = ((0xec / 4) << 5) | 24,
+		/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
+		.dual.sel = ((0x34 / 4) << 5) | 30,
 		.dual.group = 0,
 	},
 	{
@@ -295,8 +295,8 @@ static const struct r9a06g032_clkdesc r9a06g032_clocks[] = {
 		.name = "uart_group_34567",
 		.type = K_BITSEL,
 		.source = 1 + R9A06G032_DIV_P2_PG,
-		/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG0_0 */
-		.dual.sel = ((0x34 / 4) << 5) | 30,
+		/* R9A06G032_SYSCTRL_REG_PWRCTRL_PG1_PR2 */
+		.dual.sel = ((0xec / 4) << 5) | 24,
 		.dual.group = 1,
 	},
 	D_UGATE(CLK_UART0, "clk_uart0", UART_GROUP_012, 0, 0, 0x1b2, 0x1b3, 0x1b4, 0x1b5),
-- 
2.25.1


  parent reply	other threads:[~2022-05-18 18:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 17:27 [PATCH 1/3] clk: renesas: r9a06g032: Fix UART clkgrp bitsel Ralph Siemsen
2022-05-18 17:27 ` [PATCH 2/3] clk: renesas: r9a06g032: drop some unused fields Ralph Siemsen
2022-05-18 17:44   ` Phil Edworthy
2022-05-19  9:41   ` Geert Uytterhoeven
2022-05-18 17:27 ` [PATCH 3/3] clk: renesas: r9a06g032: remove unused field Ralph Siemsen
2022-05-18 17:45   ` Phil Edworthy
2022-05-19  9:41   ` Geert Uytterhoeven
2022-05-18 17:32 ` [PATCH 1/3] clk: renesas: r9a06g032: Fix UART clkgrp bitsel Phil Edworthy
2022-05-18 18:25 ` Ralph Siemsen [this message]
2022-05-18 18:32   ` [PATCH v2 " Phil Edworthy
2022-05-19  9:31     ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220518182527.1693156-1-ralph.siemsen@linaro.org \
    --to=ralph.siemsen@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=phil.edworthy@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.