Linux M68K Architecture development
 help / color / mirror / Atom feed
From: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
To: Greg Ungerer <gerg@linux-m68k.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org,
	linux-m68k@vger.kernel.org
Subject: Re: [PATCH 0/2] m68k: Add DMA timers support for M5441x
Date: Mon, 2 Dec 2024 11:14:32 +0100	[thread overview]
Message-ID: <2aefbd79-17c8-4190-bf4b-4e6b7d667065@yoseli.org> (raw)
In-Reply-To: <20241202-m5441x_dma_tmr-v1-0-94087efe4243@yoseli.org>

On 02/12/2024 10:29, Jean-Michel Hautbois wrote:
> This patch series adds support for DMA timers for the M5441x coldfire
> family. The aim is to provide finer scheduler resolution and support for
> high-resolution timers.
> 
> The first patch fixes the clocks and a typo. The second one is the
> timers support addition. As there is no device tree, I did not use
> TIMER_OF_DECLARE().

I forgot to mention the result on a real M544118 board !
With PIT timer:
bash-5.2# cyclictest -p 80 -m -q -l 10000
WARN: stat /dev/cpu_dma_latency failed: No such file or directory
WARN: High resolution timers not available
T: 0 (  231) P:80 I:1000 C:  10000 Min:    277 Act: 1965 Avg: 1437 Max: 
   2023

With this driver and the following declaration in m5441x.c:
static struct resource mcf_dmatmr2_resource[] = {
	[0] = {
		.start = MCFDMATIMER_BASE2,
		.end   = MCFDMATIMER_BASE2 + 0xf,
		.flags = IORESOURCE_MEM,
	},
	[1] = {
		.start = MCFDMATIMER_IRQ_DTIM2,
		.end   = MCFDMATIMER_IRQ_DTIM2,
		.flags = IORESOURCE_IRQ,
	},
	[2] = {
		.start = MCFDMATIMER_IRQ_PRIO2,
		.end   = MCFDMATIMER_IRQ_PRIO2,
		.flags = IORESOURCE_REG,
		.name = "prio_reg",
	}
};

static struct platform_device mcf_dmatmr2 = {
	.name			= "mcftmr",
	.id			= 2,
	.num_resources = ARRAY_SIZE(mcf_dmatmr2_resource),
	.resource = mcf_dmatmr2_resource,
};

bash-5.2# cyclictest -p 80 -m -q -l 10000 -R
WARN: stat /dev/cpu_dma_latency failed: No such file or directory
WARN: reported clock resolution: 1 nsec
WARN: measured clock resolution approximately: 2376 nsec
T: 0 (  243) P:80 I:1000 C:  10000 Min:    104 Act:  125 Avg:  129 Max: 
    239

I don't know why the reported resolution is 1ns and not 8ns but it is 
not a big issue I suppose :-) ?

> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
> ---
> Jean-Michel Hautbois (2):
>        m68k: coldfire: Use proper clock rate for timers
>        m68k: m5441x: Add DMA timer support
> 
>   MAINTAINERS                         |   6 +
>   arch/m68k/coldfire/m5441x.c         |  20 +--
>   arch/m68k/include/asm/m5441xsim.h   |  18 +++
>   drivers/clocksource/Kconfig         |   9 ++
>   drivers/clocksource/Makefile        |   1 +
>   drivers/clocksource/mcf_dma_timer.c | 240 ++++++++++++++++++++++++++++++++++++
>   6 files changed, 284 insertions(+), 10 deletions(-)
> ---
> base-commit: e3f432391d55ec21274bd16a04659b4a24678535
> change-id: 20241202-m5441x_dma_tmr-d969f4cc30a8
> 
> Best regards,


  parent reply	other threads:[~2024-12-02 10:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02  9:29 [PATCH 0/2] m68k: Add DMA timers support for M5441x Jean-Michel Hautbois
2024-12-02  9:29 ` [PATCH 1/2] m68k: coldfire: Use proper clock rate for timers Jean-Michel Hautbois
2024-12-18 12:36   ` Greg Ungerer
2024-12-18 14:42     ` Jean-Michel Hautbois
2024-12-02  9:29 ` [PATCH 2/2] m68k: m5441x: Add DMA timer support Jean-Michel Hautbois
2024-12-22 13:41   ` Greg Ungerer
2024-12-22 14:30     ` Jean-Michel Hautbois
2024-12-02 10:14 ` Jean-Michel Hautbois [this message]
2024-12-12 10:39 ` [PATCH 0/2] m68k: Add DMA timers support for M5441x Jean-Michel Hautbois

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=2aefbd79-17c8-4190-bf4b-4e6b7d667065@yoseli.org \
    --to=jeanmichel.hautbois@yoseli.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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