* [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
@ 2019-05-23 18:16 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-05-23 18:16 UTC (permalink / raw)
To: linux-kernel, Daniel Lezcano, Thomas Gleixner
Cc: linux-arm-kernel, Linus Walleij
This adds delay timer functionality to the IXP4xx
timer driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/clocksource/timer-ixp4xx.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-ixp4xx.c b/drivers/clocksource/timer-ixp4xx.c
index 5c2190b654cd..9396745e1c17 100644
--- a/drivers/clocksource/timer-ixp4xx.c
+++ b/drivers/clocksource/timer-ixp4xx.c
@@ -75,14 +75,19 @@ to_ixp4xx_timer(struct clock_event_device *evt)
return container_of(evt, struct ixp4xx_timer, clkevt);
}
-static u64 notrace ixp4xx_read_sched_clock(void)
+static unsigned long ixp4xx_read_timer(void)
{
return __raw_readl(local_ixp4xx_timer->base + IXP4XX_OSTS_OFFSET);
}
+static u64 notrace ixp4xx_read_sched_clock(void)
+{
+ return ixp4xx_read_timer();
+}
+
static u64 ixp4xx_clocksource_read(struct clocksource *c)
{
- return __raw_readl(local_ixp4xx_timer->base + IXP4XX_OSTS_OFFSET);
+ return ixp4xx_read_timer();
}
static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id)
@@ -224,6 +229,13 @@ static __init int ixp4xx_timer_register(void __iomem *base,
sched_clock_register(ixp4xx_read_sched_clock, 32, timer_freq);
+#ifdef CONFIG_ARM
+ /* Also use this timer for delays */
+ tmr->delay_timer.read_current_timer = ixp4xx_read_timer;
+ tmr->delay_timer.freq = timer_freq;
+ register_current_timer_delay(&tmr->delay_timer);
+#endif
+
return 0;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
@ 2019-05-23 18:16 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-05-23 18:16 UTC (permalink / raw)
To: linux-kernel, Daniel Lezcano, Thomas Gleixner
Cc: Linus Walleij, linux-arm-kernel
This adds delay timer functionality to the IXP4xx
timer driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/clocksource/timer-ixp4xx.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/timer-ixp4xx.c b/drivers/clocksource/timer-ixp4xx.c
index 5c2190b654cd..9396745e1c17 100644
--- a/drivers/clocksource/timer-ixp4xx.c
+++ b/drivers/clocksource/timer-ixp4xx.c
@@ -75,14 +75,19 @@ to_ixp4xx_timer(struct clock_event_device *evt)
return container_of(evt, struct ixp4xx_timer, clkevt);
}
-static u64 notrace ixp4xx_read_sched_clock(void)
+static unsigned long ixp4xx_read_timer(void)
{
return __raw_readl(local_ixp4xx_timer->base + IXP4XX_OSTS_OFFSET);
}
+static u64 notrace ixp4xx_read_sched_clock(void)
+{
+ return ixp4xx_read_timer();
+}
+
static u64 ixp4xx_clocksource_read(struct clocksource *c)
{
- return __raw_readl(local_ixp4xx_timer->base + IXP4XX_OSTS_OFFSET);
+ return ixp4xx_read_timer();
}
static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id)
@@ -224,6 +229,13 @@ static __init int ixp4xx_timer_register(void __iomem *base,
sched_clock_register(ixp4xx_read_sched_clock, 32, timer_freq);
+#ifdef CONFIG_ARM
+ /* Also use this timer for delays */
+ tmr->delay_timer.read_current_timer = ixp4xx_read_timer;
+ tmr->delay_timer.freq = timer_freq;
+ register_current_timer_delay(&tmr->delay_timer);
+#endif
+
return 0;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
2019-05-23 18:16 ` Linus Walleij
@ 2019-05-23 19:21 ` Daniel Lezcano
-1 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2019-05-23 19:21 UTC (permalink / raw)
To: Linus Walleij, linux-kernel, Thomas Gleixner; +Cc: linux-arm-kernel
Hi Linus,
On 23/05/2019 20:16, Linus Walleij wrote:
> This adds delay timer functionality to the IXP4xx
> timer driver.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
The patch does not apply on tip/timers/core
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
@ 2019-05-23 19:21 ` Daniel Lezcano
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2019-05-23 19:21 UTC (permalink / raw)
To: Linus Walleij, linux-kernel, Thomas Gleixner; +Cc: linux-arm-kernel
Hi Linus,
On 23/05/2019 20:16, Linus Walleij wrote:
> This adds delay timer functionality to the IXP4xx
> timer driver.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
The patch does not apply on tip/timers/core
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
2019-05-23 19:21 ` Daniel Lezcano
@ 2019-05-23 19:34 ` Linus Walleij
-1 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-05-23 19:34 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: linux-kernel, Thomas Gleixner, Linux ARM
On Thu, May 23, 2019 at 9:21 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On 23/05/2019 20:16, Linus Walleij wrote:
> > This adds delay timer functionality to the IXP4xx
> > timer driver.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> The patch does not apply on tip/timers/core
This seems to be because tip/timers/core is not yet containing
the commits from v5.2-rc1.
Maybe I just send my patches too early after the merge window :)
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
@ 2019-05-23 19:34 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2019-05-23 19:34 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: Thomas Gleixner, linux-kernel, Linux ARM
On Thu, May 23, 2019 at 9:21 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
> On 23/05/2019 20:16, Linus Walleij wrote:
> > This adds delay timer functionality to the IXP4xx
> > timer driver.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> The patch does not apply on tip/timers/core
This seems to be because tip/timers/core is not yet containing
the commits from v5.2-rc1.
Maybe I just send my patches too early after the merge window :)
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
2019-05-23 19:34 ` Linus Walleij
@ 2019-05-23 19:38 ` Daniel Lezcano
-1 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2019-05-23 19:38 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-kernel, Thomas Gleixner, Linux ARM
On 23/05/2019 21:34, Linus Walleij wrote:
> On Thu, May 23, 2019 at 9:21 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On 23/05/2019 20:16, Linus Walleij wrote:
>
>>> This adds delay timer functionality to the IXP4xx
>>> timer driver.
>>>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> The patch does not apply on tip/timers/core
>
> This seems to be because tip/timers/core is not yet containing
> the commits from v5.2-rc1.
>
> Maybe I just send my patches too early after the merge window :)
Ok, I see thanks!
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer
@ 2019-05-23 19:38 ` Daniel Lezcano
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Lezcano @ 2019-05-23 19:38 UTC (permalink / raw)
To: Linus Walleij; +Cc: Thomas Gleixner, linux-kernel, Linux ARM
On 23/05/2019 21:34, Linus Walleij wrote:
> On Thu, May 23, 2019 at 9:21 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>> On 23/05/2019 20:16, Linus Walleij wrote:
>
>>> This adds delay timer functionality to the IXP4xx
>>> timer driver.
>>>
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> The patch does not apply on tip/timers/core
>
> This seems to be because tip/timers/core is not yet containing
> the commits from v5.2-rc1.
>
> Maybe I just send my patches too early after the merge window :)
Ok, I see thanks!
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-05-23 19:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 18:16 [PATCH] clocksource/drivers/ixp4xx: Implement delay timer Linus Walleij
2019-05-23 18:16 ` Linus Walleij
2019-05-23 19:21 ` Daniel Lezcano
2019-05-23 19:21 ` Daniel Lezcano
2019-05-23 19:34 ` Linus Walleij
2019-05-23 19:34 ` Linus Walleij
2019-05-23 19:38 ` Daniel Lezcano
2019-05-23 19:38 ` Daniel Lezcano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.