Thomas Gleixner
b0ecd8e8c5
rtc: cmos: Make rtc_cmos sync offset correct
...
The offset for rtc_cmos must be -500ms to work correctly with the current
implementation of rtc_set_ntp_time() due to the following:
tsched twrite(t2.tv_sec - 1) t2 (seconds increment)
twrite - tsched is the transport time for the write to hit the device,
which is negligible for this chip because it's accessed directly.
t2 - twrite = 500ms according to the datasheet.
But rtc_set_ntp_time() calculation of tsched is:
tsched = t2 - 1sec - (t2 - twrite)
The default for the sync offset is 500ms which means that the write happens
at t2 - 1.5 seconds which is obviously off by a second for this device.
Make the offset -500ms so it works correct.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201206220541.830517160@linutronix.de
2020-12-11 10:40:52 +01:00
..
2020-04-02 18:47:30 +02:00
2019-10-23 17:23:43 +02:00
2019-11-27 09:31:08 +01:00
2020-10-19 22:47:56 +02:00
2019-04-06 15:05:31 +02:00
2020-10-19 22:47:56 +02:00
2019-04-04 10:07:08 +02:00
2019-04-04 10:07:08 +02:00
2019-08-21 09:57:23 +02:00
2020-04-18 22:42:06 +02:00
2019-04-11 16:42:55 +02:00
2020-03-16 11:12:11 +01:00
2020-07-16 11:17:52 +02:00
2019-08-21 09:57:23 +02:00
2020-06-06 00:16:24 +02:00
2019-08-21 09:57:23 +02:00
2019-10-07 15:49:20 +02:00
2019-05-30 11:26:37 -07:00
2019-12-23 11:16:23 +01:00
2019-10-07 01:07:35 +02:00
2020-01-15 15:11:10 +01:00
2019-10-07 01:07:35 +02:00
2020-03-16 11:12:09 +01:00
2020-03-23 09:27:17 +01:00
2020-07-16 11:17:52 +02:00
2019-05-21 10:50:45 +02:00
2019-11-08 16:14:09 +01:00
2019-10-07 01:07:35 +02:00
2020-12-11 10:40:52 +01:00
2019-10-07 01:07:35 +02:00
2018-09-28 14:20:59 +02:00
2020-07-02 22:32:00 +02:00
2020-01-07 17:36:46 +01:00
2020-04-01 12:33:43 +02:00
2019-05-30 11:26:32 -07:00
2019-10-07 15:49:18 +02:00
2020-03-16 11:12:09 +01:00
2019-10-07 01:07:35 +02:00
2019-04-04 10:07:09 +02:00
2019-10-07 01:07:35 +02:00
2019-10-07 01:07:35 +02:00
2019-11-15 11:58:14 +01:00
2020-03-16 11:12:10 +01:00
2020-09-24 09:56:04 +02:00
2019-12-23 11:22:32 +01:00
2019-10-07 15:49:38 +02:00
2020-07-21 09:56:46 +02:00
2019-06-19 17:09:55 +02:00
2019-10-07 01:07:35 +02:00
2019-10-07 01:07:35 +02:00
2019-08-21 09:57:23 +02:00
2020-09-15 11:24:29 +02:00
2019-06-19 17:09:55 +02:00
2019-05-23 17:42:25 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-11-08 16:14:09 +01:00
2019-10-07 01:07:35 +02:00
2019-07-17 10:03:50 -07:00
2020-08-21 00:20:38 +02:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2020-07-16 11:15:43 +02:00
2019-06-05 17:37:06 +02:00
2019-12-23 11:18:06 +01:00
2020-03-29 22:08:35 +02:00
2020-07-02 22:32:01 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-07-22 22:30:19 +02:00
2020-05-11 16:35:05 +02:00
2019-06-19 17:09:55 +02:00
2020-04-15 09:56:17 +02:00
2019-11-08 16:14:09 +01:00
2019-05-30 11:26:32 -07:00
2020-08-23 17:36:59 -05:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-03-16 11:12:11 +01:00
2019-06-19 17:09:55 +02:00
2019-10-06 21:04:51 +02:00
2018-03-17 14:20:46 +01:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2018-11-22 18:11:35 +01:00
2018-08-14 23:38:45 +02:00
2020-08-07 23:29:47 +02:00
2020-05-11 16:21:50 +02:00
2020-12-11 10:40:52 +01:00
2020-07-16 11:17:52 +02:00
2020-09-29 22:19:15 +02:00
2019-11-27 09:31:13 +01:00
2019-12-23 11:23:49 +01:00
2020-05-30 04:12:38 +02:00
2019-06-05 17:37:17 +02:00
2019-11-18 15:23:54 +01:00
2020-04-18 22:42:04 +02:00
2020-10-15 12:01:29 +02:00
2019-10-07 01:07:35 +02:00
2019-10-07 01:07:35 +02:00
2019-07-22 22:16:12 +02:00
2020-03-22 22:10:41 +01:00
2020-03-23 09:27:17 +01:00
2019-05-24 17:39:01 +02:00
2016-09-02 01:24:06 +02:00
2019-05-08 22:14:36 +02:00
2019-08-20 21:42:19 +02:00
2020-09-15 12:25:44 +02:00
2020-08-23 17:36:59 -05:00
2019-12-23 11:23:53 +01:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2020-08-23 17:36:59 -05:00
2019-09-01 08:48:28 +02:00
2019-10-07 01:07:35 +02:00
2020-03-16 11:12:09 +01:00
2020-07-16 11:27:03 +02:00
2020-03-23 09:27:17 +01:00
2019-04-04 10:07:10 +02:00
2019-08-13 10:53:10 +02:00
2019-10-06 21:04:51 +02:00
2020-10-19 22:48:55 +02:00
2019-05-30 11:29:52 -07:00
2020-04-15 09:58:24 +02:00
2019-08-13 10:53:10 +02:00
2019-05-21 10:50:45 +02:00
2020-08-21 00:13:44 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-10-07 01:07:35 +02:00
2020-10-15 12:09:35 +02:00
2019-12-23 11:16:23 +01:00
2020-10-19 22:47:56 +02:00
2020-09-29 22:20:10 +02:00
2019-06-19 17:09:55 +02:00
2019-11-15 11:58:12 +01:00
2020-09-29 22:18:10 +02:00
2019-12-23 11:22:21 +01:00
2019-06-19 17:09:55 +02:00
2020-09-15 10:42:36 +02:00
2019-06-19 17:09:55 +02:00
2019-07-23 20:34:31 +02:00
2019-10-19 22:33:05 +02:00
2020-03-16 11:12:09 +01:00
2017-11-02 11:10:55 +01:00
2019-11-08 16:14:09 +01:00
2019-08-21 09:57:23 +02:00
2020-02-12 12:21:40 +01:00
2020-03-16 11:12:09 +01:00
2020-05-30 03:17:48 +02:00
2019-10-07 01:07:35 +02:00
2020-09-15 11:21:50 +02:00
2020-03-16 11:12:09 +01:00
2019-10-07 01:07:35 +02:00
2019-12-10 14:29:23 +01:00
2020-08-23 17:36:59 -05:00
2019-04-04 10:07:10 +02:00
2020-04-02 18:47:29 +02:00
2019-10-07 01:07:35 +02:00
2019-11-27 09:31:13 +01:00
2019-05-23 17:44:52 +02:00
2020-01-25 21:50:18 +01:00
2019-11-17 22:24:33 +01:00
2019-05-30 11:26:32 -07:00
2019-10-07 01:07:35 +02:00
2019-11-27 09:31:13 +01:00
2019-10-23 17:23:43 +02:00
2019-10-19 22:33:15 +02:00
2019-10-14 17:49:17 +02:00
2019-07-13 21:39:51 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-11-27 09:31:14 +01:00
2020-02-12 12:21:42 +01:00
2020-03-16 11:12:08 +01:00
2019-05-08 22:14:36 +02:00