14 Jun, 2017
1 commit
-
The CLOCKSOURCE_OF_DECLARE macro is used widely for the timers to declare the
clocksource at early stage. However, this macro is also used to initialize
the clockevent if any, or the clockevent only.It was originally suggested to declare another macro to initialize a
clockevent, so in order to separate the two entities even they belong to the
same IP. This was not accepted because of the impact on the DT where splitting
a clocksource/clockevent definition does not make sense as it is a Linux
concept not a hardware description.On the other side, the clocksource has not interrupt declared while the
clockevent has, so it is easy from the driver to know if the description is
for a clockevent or a clocksource, IOW it could be implemented at the driver
level.So instead of dealing with a named clocksource macro, let's use a more generic
one: TIMER_OF_DECLARE.The patch has not functional changes.
Signed-off-by: Daniel Lezcano
Acked-by: Heiko Stuebner
Acked-by: Neil Armstrong
Acked-by: Arnd Bergmann
Acked-by: Matthias Brugger
Reviewed-by: Linus Walleij
07 Apr, 2017
1 commit
-
Printing with pr_* functions requires adding line break manually.
Signed-off-by: Rafał Miłecki
Acked-by: Thierry Reding
Signed-off-by: Daniel Lezcano
25 Dec, 2016
1 commit
-
There is no point in having an extra type for extra confusion. u64 is
unambiguous.Conversion was done with the following coccinelle script:
@rem@
@@
-typedef u64 cycle_t;@fix@
typedef cycle_t;
@@
-cycle_t
+u64Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
Cc: John Stultz
28 Jun, 2016
3 commits
-
The driver includes the header but it is pointless.
Remove it.
Signed-off-by: Daniel Lezcano
-
All the clocksource drivers's init function are now converted to return
an error code. CLOCKSOURCE_OF_DECLARE is no longer used as well as the
clksrc-of table.Let's convert back the names:
- CLOCKSOURCE_OF_DECLARE_RET => CLOCKSOURCE_OF_DECLARE
- clksrc-of-ret => clksrc-ofSigned-off-by: Daniel Lezcano
For exynos_mct and samsung_pwm_timer:
Acked-by: Krzysztof KozlowskiFor arch/arc:
Acked-by: Vineet GuptaFor mediatek driver:
Acked-by: Matthias BruggerFor the Rockchip-part
Acked-by: Heiko StuebnerFor STi :
Acked-by: Patrice ChotardFor the mps2-timer.c and versatile.c changes:
Acked-by: Liviu DudauFor the OXNAS part :
Acked-by: Neil ArmstrongFor LPC32xx driver:
Acked-by: Sylvain LemieuxFor Broadcom Kona timer change:
Acked-by: Ray JuiFor Sun4i and Sun5i:
Acked-by: Chen-Yu TsaiFor Meson6:
Acked-by: Carlo CaioneFor Keystone:
Acked-by: Santosh ShilimkarFor NPS:
Acked-by: Noam CamusFor bcm2835:
Acked-by: Eric Anholt -
The init functions do not return any error. They behave as the following:
- panic, thus leading to a kernel crash while another timer may work and
make the system boot up correctlyor
- print an error and let the caller unaware if the state of the system
Change that by converting the init functions to return an error conforming
to the CLOCKSOURCE_OF_RET prototype.Proper error handling (rollback, errno value) will be changed later case
by case, thus this change just return back an error or success in the init
function.Signed-off-by: Daniel Lezcano
27 Oct, 2015
1 commit
-
Currently prima2 timer can be used as a scheduler clock. We properly
marked sirfsoc_read_sched_clock() as notrace but we then call another
function sirfsoc_timer_read() that _wasn't_ notrace.Having a traceable function in the sched_clock() path leads to a recursion
within ftrace and a kernel crash.Fix this by adding notrace attribute to the sirfsoc_timer_read() function.
Signed-off-by: Jisheng Zhang
Signed-off-by: Daniel Lezcano
10 Aug, 2015
1 commit
-
Migrate prima2 driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.Cc: Barry Song
Signed-off-by: Viresh Kumar
Signed-off-by: Daniel Lezcano
23 Jul, 2014
1 commit
-
In the clocksource driver, we didn't explicitly enable the clock. it makes the
clk reference counter wrong. We didn't encounter any hang issue because the
tick's clock input has been open and is shared by some other hardware
components, but if we don't enable those components in kernel, in the stage of
disabling unused clk in kernel boot, Linux tick hangs.This patch fixes it. it does an explicit prepare and enable to the clock input,
and increases the usage counter of the clk.Signed-off-by: Zhiwu Song
Signed-off-by: Barry Song
Signed-off-by: Daniel Lezcano
12 May, 2014
2 commits
-
Nobody want to know the connection between io clk and timer clk,
so exposing this information to timer module is not reasonable.
this patch moves to define the timers' clk in dt.Signed-off-by: Zhiwu Song
Signed-off-by: Barry Song -
Fix the "line over 80 characters". users of the codes - key customers
really care about that.WARNING: line over 80 characters
64: FILE: timer-prima2.c:64:
+ WARN_ON(!(readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_STATUS) & BIT(0)));WARNING: line over 80 characters
80: FILE: timer-prima2.c:80:
+ writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);WARNING: line over 80 characters
82: FILE: timer-prima2.c:82:
+ cycles = (cycles << 32) | readl_relaxed(sirfsoc_timer_base + SIRFSOC_TIMER_LATCHED_LO);WARNING: line over 80 characters
92: FILE: timer-prima2.c:92:
+ writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);WARNING: line over 80 characters
96: FILE: timer-prima2.c:96:
+ writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);WARNING: line over 80 characters
111: FILE: timer-prima2.c:111:
+ writel_relaxed(val | BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);WARNING: line over 80 characters
114: FILE: timer-prima2.c:114:
+ writel_relaxed(val & ~BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_INT_EN);WARNING: line over 80 characters
126: FILE: timer-prima2.c:126:
+ writel_relaxed(SIRFSOC_TIMER_LATCH_BIT, sirfsoc_timer_base + SIRFSOC_TIMER_LATCH);WARNING: line over 80 characters
129: FILE: timer-prima2.c:129:
+ sirfsoc_timer_reg_val[i] = readl_relaxed(sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);WARNING: line over 80 characters
137: FILE: timer-prima2.c:137:
+ writel_relaxed(sirfsoc_timer_reg_val[i], sirfsoc_timer_base + sirfsoc_timer_reg_list[i]);WARNING: line over 80 characters
139: FILE: timer-prima2.c:139:
+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 2], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);WARNING: line over 80 characters
140: FILE: timer-prima2.c:140:
+ writel_relaxed(sirfsoc_timer_reg_val[SIRFSOC_TIMER_REG_CNT - 1], sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);WARNING: line over 80 characters
216: FILE: timer-prima2.c:216:
+CLOCKSOURCE_OF_DECLARE(sirfsoc_prima2_timer, "sirf,prima2-tick", sirfsoc_prima2_timer_init);total: 0 errors, 13 warnings, 216 lines checked
timer-prima2.c has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.Signed-off-by: Bin Shi
Signed-off-by: Barry Song
20 Dec, 2013
1 commit
-
Since CSR SiRF was converted to multi platform in cf82e0e (ARM: sirf:
enable multiplatform support) the symbol CLOCK_TICK_RATE isn't the
platform specific definition any more, but a global dummy value. There
was no harm introduced in cf82e0e because the global value happens to
match the old platform specific one, still this dummy value isn't
intended to be used and will hopefully disappear soon, so introduce a
local #define and use that instead.Acked-by: Daniel Lezcano
Signed-off-by: Uwe Kleine-König
31 Jul, 2013
1 commit
-
The 32 bit sched_clock interface now supports 64 bits. Upgrade to
the 64 bit function to allow us to remove the 32 bit registration
interface and use all 64 bits of this timer.Cc: Barry Song
Signed-off-by: Stephen Boyd
Signed-off-by: John Stultz
13 Jun, 2013
1 commit
-
Nothing about the sched_clock implementation in the ARM port is
specific to the architecture. Generalize the code so that other
architectures can use it by selecting GENERIC_SCHED_CLOCK.Signed-off-by: Stephen Boyd
[jstultz: Merge minor collisions with other patches in my tree]
Signed-off-by: John Stultz
25 Mar, 2013
1 commit
-
This moves the two sirf clocksource drivers to drivers/clocksource
and integrates them into the framework for locating the clock sources
automatically.Signed-off-by: Arnd Bergmann
Tested-by: Barry Song
Cc: John Stultz
Cc: Thomas Gleixner