From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH] MIPS: qemu-malta: use 320 MHz input clock for CP0 clocksource
Date: Wed, 1 Nov 2023 09:51:44 +0100 [thread overview]
Message-ID: <20231101085144.GE3359458@pengutronix.de> (raw)
In-Reply-To: <20231030223619.344784-1-antonynpavlov@gmail.com>
On Tue, Oct 31, 2023 at 01:36:19AM +0300, Antony Pavlov wrote:
> Modern qemu uses 24Kf CPU at 320 MHz for malta board.
> By default arch/mips/lib/csrc-r4k.c clocksource driver
> relies on CPU running at 200 MHz and CP0 timer runs
> at the half of CPU clock that is 100 MHz.
> As a result the `sleep 15` command runs for only
> 9 seconds on qemu-malta.
>
> Setting CPU clock to 320 MHz in the qemu-malta.dts file
> fixes the problem.
>
> See these qemu commits for details:
>
> eea1f5bac6f hw/mips/malta: Set CPU frequency to 320 MHz
> a7519f2b39b mips: malta/boston: replace cpu_model with cpu_type
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> arch/mips/Kconfig | 3 +++
> arch/mips/dts/qemu-malta.dts | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+)
Applied to master, thanks
Sascha
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index e05ee2d7f1a..89fc16be133 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -79,6 +79,9 @@ config MACH_MIPS_MALTA
> select SYS_SUPPORTS_BIG_ENDIAN
> select SYS_SUPPORTS_LITTLE_ENDIAN
> select HAS_DEBUG_LL
> + select COMMON_CLK
> + select COMMON_CLK_OF_PROVIDER
> + select CLKDEV_LOOKUP
> select GPIOLIB
> select HW_HAS_PCI
> select HAVE_PBL_IMAGE
> diff --git a/arch/mips/dts/qemu-malta.dts b/arch/mips/dts/qemu-malta.dts
> index f08832735f8..c2bc03dd463 100644
> --- a/arch/mips/dts/qemu-malta.dts
> +++ b/arch/mips/dts/qemu-malta.dts
> @@ -19,6 +19,26 @@ memory@0 {
> reg = <0x00000000 0x10000000>;
> };
>
> + clocks {
> + ref_clk: ref_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + clock-frequency = <320000000>;
> + };
> + };
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + cpu@0 {
> + device_type = "cpu";
> + compatible = "mips,mips24Kf";
> + clocks = <&ref_clk>;
> + reg = <0>;
> + };
> + };
> +
> uart0: serial@180003f8 {
> compatible = "ns16550a";
> reg = <0x180003f8 0x08>;
> --
> 2.39.0
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-11-01 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 22:36 Antony Pavlov
2023-11-01 8:51 ` Sascha Hauer [this message]
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=20231101085144.GE3359458@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.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