提交 4364044c 编写于 作者: V Victor Hassan 提交者: Daniel Lezcano

clocksource/drivers/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: NVictor Hassan <victor@allwinnertech.com>
Acked-by: NJernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20220906052056.43404-1-victor@allwinnertech.comSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 eaa1a955
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define TIMER_IRQ_EN_REG 0x00 #define TIMER_IRQ_EN_REG 0x00
#define TIMER_IRQ_EN(val) BIT(val) #define TIMER_IRQ_EN(val) BIT(val)
#define TIMER_IRQ_ST_REG 0x04 #define TIMER_IRQ_ST_REG 0x04
#define TIMER_IRQ_CLEAR(val) BIT(val)
#define TIMER_CTL_REG(val) (0x10 * val + 0x10) #define TIMER_CTL_REG(val) (0x10 * val + 0x10)
#define TIMER_CTL_ENABLE BIT(0) #define TIMER_CTL_ENABLE BIT(0)
#define TIMER_CTL_RELOAD BIT(1) #define TIMER_CTL_RELOAD BIT(1)
...@@ -123,7 +124,7 @@ static int sun4i_clkevt_next_event(unsigned long evt, ...@@ -123,7 +124,7 @@ static int sun4i_clkevt_next_event(unsigned long evt,
static void sun4i_timer_clear_interrupt(void __iomem *base) 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) static irqreturn_t sun4i_timer_interrupt(int irq, void *dev_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册