Re: [PATCH 0/2] m68k: Add DMA timers support for M5441x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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,





[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux