Add support for the Epson RX-8025SA/NB RTC chips. It includes support for
alarms, periodic interrupts (1 Hz) and clock precision adjustment.
For clock precision adjustment, the SYSFS file "clock_adjust_ppb" gets
created in "/sys/class/rtc/rtcX/device". It permits to set and get the
clock adjustment in ppb (parts per billion), e.g.:
# echo -183000 > /sys/class/rtc/rtc0/device/clock_adjust_ppb
# cat /sys/class/rtc/rtc0/device/clock_adjust_ppb
-183000
This allows to compensate temperature dependent clock drifts. According
to the RX8025 SA/NB application manual the frequency and temperature
characteristics can be approximated using the following equation:
df = a * (ut - t)**2
df: Frequency deviation in any temperature
a : Coefficient = (-35 +-5) * 10**-9
ut: Ultimate temperature in degree = +25 +-5 degree
t : Any temperature in degree
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Dmitry Rakhchev <rda@emcraft.com>
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This adds clock framework support to the rtc-sh driver. With this in
place, platforms can default to leaving the clock disabled rather than
placing it in the always enabled state.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Compared to the other supported chips, the m41t62 uses a different
register to set the square wave frequency.
Signed-off-by: Daniel Glockner <dg@emlix.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
PowerPC has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
- Create the "rtc-generic" platform device if ppc_md.get_rtc_time is set,
- Kill rtc-ppc, as rtc-generic offers the same functionality in a more
generic way, and supports autoloading through udev.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
m68k has been a long time user of the generic RTC abstraction, so hook up
rtc-generic:
- Create the "rtc-generic" platform device if mach_hwclk is set,
- Add checks for mach_hwclk, in anticipation of RTC chip drivers being moved
to drivers/rtc/.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
The rtc-parisc driver is not PA-RISC specific at all, as it uses the existing
(but deprecated) generic RTC infrastructure ([gs]et_rtc_time()).
Rename the driver from rtc-parisc to rtc-generic.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Add support for the EPSON RX8025 RTC. The date/time registers of this
chip are compatible with the DS1307.
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Simple RTC driver for the MSP430 firmware on the DM355 EVM board. Other
than not supporting atomic reads/writes of all four bytes, this is
reasonable as a basic no-alarm RTC.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Driver for the on-chip RTC found in some of Marvell's SoCs such as the
Kirkwood 88F6281 and 88F6192 devices.
Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove double spaces and adds some suggestions. It also fixes the
descriptions of options that are no more available as modules.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Small fixes for the ds1390 driver
- fixed initialization of the spi device
- added missing includes
- removed printks
- removed useless wrappers for rtc ops
- removed dead code
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mark Jackson <mpfj@mimc.co.uk>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
With PXA27x and above, a new RTC hardware block was added in addition to
the legacy one which is also found on the SA1100 SOC family. This second
RTC block is called "wristwatch" and "periodic interrupt" and works
independently from the other RTC block.
The driver offers provides :
- a 1Hz ticking clock
- a periodic alarm, in the 1Hz to 1000Hz range
- a one shot alarm
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add standard interfaces for alarm/update irqs enabling. Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.
UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for the Dallas DS1390/93/94 SPI RTC chip.
Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Provide the basic "get" and "set" functionality for the Epson RX-8581 I2C
RTC. It currently does not support the RTC's Alarm or Fixed-cycle timer.
[akpm@linux-foundation.org: need log2.h for ilog2(), remove unneeded initialisation]
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This adds support for the RTC provided by the Wolfson Microelectronics
WM8350.
This driver was originally written by Graeme Gregory and Liam Girdwood,
though it has been modified since then to update it to current mainline
coding standards and for API completeness.
[akpm@linux-foundation.org: s/schedule_timeout_interruptible/schedule_timeout_uninterruptible/ to prevent bogus timeout when signal_pending()]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Liam Girdwood <linux@wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits)
sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().
sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
sh: sh7785 pinmux support
sh: update defconfigs.
sh: Kill off unused p1fc divisors from SH7763 clk fwk.
sh: improve pinmux support for single direction pins
sh: use 10MHz VIO_CLK for ov772x on Migo-R
sh: Update gpio_set_value() pin value handling
sh: update ov772x byte order on Migo-R
rtc: Add R2025S/D comment to rs5c372 Kconfig entry.
sh: Export cache flush routines needed by sh_eth on SH7619.
sh: Wire up oops reporting in the die notifier chain.
sh: ap325rxa: Kill off unused port definitions.
sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.
sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.
sh: add support FLCTL for ap325rxa board
sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
sh: rsk7203: leds-gpio support for RSK+ LEDs.
sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.
sh: fix soc-camera compile breakage on Migo-R.
...
This adds a driver for the RTC inside the TWL4030 multi-function device.
It's a fairly basic RTC, with a wake-capable alarm.
Note that many of the pre-release Overo boards now in circulation can't
effectively use this RTC, because of a wiring error that puts its TWL
chip into "secure" mode. (As in "secure yourself against tampering".)
This isn't an issue on other OMAP3 boards now supported in mainline,
such as Beagle and Labrador.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Add support for M41T65 Real Time Clock chip.
The main differences I see between the M41T65 and M41T80 are that:
1) The M41T65 watchdog timer has three bits controlling resolution
(versus two for the M41T80).
2) There is no register 0x13 for controlling square-wave output.
Signed-off-by: Steven A. Falco <sfalco@harris.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Now that arch/ppc is dead CONFIG_PPC_MERGE is always defined for all
powerpc platforms and we want to get rid of it use CONFIG_PPC instead.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add support for the Dallas DS3234 chip - extremely accurate SPI bus RTC
with integrated crystal and SRAM.
[akpm@linux-foundation.org: don't use BIN2BCD/BCD2BIN]
Signed-off-by: Dennis Aberilla <denzzzhome@yahoo.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This driver replaces the broken ip27-rtc driver in drivers/char and
gives back RTC support for SGI IP27 machines.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This driver replaces the broken DS1286 driver in drivers/char and gives back
RTC support for SGI IP22 and IP28 machines.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Fix for linux-next's
: Author: David S. Miller <davem@davemloft.net> 2008-08-28 19:54:17
: Committer: David S. Miller <davem@davemloft.net> 2008-08-29 14:16:45
: Parent: 7f60459921 (Blackfin RTC Driver: BF561 not have on-chip RTC)
: Child: cca4c23102 (rtc: Add TI BQ4802 RTC driver.)
: Branches: git-alsa-tiwai, linux-next
: Follows: v2.6.27-rc4
: Precedes: next-20080902
:
: rtc: Allow RTC_DRV_CMOS to be used on SPARC.
In file included from drivers/rtc/rtc-cmos.c:40:
include/asm-generic/rtc.h: In function 'rtc_is_updating':
include/asm-generic/rtc.h:40: error: 'rtc_port' undeclared (first use in this function)
include/asm-generic/rtc.h:40: error: (Each undeclared identifier is reported only once
include/asm-generic/rtc.h:40: error: for each function it appears in.)
include/asm-generic/rtc.h: In function 'get_rtc_time':
include/asm-generic/rtc.h:73: error: 'rtc_port' undeclared (first use in this function)
include/asm-generic/rtc.h: In function 'set_rtc_time':
include/asm-generic/rtc.h:160: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_read_alarm':
drivers/rtc/rtc-cmos.c:193: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_checkintr':
drivers/rtc/rtc-cmos.c:255: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_irq_enable':
drivers/rtc/rtc-cmos.c:272: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_irq_disable':
drivers/rtc/rtc-cmos.c:292: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_set_alarm':
drivers/rtc/rtc-cmos.c:337: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_irq_set_freq':
drivers/rtc/rtc-cmos.c:378: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_procfs':
drivers/rtc/rtc-cmos.c:455: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_nvram_read':
drivers/rtc/rtc-cmos.c:519: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_nvram_write':
drivers/rtc/rtc-cmos.c:551: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_interrupt':
drivers/rtc/rtc-cmos.c:588: error: 'rtc_port' undeclared (first use in this function)
drivers/rtc/rtc-cmos.c: In function 'cmos_do_probe':
drivers/rtc/rtc-cmos.c:722: error: 'rtc_port' undeclared (first use in this function)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add support for two compatible RTC:
- M48T08 which does not have alarm part,
- M48T08 which does not have alarm part and has
only 2KB of NVRAM
These types covers all Mostek's RTC used in Sun UltraSparc workstations.
Tested on Sun Ultra60 with M48T59 RTC.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add Sparc to the Kconfig depends list.
Add __sparc___ to address_sparc = 128 ifdef.
Finally, don't be concerned about 24-hour BCD mode support if the RTC
doesn't have a valid IRQ. We won't even use the alarm code in this
case and the Sparc RTCs have this limitation.
Signed-off-by: David S. Miller <davem@davemloft.net>
Support the Dallas/Maxim DS1305 and DS1306 RTC chips. These use SPI, and
support alarms, NVRAM, and a trickle charger for use when their backup
power supply is a supercap or rechargeable cell.
This basic driver doesn't yet support suspend/resume or wakealarms.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch adds kernel driver for M41T94 RTC chip connected via SPI.
I've tested it on two different AT91-based hardwares.
This is third revision of the patch: some comments made by
Alessandro Zummo fixed.
Revision two added support for century bit and fixes.
Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ramtron FM3130 is a chip with two separate devices inside, RTC clock and
FRAM. This driver provides only RTC functionality.
This chip is met in lots of custom boards with AT91SAMXXXX CPU I work
with, is cheap and in no way better or worse than any other RTC on market.
While it is mostly met on much smaller devices, I think it is great to
have it supported in Linux.
Signed-off-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This hooks up the platform-specific [gs]et_rtc_time functions so that
kernels using CONFIG_RTC_CLASS have RTC support on most PowerPC platforms.
A new driver, and one which we've been shipping in Fedora for a while
already, since otherwise RTC support breaks.
[akpm@linux-foundation.org: fix Kconfig indenting]
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Update the help text for RTC_DRV_AT91SAM9 to mention that the
option apply to AT91CAP9 processors too, and enable it in the
defconfig.
Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Convert Integrator PL030 RTC driver to use the RTC class interfaces.
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Kconfig tweaks to help reduce RTC configuration bugs, by avoiding
legacy RTC drivers when the generic RTC framework is enabled:
- If rtc-cmos is selected, disable the legacy rtc driver;
- When using generic RTC on x86, enable rtc-cmos by default;
- In the old "chardev RTC" section of Kconfig, add a comment
warning people off these (seven) legacy RTC drivers when
the generic framework is in use.
People can still use the legacy drivers if they want (or need) to.
This doesn't fix the broken dependencies for the legacy "CMOS" RTC driver.
Ideally it would be a full list of platforms where it works, not a partial
list of ones where it won't. Or better yet, it would depend on a
"HAVE_CMOS_RTC" flag defined by various platforms ... surely there's a
Kconfig style guideline lurking there.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rtc-s35390a uses BITREVERSE functions so it needs to select that config symbol
to ensure that the functions are built.
drivers/built-in.o: In function `s35390a_set_datetime':
linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:144: undefined reference to `byte_rev_table'
drivers/built-in.o: In function `s35390a_get_datetime':
linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:163: undefined reference to `byte_rev_table'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>