Support the timer on RK3368 SoC
Subsystems (4)
v2 cover Support the timer on RK3368 SoC
Timer0~11 count up from zero to a programmed value and generate an interrupt when the count reaches the programmed value.
TIMER0, TIMER1, TIMER2, Timer3, TIMER4 and TIMER5 are in the CPU subsystem, using timer ch0 ~ ch5 respectively. The timer clock is 24MHz OSC.
This series are found on RK3368 SoC, verified on rk3368 evb board.
Changes in v2:
- As Heiko/Daniel comments, let's split it into two patch.
Changes in v1:
- As Russell, Thomas, Daniel comments, let's replace NO_IRQ by '!irq'.
- As the Heiko comments, add the "rockchip,rk3368-timer" for timer. Although the 'rockchip,rk3288-timer' is working for RK3368, need to add the 'rockchip,rk3368-timer' for the rk3368-spec timer in the future.
Caesar Wang (4):
clocksource: rockchip: Make the driver more compatible
clocksource: rockchip: trivial: Make the driver more readability
arm64: Enable the timer on Rockchip architecture
arm64: dts: rockchip: Add the needed timer for RK3368 SoC
arch/arm64/Kconfig.platforms | 1 + arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++++++ drivers/clocksource/rockchip_timer.c | 27 ++++++++++++++------------- 3 files changed, 21 insertions(+), 13 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/4 clocksource: rockchip: Make the driver more compatible
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 -- dsb
...
The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy) are the same.
---
Changes in v2:
- As Heiko/Daniel comments, let's split it into two patch.
Changes in v1:
- As Russell, Thomas, Daniel comments, let's replace NO_IRQ by '!irq'.
drivers/clocksource/rockchip_timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/clocksource/rockchip_timer.c +4 -4
@@ -49,14 +49,14 @@ static inline void __iomem *rk_base(struct clock_event_device *ce)static inline void rk_timer_disable (struct clock_event_device *ce) {writel_relaxed (TIMER_DISABLE ,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); }static inline void rk_timer_enable (struct clock_event_device *ce,u32 flags) {writel_relaxed (TIMER_ENABLE |TIMER_INT_UNMASK | flags,rk_base (ce) +TIMER_CONTROL_REG ); -dsb (); +dsb (sy); } static void rk_timer_update_counter(unsigned long cycles,
@@ -64,13 +64,13 @@ static void rk_timer_update_counter(unsigned long cycles, {writel_relaxed (cycles,rk_base (ce) +TIMER_LOAD_COUNT0 );writel_relaxed (0 ,rk_base (ce) +TIMER_LOAD_COUNT1 ); -dsb (); +dsb (sy); }static void rk_timer_interrupt_clear (struct clock_event_device *ce) {writel_relaxed (1 ,rk_base (ce) +TIMER_INT_STATUS ); -dsb (); +dsb (sy); } static inline int rk_timer_set_next_event(unsigned long cycles,
Signature · 1 line
1.9.1
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Quoted 8 lines · Caesar Wang
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...
Quoted 6 lines
The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy) are the same.
Signed-off-by Caesar Wang <[email protected]>
Signature · 5 lines
<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
Heiko Stübner
maintainerRe: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 9 lines · Caesar Wang
Quoted 8 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...
Quoted 8 lines
Quoted 6 lines
The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy) are the same.
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>
as you have "just" Acked these patches, I guess you are expecting them to go through the same tree as the devicetree changes, right?
Thanks
Heiko
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 17 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 14 lines · Caesar Wang
Quoted 13 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy) are the same.
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them to go through the same tree as the devicetree changes, right?
I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Quoted 8 lines
Thanks
Heiko_______________________________________________
Linux-rockchip mailing list
Linux-rockchip at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Signature · 2 lines
Thanks, Caesar
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Quoted 22 lines · Caesar Wang
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 19 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 16 lines · Caesar Wang
Quoted 15 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them to go
through the same tree as the devicetree changes, right?I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
I suggest before sending patches you read carefully the file Documentation/SubmittingPatches.
Especially, 11), 12) and 13).
Thanks.
-- Daniel
Signature · 5 lines
<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
Heiko Stuebner
maintainerRe: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 29 lines · Caesar Wang
Quoted 28 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 24 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 10 lines · Caesar Wang
Quoted 9 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...Quoted 8 lines
Quoted 7 lines
The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them to go
through the same tree as the devicetree changes, right?
Quoted 5 lines
Quoted 2 lines
I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
although I guess the two clocksource changes could very well just go through your tree. dsb() -> dsb(sy) is supposed to be equal and the second one is just cosmetics. The Kconfig and dts changes need to wait in any case for 4.5 ... but I guess that may be true for the clocksource changes as well?
Heiko
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Quoted 35 lines · Heiko Stuebner
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 32 lines · Caesar Wang
Quoted 30 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 19 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 16 lines · Caesar Wang
Quoted 15 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them to go
through the same tree as the devicetree changes, right?I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Quoted 7 lines
Quoted 2 lines
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
although I guess the two clocksource changes could very well just go through your tree.
dsb()-> dsb(sy) is supposed to be equal and the second one is just cosmetics. TheKconfigand dts changes need to wait in any case for 4.5 ... but I guess that may be true for the clocksource changes as well?
Ok, I will take the two first patches through my tree.
Thanks
-- Daniel
Signature · 5 lines
<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
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
In reply to Heiko StuebnerQuoted 35 lines · Heiko Stuebner
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 32 lines · Caesar Wang
Quoted 30 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 19 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 16 lines · Caesar Wang
Quoted 15 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Quoted 5 lines
Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them to go
through the same tree as the devicetree changes, right?I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Quoted 7 lines
Quoted 2 lines
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
although I guess the two clocksource changes could very well just go through your tree.
dsb()-> dsb(sy) is supposed to be equal and the second one is just cosmetics. TheKconfigand dts changes need to wait in any case for 4.5 ... but I guess that may be true for the clocksource changes as well?
Heiko, Caesar,
I am wondering if the dsb() is really necessary. Is it possible you test the timer by removing this instruction ? Otherwise I will have to setup my board again and it will take awhile.
Signature · 5 lines
<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
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Daniel,
? 2015?11?03? 01:28, Daniel Lezcano ??:
Quoted 49 lines · Heiko Stuebner
Quoted 40 lines
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 31 lines · Caesar Wang
Quoted 30 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 26 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 17 lines · Caesar Wang
Quoted 16 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param
is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them
to go
through the same tree as the devicetree changes, right?Quoted 5 lines
Quoted 2 lines
I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
Quoted 7 lines
although I guess the two clocksource changes could very well just go through your tree.
dsb()-> dsb(sy) is supposed to be equal and the second
one is just cosmetics. TheKconfigand dts changes need to wait in any case
for 4.5 ... but I guess that may be true for the clocksource changes as well?
Quoted 6 lines
Heiko, Caesar,
I am wondering if the
dsb()is really necessary. Is it possible you test the timer by removing this instruction ? Otherwise I will have to setup my board again and it will take awhile.
As the @Arnd suggestion,
That's seem ok for me.
Although the writel_relaxed() and writel() a bit different with DSB() and L2's sync.
Do I need send the patch v3? I will test that on my board.
I'm no sure that why the clocksource driver didn't use the writel_relaxed() to work.
Okay, I think we should according to the suggestion or required.
Signature · 2 lines
Thanks, Caesar
Re: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
Quoted 65 lines · Caesar Wang
Daniel,
? 2015?11?03? 01:28, Daniel Lezcano ??:
Quoted 49 lines · Heiko Stuebner
Quoted 40 lines
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 31 lines · Caesar Wang
Quoted 30 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 26 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 17 lines · Caesar Wang
Quoted 16 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand 1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64, Here we can convert the dsb with insteading of dsb(sy).The "sy" param
is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them
to go
through the same tree as the devicetree changes, right?Quoted 5 lines
Quoted 2 lines
I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
Quoted 7 lines
although I guess the two clocksource changes could very well just go through your tree.
dsb()-> dsb(sy) is supposed to be equal and the second
one is just cosmetics. TheKconfigand dts changes need to wait in any case
for 4.5 ... but I guess that may be true for the clocksource changes as well?Quoted 6 lines
Heiko, Caesar,
I am wondering if the
dsb()is really necessary. Is it possible you test the timer by removing this instruction ? Otherwise I will have to setup my board again and it will take awhile.As the @Arnd suggestion,
That's seem ok for me.
Although thewritel_relaxed()andwritel()a bit different withDSB()and L2's sync.
Quoted 5 lines
Do I need send the patch v3? I will test that on my board.
I'm no sure that why the clocksource driver didn't use the
writel_relaxed()to work.
Okay, I think we should according to the suggestion or required.
I think the patch is trivial enough I can do the change myself if you test the change on your side. But it would be a good practice to send the patch you have tested. Up to you ;)
Thanks !
-- Daniel
Signature · 5 lines
<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
Caesar Wang
Tested-byRe: [PATCH v2 1/4] clocksource: rockchip: Make the driver more compatible
? 2015?11?03? 16:32, Daniel Lezcano ??:
Quoted 71 lines · Caesar Wang
Quoted 70 lines
Daniel,
? 2015?11?03? 01:28, Daniel Lezcano ??:
Quoted 52 lines · Heiko Stuebner
Quoted 43 lines
Hi Daniel,
Am Freitag, 30. Oktober 2015, 11:42:29 schrieb Daniel Lezcano:
Quoted 34 lines · Caesar Wang
Quoted 33 lines
Hi Daniel,
? 2015?10?01? 03:14, Heiko St?bner ??:
Quoted 29 lines
Hi Daniel,
Am Dienstag, 29. September 2015, 06:18:03 schrieb Daniel Lezcano:
Quoted 20 lines · Caesar Wang
Quoted 19 lines
Build the arm64 SoCs (e.g.: RK3368) on Rockchip platform, There are some failure with build up on timer driver for rockchip.
Says:
/tmp/ccdAnNy5.s:47: Error: missing immediate expression at operand
1 --dsb
...The problem was different semantics of dsb on btw arm32 and arm64,
Here we can convert the dsb with insteading of dsb(sy).The "sy" param
is the default which you are allow to omit, so on arm32 dsb()and dsb(sy)
are the same.Quoted 2 lines
Quoted 1 line
Signed-off-by Caesar Wang <[email protected]>Acked-by Daniel Lezcano <[email protected]>as you have "just" Acked these patches, I guess you are expecting them
to go
through the same tree as the devicetree changes, right?Quoted 5 lines
Quoted 2 lines
I'm wonder if someone will apply this series patchs but the wait.:-) In fact, I'm no sure that the Acked is really meaning.:-
Yes, by acking the patch I say I am ok with it and I agree it can go through another tree.
Quoted 7 lines
although I guess the two clocksource changes could very well just go through your tree.
dsb()-> dsb(sy) is supposed to be equal and the second
one is just cosmetics. TheKconfigand dts changes need to wait in any case
for 4.5 ... but I guess that may be true for the clocksource changes as well?Quoted 6 lines
Heiko, Caesar,
I am wondering if the
dsb()is really necessary. Is it possible you test the timer by removing this instruction ? Otherwise I will have to setup my board again and it will take awhile.As the @Arnd suggestion,
That's seem ok for me.
Although thewritel_relaxed()andwritel()a bit different withDSB()and L2's sync.Do I need send the patch v3? I will test that on my board.
Quoted 8 lines
Quoted 3 lines
I'm no sure that why the clocksource driver didn't use the
writel_relaxed()to work.
Okay, I think we should according to the suggestion or required.I think the patch is trivial enough I can do the change myself if you test the change on your side. But it would be a good practice to send the patch you have tested. Up to you ;)
Yup, that's also happy work.
Feel free add my test tag if you remove the dsb().
Thanks your send!
Quoted 5 lines
Thanks !
-- Daniel
Signature · 2 lines
Thanks, Caesar
PATCH v2 2/4 clocksource: rockchip: trivial: Make the driver more readability
In reply to Caesar WangLet's checkstyle to clean up the macros with such trivial details.
---
Changes in v2: None
Changes in v1: None
drivers/clocksource/rockchip_timer.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/clocksource/rockchip_timer.c +10 -9
@@ -17,16 +17,16 @@#define TIMER_NAME "rk_timer" -#define TIMER_LOAD_COUNT0 0x00 -#define TIMER_LOAD_COUNT1 0x04 -#define TIMER_CONTROL_REG 0x10 -#define TIMER_INT_STATUS 0x18 +#define TIMER_LOAD_COUNT0 0x00 +#define TIMER_LOAD_COUNT1 0x04 +#define TIMER_CONTROL_REG 0x10 +#define TIMER_INT_STATUS 0x18 -#define TIMER_DISABLE 0x0 -#define TIMER_ENABLE 0x1 -#define TIMER_MODE_FREE_RUNNING (0 << 1) -#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1) -#define TIMER_INT_UNMASK (1 << 2) +#define TIMER_DISABLE 0x0 +#define TIMER_ENABLE 0x1 +#define TIMER_MODE_FREE_RUNNING (0 << 1) +#define TIMER_MODE_USER_DEFINED_COUNT (1 << 1) +#define TIMER_INT_UNMASK (1 << 2)struct bc_timer {struct clock_event_device ce;
@@ -173,4 +173,5 @@ static void __init rk_timer_init(struct device_node *np)clockevents_config_and_register (ce, bc_timer.freq,1 ,UINT_MAX ); } +CLOCKSOURCE_OF_DECLARE (rk_timer,"rockchip,rk3288-timer" , rk_timer_init);
Signature · 1 line
1.9.1
Re: [PATCH v2 2/4] clocksource: rockchip: trivial: Make the driver more readability
Quoted 4 lines · Caesar Wang
Let's checkstyle to clean up the macros with such trivial details.
Signed-off-by Caesar Wang <[email protected]>---
Signature · 5 lines
<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
PATCH v2 3/4 arm64: Enable the timer on Rockchip architecture
In reply to Caesar WangOn the RK3368 SoC, support the APB timers for rockchip platform.
---
Changes in v2: None
Changes in v1: None
arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
@@ -57,6 +57,7 @@ config ARCH_ROCKCHIP select ARCH_REQUIRE_GPIOLIB select PINCTRL select PINCTRL_ROCKCHIP + select ROCKCHIP_TIMER help This enables support for the ARMv8 based Rockchip chipsets, like the RK3368.
Signature · 1 line
1.9.1
Re: [PATCH v2 3/4] arm64: Enable the timer on Rockchip architecture
Am Freitag, 25. September 2015, 10:14:57 schrieb Caesar Wang:
Quoted 3 lines
On the RK3368 SoC, support the APB timers for rockchip platform.
Signed-off-by Caesar Wang <[email protected]>
applied to my soc64 branch for 4.6
Heiko
PATCH v2 4/4 arm64: dts: rockchip: Add the needed timer for RK3368 SoC
In reply to Caesar WangThere is a need of a broadcast timer in this case to ensure proper wakeup when the cpus are in sleep mode and a timer expires.
---
Changes in v2: None
Changes in v1:
- As the Heiko comments, add the "rockchip,rk3368-timer" for timer. Although the 'rockchip,rk3288-timer' is working for RK3368, need to add the 'rockchip,rk3368-timer' for the rk3368-spec timer in the future.
arch/arm64/boot/dts/rockchip/rk3368.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368.dtsi +6 -0
@@ -214,6 +214,12 @@ (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; }; + timer at ff810000 { + compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer"; + reg = <0x0 0xff810000 0x0 0x20>; + interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>; + }; + xin24m: oscillator { compatible = "fixed-clock"; clock-frequency = <24000000>;
Signature · 1 line
1.9.1
Re: [PATCH v2 4/4] arm64: dts: rockchip: Add the needed timer for RK3368 SoC
Am Freitag, 25. September 2015, 10:14:58 schrieb Caesar Wang:
Quoted 4 lines
There is a need of a broadcast timer in this case to ensure proper wakeup when the cpus are in sleep mode and a timer expires.
Signed-off-by Caesar Wang <[email protected]>
applied this patch to my dts64 branch for 4.5 .
The Kconfig option will probably need to wait for 4.6 though, due to the clocksource change going through Daniel's tree. Or I'll try to submit that post 4.5-rc1 as "fix" ... we'll see.
Heiko