<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/clocksource/sun4i_timer.c, branch v3.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-12-10T18:41:28Z</updated>
<entry>
<title>clocksource: sunxi: Stop timer from ticking before enabling interrupts</title>
<updated>2013-12-10T18:41:28Z</updated>
<author>
<name>Marc Zyngier</name>
<email>marc.zyngier@arm.com</email>
</author>
<published>2013-12-02T09:29:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6db50bb67598668c525f12e2f7191f5d03ca46f2'/>
<id>urn:sha1:6db50bb67598668c525f12e2f7191f5d03ca46f2</id>
<content type='text'>
The sun4i timer can still be ticking when we enable the interrupt.
If another timer is actually used (A7 architected timer, for example),
odds are that the interrupt will eventually fire with the event_handler
pointer being NULL.

The obvious fix it to stop the timer before registering the interrupt.

Observed and tested on sun7i (cubietruck).

Cc: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Marc Zyngier &lt;marc.zyngier@arm.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: remove IRQF_DISABLED</title>
<updated>2013-10-22T20:36:50Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-10-14T19:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3353652ce0eb22854b1748b8320c2b81912953a1'/>
<id>urn:sha1:3353652ce0eb22854b1748b8320c2b81912953a1</id>
<content type='text'>
IRQF_DISABLED is a no-op nowadays, so we can safely remove it.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Report the minimum tick that we can program</title>
<updated>2013-10-22T20:36:43Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-10-14T19:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12e1480bcb4920c1b02b3793cb48756497919a60'/>
<id>urn:sha1:12e1480bcb4920c1b02b3793cb48756497919a60</id>
<content type='text'>
We need to wait for at least 2 clock cycles whenever we reprogram our
clockevent timer. Report that the minimum number of ticks we can handle
is 3 ticks, and remove 3 ticks to the interval programmed to reflect
this.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Fix bug when switching from periodic to oneshot modes</title>
<updated>2013-07-18T13:27:21Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e14183469d8aa2c7aa7675a6156e7846dda7748'/>
<id>urn:sha1:7e14183469d8aa2c7aa7675a6156e7846dda7748</id>
<content type='text'>
The interval was firing at was set up at probe time, and only changed in
the set_next_event, and never changed back, which is not really what is
expected.

When enabling the periodic mode, now set an interval to tick every
jiffy.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Cleanup parent clock setup</title>
<updated>2013-07-18T13:27:20Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a2c49e7b553a28f10ab34e5da538ed4a45a697a7'/>
<id>urn:sha1:a2c49e7b553a28f10ab34e5da538ed4a45a697a7</id>
<content type='text'>
The current bring-up code for the timer was overly complicated. The only
thing we need is actually which clock we want to use as source and
that's pretty much all. Let's keep it that way.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Remove TIMER_SCAL variable</title>
<updated>2013-07-18T13:27:19Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c2b852f77b0d4c71967b61848d666c7a25e17627'/>
<id>urn:sha1:c2b852f77b0d4c71967b61848d666c7a25e17627</id>
<content type='text'>
The prescaler is only used when using the internal low frequency
oscillator (at 32kHz). Since we're using the higher frequency oscillator
at 24MHz, we can just remove it.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Factor out some timer code</title>
<updated>2013-07-18T13:27:18Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96651a0732d148f7e4a59cec6aa174049866cd0e'/>
<id>urn:sha1:96651a0732d148f7e4a59cec6aa174049866cd0e</id>
<content type='text'>
The set_next_event and set_mode callbacks share a lot of common code we
can easily factor to avoid duplication and mistakes.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Fix the next event code</title>
<updated>2013-07-18T13:27:17Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63d88f1ac71173e47c40ea116e4489f71c6ed9c7'/>
<id>urn:sha1:63d88f1ac71173e47c40ea116e4489f71c6ed9c7</id>
<content type='text'>
The next_event logic was setting the next interval to fire in the
current timer value instead of the interval value register, which is
obviously wrong.

Plus, the logic to set the actual value was wrong as well: the interval
register can only be modified when the timer is disabled, and then
enable it back, otherwise, it'll have no effect. Fix this logic as well
since that code couldn't possibly work.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Don't forget to enable the clock we use</title>
<updated>2013-07-18T13:27:16Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c31bec28b69a86aa83f072e6e00225380853a9e'/>
<id>urn:sha1:8c31bec28b69a86aa83f072e6e00225380853a9e</id>
<content type='text'>
Even if in our case, this clock was non-gatable, used as a parent clock
for several IPs, it still is a good idea to enable it.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
<entry>
<title>clocksource: sun4i: Add clocksource and sched clock drivers</title>
<updated>2013-07-18T13:27:15Z</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime.ripard@free-electrons.com</email>
</author>
<published>2013-07-16T14:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=137c6b3c7c63944a9cb51de0870b72f62d240f62'/>
<id>urn:sha1:137c6b3c7c63944a9cb51de0870b72f62d240f62</id>
<content type='text'>
Use the second timer found on the Allwinner SoCs as a clock source and
sched clock, that were both not used yet on these platforms.

Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
