<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/rtc.h, branch v3.4.40</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.40</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.40'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-03-16T01:23:10Z</updated>
<entry>
<title>rtc: Provide flag for rtc devices that don't support UIE</title>
<updated>2012-03-16T01:23:10Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2012-03-07T01:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a649903f91232d02284d53724b0a45728111767'/>
<id>urn:sha1:4a649903f91232d02284d53724b0a45728111767</id>
<content type='text'>
Richard Weinberger noticed that on some RTC hardware that
doesn't support UIE mode, due to coarse granular alarms
(like 1minute resolution), the current virtualized RTC
support doesn't properly error out when UIE is enabled.

Instead the current code queues an alarm for the next second,
but it won't fire until up to a miniute later.

This patch provides a generic way to flag this sort of hardware
and fixes the issue on the mpc5121 where Richard noticed the
problem.

CC: stable@vger.kernel.org
Reported-by: Richard Weinberger &lt;richard@nod.at&gt;
Tested-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>rtc: Limit RTC PIE frequency</title>
<updated>2011-07-26T21:50:01Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-07-22T09:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e7a333eaa522ef73be01caec7a01521490aaf00'/>
<id>urn:sha1:6e7a333eaa522ef73be01caec7a01521490aaf00</id>
<content type='text'>
The RTC pie hrtimer is self rearming. We really need to limit the
frequency to something sensible. Thus limit it to the 8192Hz max
value from the rtc man documentation

Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
[jstultz: slightly reworked to use RTC_MAX_FREQ value]
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>drivers/rtc/rtc-mxc.c: remove defines already included in rtc.h</title>
<updated>2011-05-27T00:12:33Z</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2011-05-26T23:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9796cc964daf7f18b4cd84c86975b3bc3804ca5a'/>
<id>urn:sha1:9796cc964daf7f18b4cd84c86975b3bc3804ca5a</id>
<content type='text'>
[akpm@linux-foundation.org: retain the code comments]
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: Vladimir Zapolskiy &lt;vzapolskiy@gmail.com&gt;
Cc: Alessandro Zummo &lt;alessandro.zummo@towertech.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>RTC: Fix early irqs caused by calling rtc_set_alarm too early</title>
<updated>2011-03-30T01:44:05Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-03-30T01:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f6d5b33125c4fa63c16f7f54c533338c9695d82c'/>
<id>urn:sha1:f6d5b33125c4fa63c16f7f54c533338c9695d82c</id>
<content type='text'>
When we register an rtc device at boot, we read the alarm value
in hardware and set the rtc device's aie_timer to that value.

The initial method to do this was to simply call rtc_set_alarm()
with the value read from hardware. However, this may cause problems
as rtc_set_alarm may enable interupts, and the RTC alarm might fire,
which can cause invalid pointer dereferencing since the RTC registration
is not complete.

This patch solves the issue by initializing the rtc_device.aie_timer
y hand via rtc_initialize_alarm(). This avoids any calls to the RTC
hardware which might enable interrupts too early.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
Reported-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Tested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Cleanup rtc_class_ops-&gt;update_irq_enable()</title>
<updated>2011-03-09T19:23:37Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-03T20:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=51ba60c5bb3b0f71bee26404ddc22d8e4109e88a'/>
<id>urn:sha1:51ba60c5bb3b0f71bee26404ddc22d8e4109e88a</id>
<content type='text'>
Now that the generic code handles UIE mode irqs via periodic
alarm interrupts, no one calls the
rtc_class_ops-&gt;update_irq_enable() method anymore.

This patch removes the driver hooks and implementations of
update_irq_enable if no one else is calling it.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
CC: rtc-linux@googlegroups.com
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Cleanup rtc_class_ops-&gt;irq_set_freq()</title>
<updated>2011-03-09T19:23:35Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-03T20:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=696160fec162601d06940862b5b3aa4460344c1b'/>
<id>urn:sha1:696160fec162601d06940862b5b3aa4460344c1b</id>
<content type='text'>
With the generic rtc code now emulating PIE mode irqs via an
hrtimer, no one calls the rtc_class_ops-&gt;irq_set_freq call.

