<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/rtc.h, branch v3.0.50</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0.50</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.0.50'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-10-03T18:40:08Z</updated>
<entry>
<title>rtc: Fix RTC PIE frequency limit</title>
<updated>2011-10-03T18:40:08Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</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=1ed2053563d4d0bf70864a9df53c7a5dce7724e9'/>
<id>urn:sha1:1ed2053563d4d0bf70864a9df53c7a5dce7724e9</id>
<content type='text'>
commit 938f97bcf1bdd1b681d5d14d1d7117a2e22d4434 upstream.

Thomas earlier submitted a fix to limit the RTC PIE freq, but
picked 5000Hz out of the air. Willy noticed that we should
instead use the 8192Hz max from the rtc man documentation.

Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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>
<entry>
<title>RTC: Propagate error handling via rtc_timer_enqueue properly</title>
<updated>2011-01-21T16:38:19Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-01-20T23:26:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aa0be0f4659f91f31e45adc422b1788cb36ffddc'/>
<id>urn:sha1:aa0be0f4659f91f31e45adc422b1788cb36ffddc</id>
<content type='text'>
In cases where RTC hardware does not support alarms, the virtualized
RTC interfaces did not have a way to propagate the error up to userland.

This patch extends rtc_timer_enqueue so it catches errors from the hardware
and returns them upwards to the virtualized interfaces. To simplify error
handling, it also internalizes the management of the timer-&gt;enabled bit
into rtc_timer_enqueue and rtc_timer_remove.

Also makes rtc_timer_enqueue and rtc_timer_remove static.

Reported-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Reported-by: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Diagnosed-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Tested-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
LKML-Reference: &lt;1295565973-14358-1-git-send-email-john.stultz@linaro.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
