mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: clement.leger@linux.dev
To: Sascha Hauer <s.hauer@pengutronix.de>, barebox@lists.infradead.org
Cc: "Ahmad Fatoum" <a.fatoum@barebox.org>,
	"Clément Léger" <clement.leger@linux.dev>
Subject: [PATCH 2/5] drivers: clocksource: remove KVX timer
Date: Fri, 23 Oct 2026 22:05:04 +0200	[thread overview]
Message-ID: <20261023200507.63716-3-clement.leger@linux.dev> (raw)
In-Reply-To: <20261023200507.63716-1-clement.leger@linux.dev>

From: Clément Léger <clement.leger@linux.dev>

Remove the kvx timer driver.

Signed-off-by: Clément Léger <clement.leger@linux.dev>
---
 drivers/clocksource/Kconfig     |  4 ---
 drivers/clocksource/Makefile    |  1 -
 drivers/clocksource/kvx_timer.c | 60 ---------------------------------
 3 files changed, 65 deletions(-)
 delete mode 100644 drivers/clocksource/kvx_timer.c

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index b3ad477ce3..ef4ed6f820 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -48,10 +48,6 @@ config CLOCKSOURCE_EFI_X86
 	bool "EFI X86 HW driver"
 	depends on EFI_PAYLOAD && X86
 
-config CLOCKSOURCE_KVX
-	bool "KVX core timer clocksource"
-	depends on KVX
-
 config CLOCKSOURCE_MVEBU
 	bool "MVEBU clock source" if COMPILE_TEST
 	depends on ARCH_MVEBU || COMPILE_TEST
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index ec12e7babb..3850abd6f2 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -6,7 +6,6 @@ obj-$(CONFIG_CLOCKSOURCE_CLPS711X) += clps711x.o
 obj-$(CONFIG_CLOCKSOURCE_DIGIC)   += digic.o
 obj-$(CONFIG_CLOCKSOURCE_EFI) += efi.o
 obj-$(CONFIG_CLOCKSOURCE_EFI_X86) += efi_x86.o
-obj-$(CONFIG_CLOCKSOURCE_KVX)     += kvx_timer.o
 obj-$(CONFIG_CLOCKSOURCE_MVEBU)   += mvebu.o
 obj-$(CONFIG_CLOCKSOURCE_NOMADIK) += nomadik.o
 obj-$(CONFIG_CLOCKSOURCE_ORION)   += orion.o
diff --git a/drivers/clocksource/kvx_timer.c b/drivers/clocksource/kvx_timer.c
deleted file mode 100644
index eaa8f63b1e..0000000000
--- a/drivers/clocksource/kvx_timer.c
+++ /dev/null
@@ -1,60 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (C) 2018 Kalray Inc.
- */
-
-#include <common.h>
-#include <clock.h>
-#include <init.h>
-
-#include <linux/clk.h>
-#include <linux/err.h>
-
-#include <asm/sfr.h>
-
-static uint64_t kvx_pm_read(void)
-{
-	return kvx_sfr_get(PM0);
-}
-
-static struct clocksource kvx_clksrc = {
-	.read	= kvx_pm_read,
-	.mask	= CLOCKSOURCE_MASK(64),
-	.shift	= 0,
-	.priority = 70,
-};
-
-static int kvx_timer_probe(struct device *dev)
-{
-	struct clk *clk;
-	uint32_t clk_freq;
-
-	/* Get clock frequency */
-	clk = clk_get(dev, NULL);
-	if (IS_ERR(clk)) {
-		dev_err(dev, "Failed to get CPU clock: %ld\n", PTR_ERR(clk));
-		return PTR_ERR(clk);
-	}
-
-	clk_freq = clk_get_rate(clk);
-	clk_put(clk);
-
-	/* Init clocksource */
-	kvx_clksrc.mult = clocksource_hz2mult(clk_freq, kvx_clksrc.shift);
-
-	return init_clock(&kvx_clksrc);
-}
-
-static struct of_device_id kvx_timer_dt_ids[] = {
-	{ .compatible = "kalray,kvx-core-timer", },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, kvx_timer_dt_ids);
-
-static struct driver kvx_timer_driver = {
-	.name = "kvx-timer",
-	.probe = kvx_timer_probe,
-	.of_compatible = DRV_OF_COMPAT(kvx_timer_dt_ids),
-};
-
-postcore_platform_driver(kvx_timer_driver);
-- 
2.55.0




  parent reply	other threads:[~2026-10-23 20:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 20:05 [PATCH 0/5] kvx: remove architecture support clement.leger
2026-10-23 20:05 ` [PATCH 1/5] drivers: soc: remove KVX support clement.leger
2026-10-23 20:05 ` clement.leger [this message]
2026-10-23 20:05 ` [PATCH 3/5] drivers: nvmem: remove KVX OTP support clement.leger
2026-10-23 20:05 ` [PATCH 4/5] drivers: watchdog: remove KVX watchdog clement.leger

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=20261023200507.63716-3-clement.leger@linux.dev \
    --to=clement.leger@linux.dev \
    --cc=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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