This patch removes the hook and deletes the driver functions
if no one else calls them.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
CC: rtc-linux@googlegroups.com
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Cleanup rtc_class_ops-&gt;irq_set_state</title>
<updated>2011-03-09T19:23:34Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-03T19:34:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=80d4bb515b78f38738f3378fd1be6039063ab040'/>
<id>urn:sha1:80d4bb515b78f38738f3378fd1be6039063ab040</id>
<content type='text'>
With PIE mode interrupts now emulated in generic code via an hrtimer,
no one calls rtc_class_ops-&gt;irq_set_state(), so this patch removes it
along with driver implementations.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
CC: rtc-linux@googlegroups.com
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Initialize kernel state from RTC</title>
<updated>2011-03-09T19:22:50Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-22T06:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f44f7f96a20af16f6f12e1c995576d6becf5f57b'/>
<id>urn:sha1:f44f7f96a20af16f6f12e1c995576d6becf5f57b</id>
<content type='text'>
Mark Brown pointed out a corner case: that RTC alarms should
be allowed to be persistent across reboots if the hardware
supported it.

The rework of the generic layer to virtualize the RTC alarm
virtualized much of the alarm handling, and removed the
code used to read the alarm time from the hardware.

Mark noted if we want the alarm to be persistent across
reboots, we need to re-read the alarm value into the
virtualized generic layer at boot up, so that the generic
layer properly exposes that value.

This patch restores much of the earlier removed
rtc_read_alarm code and wires it in so that we
set the kernel's alarm value to what we find in the
hardware at boot time.

NOTE: Not all hardware supports persistent RTC alarm state across
system reset. rtc-cmos for example will keep the alarm time, but
disables the AIE mode irq. Applications should not expect the RTC
alarm to be valid after a system reset. We will preserve what
we can, to represent the hardware state at boot, but its not
guarenteed.

Further, in the future, with multiplexed RTC alarms, the
soonest alarm to fire may not be the one set via the /dev/rt
ioctls. So an application may set the alarm with RTC_ALM_SET,
but after a reset find that RTC_ALM_READ returns an earlier
time. Again, we preserve what we can, but applications should
not expect the RTC alarm state to persist across a system reset.

Big thanks to Mark for pointing out the issue!
Thanks also to Marcelo for helping think through the solution.

CC: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
CC: Marcelo Roberto Jimenez &lt;mroberto@cpti.cetuc.puc-rio.br&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Alessandro Zummo &lt;a.zummo@towertech.it&gt;
CC: rtc-linux@googlegroups.com
Reported-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Re-enable UIE timer/polling emulation</title>
<updated>2011-02-17T22:59:42Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-12T02:15:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=456d66ecd09e3bc326b93174745faafb6ac378d6'/>
<id>urn:sha1:456d66ecd09e3bc326b93174745faafb6ac378d6</id>
<content type='text'>
This patch re-enables UIE timer/polling emulation for rtc devices
that do not support alarm irqs.

CC: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Tested-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>RTC: Revert UIE emulation removal</title>
<updated>2011-02-17T22:59:41Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-02-12T01:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e57b1d6a8d8ed1998229b71c102be1997e397c6'/>
<id>urn:sha1:6e57b1d6a8d8ed1998229b71c102be1997e397c6</id>
<content type='text'>
Uwe pointed out that my alarm based UIE emulation is not sufficient
to replace the older timer/polling based UIE emulation on devices
where there is no alarm irq. This causes rtc devices without alarms
to return -EINVAL to UIE ioctls. The fix is to re-instate the old
timer/polling method for devices without alarm irqs.

This patch reverts the following commits:
042620a018afcfba1d678062b62e46 - Remove UIE emulation
1daeddd5962acad1bea55e524fc0fa - Cleanup removed UIE emulation declaration
b5cc8ca1c9c3a37eaddf709b2fd3e1 - Remove Kconfig symbol for UIE emulation

The emulation mode will still need to be wired-in with a following
patch before it will work.

CC: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reported-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
