[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220725083522.82931-2-victor@allwinnertech.com>
Date: Mon, 25 Jul 2022 16:35:22 +0800
From: Victor Hassan <victor@...winnertech.com>
To: daniel.lezcano@...aro.org, tglx@...utronix.de, wens@...e.org,
jernej.skrabec@...il.com, samuel@...lland.org
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev,
allwinner-opensource-support@...winnertech.com
Subject: [PATCH 2/2] clocksource: sun4i: add definition of clear interrupt
To prevent misunderstanding, use TIMER_IRQ_CLEAR instead of TIMER_IRQ_EN
in function sun4i_timer_clear_interrupt.
Signed-off-by: Victor Hassan <victor@...winnertech.com>
---
drivers/clocksource/timer-sun4i.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-sun4i.c b/drivers/clocksource/timer-sun4i.c
index afc26de963af..dd74405a2666 100644
--- a/drivers/clocksource/timer-sun4i.c
+++ b/drivers/clocksource/timer-sun4i.c
@@ -26,6 +26,7 @@
#define TIMER_IRQ_EN_REG 0x00
#define TIMER_IRQ_EN(val) BIT(val)
#define TIMER_IRQ_ST_REG 0x04
+#define TIMER_IRQ_CLEAR(val) BIT(val)
#define TIMER_CTL_REG(val) (0x10 * val + 0x10)
#define TIMER_CTL_ENABLE BIT(0)
#define TIMER_CTL_RELOAD BIT(1)
@@ -167,7 +168,7 @@ static int sun4i_clkevt_next_event(unsigned long evt,
static void sun4i_timer_clear_interrupt(void __iomem *base)
{
- writel(TIMER_IRQ_EN(0), base + TIMER_IRQ_ST_REG);
+ writel(TIMER_IRQ_CLEAR(0), base + TIMER_IRQ_ST_REG);
}
static irqreturn_t sun4i_timer_interrupt(int irq, void *dev_id)
--
2.29.0
Powered by blists - more mailing lists