vrtc: change its year offset from 1960 to 1972
authorFeng Tang <feng.tang@intel.com>
Fri, 15 Jul 2011 13:39:22 +0000 (14:39 +0100)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:36:29 +0000 (12:36 -0800)
commit891502f901cbd4ead20fef6fee48255a25d4044b
tree7f5e10c43857e247952c53f4a3f51db32c7a73c8
parentb05eb3c55eecb73d68419e19c237cb8f9a7a4c52
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 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. So use 1972 instead to fix this
issue.

Updated patch which adds a sanity check suggested by Mathias

Change-Id: I521271ac79b5657e9b9eb4a81fe6b2e5f5e94e0b
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
arch/x86/platform/mrst/vrtc.c
drivers/rtc/rtc-mrst.c