From: Benedikt Spranger <b.spranger@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: linux-clk@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Dinh Nguyen <dinguyen@kernel.org>
Subject: [PATCH 1/1] clk: socfpga: gate: Fix of by factor 2 for serial console
Date: Thu, 5 Oct 2023 11:59:27 +0200 [thread overview]
Message-ID: <20231005095927.12398-2-b.spranger@linutronix.de> (raw)
In-Reply-To: <20231005095927.12398-1-b.spranger@linutronix.de>
Commit 9607beb917df ("clk: socfpga: gate: Add a determine_rate hook")
introduce a specific determine_rate hook. As a result the calculated
clock for the serial IP is off by factor 2 after that i.e. if the system
configures a baudrate of 115200 it is set physicaly to 57600.
Change the determine_rate hook to the reparent variant
__clk_mux_determine_rate() to fix the issue.
Cc: stable@vger.kernel.org
Fixes: 9607beb917df ("clk: socfpga: gate: Add a determine_rate hook")
Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
---
drivers/clk/socfpga/clk-gate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c
index 8dd601bd8538..47500976f987 100644
--- a/drivers/clk/socfpga/clk-gate.c
+++ b/drivers/clk/socfpga/clk-gate.c
@@ -110,7 +110,7 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk,
static struct clk_ops gateclk_ops = {
.recalc_rate = socfpga_clk_recalc_rate,
- .determine_rate = clk_hw_determine_rate_no_reparent,
+ .determine_rate = __clk_mux_determine_rate,
.get_parent = socfpga_clk_get_parent,
.set_parent = socfpga_clk_set_parent,
};
--
2.42.0
next prev parent reply other threads:[~2023-10-05 13:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 9:59 [PATCH 0/1] Broken serial console on Altera Cyclon V board Benedikt Spranger
2023-10-05 9:59 ` Benedikt Spranger [this message]
2023-10-05 11:34 ` [PATCH 1/1] clk: socfpga: gate: Fix of by factor 2 for serial console Maxime Ripard
2023-10-05 18:32 ` Benedikt Spranger
2023-10-05 21:03 ` Stephen Boyd
2023-10-06 3:39 ` Benedikt Spranger
2023-10-06 14:53 ` Maxime Ripard
2023-10-06 15:01 ` Maxime Ripard
2023-10-06 16:40 ` Benedikt Spranger
2023-10-11 9:17 ` Maxime Ripard
2023-10-11 14:03 ` Benedikt Spranger
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=20231005095927.12398-2-b.spranger@linutronix.de \
--to=b.spranger@linutronix.de \
--cc=dinguyen@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®