<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/clocksource/rockchip_timer.c, branch v4.14.92</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.92</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.14.92'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-06-14T09:58:45Z</updated>
<entry>
<title>clocksource/drivers: Rename CLOCKSOURCE_OF_DECLARE to TIMER_OF_DECLARE</title>
<updated>2017-06-14T09:58:45Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2017-05-26T14:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1727339590fdb5a1ded881b540cd32121278d414'/>
<id>urn:sha1:1727339590fdb5a1ded881b540cd32121278d414</id>
<content type='text'>
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 &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip_timer: Implement clocksource timer</title>
<updated>2017-04-07T14:23:05Z</updated>
<author>
<name>Alexander Kochetkov</name>
<email>al.kochet@gmail.com</email>
</author>
<published>2017-01-31T12:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e0a39d0f727b35c8b7ef56ba0724c8ceb006297'/>
<id>urn:sha1:5e0a39d0f727b35c8b7ef56ba0724c8ceb006297</id>
<content type='text'>
The clock supplying the arm-global-timer on the rk3188 is coming from the
the cpu clock itself and thus changes its rate everytime cpufreq adjusts
the cpu frequency making this timer unsuitable as a stable clocksource
and sched clock.

The rk3188, rk3288 and following socs share a separate timer block already
handled by the rockchip-timer driver. Therefore adapt this driver to also
be able to act as clocksource and sched clock on rk3188.

In order to test clocksource you can run following commands and check
how much time it take in real. On rk3188 it take about ~45 seconds.

    cpufreq-set -f 1.6GHZ
    date; sleep 60; date

In order to use the patch you need to declare two timers in the dts
file. The first timer will be initialized as clockevent provider
and the second one as clocksource. The clockevent must be from
alive subsystem as it used as backup for the local timers at sleep
time.

The patch does not break compatibility with older device tree files.
The older device tree files contain only one timer. The timer
will be initialized as clockevent, as expected.

rk3288 (and probably anything newer) is irrelevant to this patch,
as it has the arch timer interface. This patch may be useful
for Cortex-A9/A5 based parts.

Signed-off-by: Alexander Kochetkov &lt;al.kochet@gmail.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksources: Switch back to the clksrc table</title>
<updated>2016-06-28T08:19:35Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2016-06-06T22:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=177cf6e52b0a1a382b9892d3cc9aafd6e7c5943f'/>
<id>urn:sha1:177cf6e52b0a1a382b9892d3cc9aafd6e7c5943f</id>
<content type='text'>
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 =&gt; CLOCKSOURCE_OF_DECLARE
 - clksrc-of-ret              =&gt; clksrc-of

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;

For exynos_mct and samsung_pwm_timer:
Acked-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;

For arch/arc:
Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;

For mediatek driver:
Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;

For the Rockchip-part
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt;

For STi :
Acked-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;

For the mps2-timer.c and versatile.c changes:
Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;

For the OXNAS part :
Acked-by: Neil Armstrong &lt;narmstrong@baylibre.com&gt;

For LPC32xx driver:
Acked-by: Sylvain Lemieux &lt;slemieux.tyco@gmail.com&gt;

For Broadcom Kona timer change:
Acked-by: Ray Jui &lt;ray.jui@broadcom.com&gt;

For Sun4i and Sun5i:
Acked-by: Chen-Yu Tsai &lt;wens@csie.org&gt;

For Meson6:
Acked-by: Carlo Caione &lt;carlo@caione.org&gt;

For Keystone:
Acked-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;

For NPS:
Acked-by: Noam Camus &lt;noamca@mellanox.com&gt;

For bcm2835:
Acked-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip_timer: Convert init function to return error</title>
<updated>2016-06-28T08:19:17Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2016-05-31T15:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8bdd5a2e7c479dcdb632c614b0d9bb1ac6ed5be7'/>
<id>urn:sha1:8bdd5a2e7c479dcdb632c614b0d9bb1ac6ed5be7</id>
<content type='text'>
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 correctly

 or

 - 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 &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt;

