linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/20] clocksource/drivers/vf-pit: Replace raw_readl/writel to reald/writel
@ 2025-07-05 16:01 Daniel Lezcano
  2025-07-05 16:01 ` [PATCH 02/20] clocksource/drivers/vf_pit: Add COMPILE_TEST option Daniel Lezcano
                   ` (19 more replies)
  0 siblings, 20 replies; 37+ messages in thread
From: Daniel Lezcano @ 2025-07-05 16:01 UTC (permalink / raw)
  To: daniel.lezcano, tglx
  Cc: ghennadi.procopciuc, S32, linux-kernel, Arnd Bergmann

The driver uses the raw_readl() and raw_writel() functions. Those are
not for MMIO devices. Replace them with readl() and writel()

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 drivers/clocksource/timer-vf-pit.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/clocksource/timer-vf-pit.c b/drivers/clocksource/timer-vf-pit.c
index 911c92146eca..8041a8f62d1f 100644
--- a/drivers/clocksource/timer-vf-pit.c
+++ b/drivers/clocksource/timer-vf-pit.c
@@ -35,30 +35,30 @@ static unsigned long cycle_per_jiffy;
 
 static inline void pit_timer_enable(void)
 {
-	__raw_writel(PITTCTRL_TEN | PITTCTRL_TIE, clkevt_base + PITTCTRL);
+	writel(PITTCTRL_TEN | PITTCTRL_TIE, clkevt_base + PITTCTRL);
 }
 
 static inline void pit_timer_disable(void)
 {
-	__raw_writel(0, clkevt_base + PITTCTRL);
+	writel(0, clkevt_base + PITTCTRL);
 }
 
 static inline void pit_irq_acknowledge(void)
 {
-	__raw_writel(PITTFLG_TIF, clkevt_base + PITTFLG);
+	writel(PITTFLG_TIF, clkevt_base + PITTFLG);
 }
 
 static u64 notrace pit_read_sched_clock(void)
 {
-	return ~__raw_readl(clksrc_base + PITCVAL);
+	return ~readl(clksrc_base + PITCVAL);
 }
 
 static int __init pit_clocksource_init(unsigned long rate)
 {
 	/* set the max load value and start the clock source counter */
-	__raw_writel(0, clksrc_base + PITTCTRL);
-	__raw_writel(~0UL, clksrc_base + PITLDVAL);
-	__raw_writel(PITTCTRL_TEN, clksrc_base + PITTCTRL);
+	writel(0, clksrc_base + PITTCTRL);
+	writel(~0UL, clksrc_base + PITLDVAL);
+	writel(PITTCTRL_TEN, clksrc_base + PITTCTRL);
 
 	sched_clock_register(pit_read_sched_clock, 32, rate);
 	return clocksource_mmio_init(clksrc_base + PITCVAL, "vf-pit", rate,
@@ -76,7 +76,7 @@ static int pit_set_next_event(unsigned long delta,
 	 * hardware requirement.
 	 */
 	pit_timer_disable();
-	__raw_writel(delta - 1, clkevt_base + PITLDVAL);
+	writel(delta - 1, clkevt_base + PITLDVAL);
 	pit_timer_enable();
 
 	return 0;
@@ -125,8 +125,8 @@ static struct clock_event_device clockevent_pit = {
 
 static int __init pit_clockevent_init(unsigned long rate, int irq)
 {
-	__raw_writel(0, clkevt_base + PITTCTRL);
-	__raw_writel(PITTFLG_TIF, clkevt_base + PITTFLG);
+	writel(0, clkevt_base + PITTCTRL);
+	writel(PITTFLG_TIF, clkevt_base + PITTFLG);
 
 	BUG_ON(request_irq(irq, pit_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
 			   "VF pit timer", &clockevent_pit));
@@ -183,7 +183,7 @@ static int __init pit_timer_init(struct device_node *np)
 	cycle_per_jiffy = clk_rate / (HZ);
 
 	/* enable the pit module */
-	__raw_writel(~PITMCR_MDIS, timer_base + PITMCR);
+	writel(~PITMCR_MDIS, timer_base + PITMCR);
 
 	ret = pit_clocksource_init(clk_rate);
 	if (ret)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2025-07-28  8:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-05 16:01 [PATCH 01/20] clocksource/drivers/vf-pit: Replace raw_readl/writel to reald/writel Daniel Lezcano
2025-07-05 16:01 ` [PATCH 02/20] clocksource/drivers/vf_pit: Add COMPILE_TEST option Daniel Lezcano
2025-07-05 16:01 ` [PATCH 03/20] clocksource/drivers/vf_pit: Set the scene for multiple timers Daniel Lezcano
2025-07-07 12:04   ` Ghennadi Procopciuc
2025-07-05 16:01 ` [PATCH 04/20] clocksource/drivers/vf_pit: Rework the base address usage Daniel Lezcano
2025-07-07 12:03   ` Ghennadi Procopciuc
2025-07-24 17:29     ` Daniel Lezcano
2025-07-25  5:10       ` Ghennadi Procopciuc
2025-07-05 16:01 ` [PATCH 05/20] clocksource/drivers/vf_pit: Pass the cpu number as parameter Daniel Lezcano
2025-07-07  9:33   ` Ghennadi Procopciuc
2025-07-24 17:30     ` Daniel Lezcano
2025-07-05 16:01 ` [PATCH 06/20] clocksource/drivers/vf_pit: Encapsulate the initialization of the cycles_per_jiffy Daniel Lezcano
2025-07-05 16:01 ` [PATCH 07/20] clocksource/drivers/vf-pit: Allocate the struct timer at init time Daniel Lezcano
2025-07-05 16:01 ` [PATCH 08/20] clocksource/drivers/vf-pit: Convert raw values to BIT macros Daniel Lezcano
2025-07-05 16:01 ` [PATCH 09/20] clocksource/drivers/vf-pit: Register the clocksource from the driver Daniel Lezcano
2025-07-07 12:02   ` Ghennadi Procopciuc
2025-07-26 19:37     ` Daniel Lezcano
2025-07-05 16:01 ` [PATCH 10/20] clocksource/drivers/vf-pit: Encapsulate the macros Daniel Lezcano
2025-07-07 12:03   ` Ghennadi Procopciuc
2025-07-28  8:35     ` Daniel Lezcano
2025-07-05 16:01 ` [PATCH 11/20] clocksource/drivers/vf-pit: Encapsulate the PTLCVAL macro Daniel Lezcano
2025-07-05 16:01 ` [PATCH 12/20] clocksource/drivers/vf-pit: Use the node name for the interrupt and timer names Daniel Lezcano
2025-07-25  5:12   ` Ghennadi Procopciuc
2025-07-05 16:01 ` [PATCH 13/20] clocksource/drivers/vf-pit: Encapsulate clocksource enable / disable Daniel Lezcano
2025-07-05 16:01 ` [PATCH 14/20] clocksource/drivers/vf-pit: Enable and disable module on error Daniel Lezcano
2025-07-05 16:01 ` [PATCH 15/20] clocksource/drivers/vf-pit: Encapsulate set counter function Daniel Lezcano
2025-07-05 16:01 ` [PATCH 16/20] clocksource/drivers/vf-pit: Consolidate calls to pit_*_disable/enable Daniel Lezcano
2025-07-07 10:28   ` Ghennadi Procopciuc
2025-07-05 16:01 ` [PATCH 17/20] clocksource/drivers/vf-pit: Unify the function name for irq ack Daniel Lezcano
2025-07-05 16:01 ` [PATCH 18/20] clocksource/drivers/pit: Rename the VF PIT to NXP PIT Daniel Lezcano
2025-07-05 16:01 ` [PATCH 19/20] clocksource/drivers/nxp-pit: Add NXP Automotive s32g2 / s32g3 support Daniel Lezcano
2025-07-06 22:13   ` kernel test robot
2025-07-07 12:02   ` Ghennadi Procopciuc
2025-07-28  8:31     ` Daniel Lezcano
2025-07-05 16:01 ` [PATCH 20/20] dt: bindings: fsl,vf610-pit: Add compatible for s32g2 and s32g3 Daniel Lezcano
2025-07-08 17:27   ` Rob Herring
2025-07-07  9:11 ` [PATCH 01/20] clocksource/drivers/vf-pit: Replace raw_readl/writel to reald/writel Ghennadi Procopciuc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).