]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vrtc: change its year offset from 1960 to 1972
authorFeng Tang <feng.tang@intel.com>
Wed, 5 Oct 2011 00:42:25 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 13 Oct 2011 06:49:08 +0000 (17:49 +1100)
commit05a556cde24bb4c7f1edf1f1cfcf1deb1c83c5ba
tree228e9a8c7288130ba99a6611c07c0b6724348fc3
parent43eb0a82b2c6e3ac877afc2c6b6c5a338674d0f3
vrtc: change its year offset from 1960 to 1972

Real world year equals the value in vrtc YEAR register plus an offset.  We
used 1960 for original developepment as the offset to make leap year
consistent, but for a device's first use, its YEAR register is 0 and the
system year will be parsed as 1960 which is not a valid UNIX time and will
cause many applications to fail mysteriously.  Devices use 1972 instead to
fix this issue.

Updated patch which adds a sanity check suggested by Mathias

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/platform/mrst/vrtc.c
drivers/rtc/rtc-mrst.c