on a rk3399-evb
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Add support for the rk3399 SoC</title>
<updated>2016-06-28T08:17:08Z</updated>
<author>
<name>Huang, Tao</name>
<email>huangtao@rock-chips.com</email>
</author>
<published>2016-06-16T14:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=be6af450bb1b74177f14afc6228458f16f92a6c5'/>
<id>urn:sha1:be6af450bb1b74177f14afc6228458f16f92a6c5</id>
<content type='text'>
The only difference between the rk3399 SoC and the other ones is the control
register offset which is different.

Add a new field to store the control register address depending on the SoC
and use it instead of the &lt;base&gt; + &lt;control offset&gt;.

Signed-off-by: Huang Tao &lt;huangtao@rock-chips.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Tested-by: Jianqun Xu &lt;jay.xu@rock-chips.com&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Add the dynamic irq flag to the timer</title>
<updated>2016-06-28T08:17:07Z</updated>
<author>
<name>Huang, Tao</name>
<email>huangtao@rock-chips.com</email>
</author>
<published>2016-06-16T13:57:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=716897d90f2bb1b732c45ddcc1f2f4651a06a9f6'/>
<id>urn:sha1:716897d90f2bb1b732c45ddcc1f2f4651a06a9f6</id>
<content type='text'>
The rockchip timer is a broadcast timer. Add the CLOCK_EVT_FEAT_DYNIRQ flag
and set the cpumask to all possible cpus to save power by avoiding
unnecessary wakeups and IPIs.

Signed-off-by: Huang Tao &lt;huangtao@rock-chips.com&gt;
Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Tested-by: Jianqun Xu &lt;jay.xu@rock-chips.com&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Add err handle for rk_timer_init</title>
<updated>2016-02-25T13:30:17Z</updated>
<author>
<name>Shawn Lin</name>
<email>shawn.lin@rock-chips.com</email>
</author>
<published>2016-02-15T01:02:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=522ed95c26cd03b768018e441bbc0ff656e30fe4'/>
<id>urn:sha1:522ed95c26cd03b768018e441bbc0ff656e30fe4</id>
<content type='text'>
Currently rockchip_timer doesn't do some basic cleanup work when
failing to init the timer. Let's add err handle routine to deal
with all the err cases.

Signed-off-by: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Remove dsb() usage</title>
<updated>2015-12-15T08:41:11Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2015-09-25T02:14:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=23b8f81f3890edd06bcabdaac33ff5c087114c59'/>
<id>urn:sha1:23b8f81f3890edd06bcabdaac33ff5c087114c59</id>
<content type='text'>
The dsb() instruction is pointless in this code.

Remove it.

That also fixes the ARM64 compilation issue.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Tested-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Make the driver more readable</title>
<updated>2015-12-15T08:41:07Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2015-09-25T02:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a0d2216ec0d04ec6bf2a7282774338d5ffb3ff0b'/>
<id>urn:sha1:a0d2216ec0d04ec6bf2a7282774338d5ffb3ff0b</id>
<content type='text'>
Let's checkstyle to clean up the macros with such trivial details.

Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource/drivers/rockchip: Fix bad NO_IRQ usage</title>
<updated>2015-09-29T12:33:34Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2015-09-20T14:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ccc42592d436d021d17f86729d24806f30dbad25'/>
<id>urn:sha1:ccc42592d436d021d17f86729d24806f30dbad25</id>
<content type='text'>
The current code assumes the 'irq_of_parse_and_map' will return NO_IRQ in case
of failure. Unfortunately, the NO_IRQ is not consistent across the different
architectures and we must not rely on it.

NO_IRQ is equal to '-1' on ARM and 'irq_of_parse_and_map' returns '0' in case
of an error. Hence, the latter won't be detected and will lead to a crash.

Fix this by just checking 'irq' is different from zero.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
