All of lore.kernel.org
 help / color / mirror / Atom feed
* TS-219 RTC issue with Debian Buster
@ 2019-07-23 15:30 Oliver Hartkopp
  2019-07-23 16:12 ` Andrew Lunn
  2019-07-23 19:06   ` Uwe Kleine-König
  0 siblings, 2 replies; 16+ messages in thread
From: Oliver Hartkopp @ 2019-07-23 15:30 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Andrew Lunn, tbm

Hi all,

I upgraded my TS-219 to Debian Buster with Kernel 4.19.0-5-marvell.

They use dtbs/4.19.0-5-marvell/./kirkwood-ts219-6282.dtb

Unfortunately the RTC doesn't seem to work.

root@xxxxx:~# hwclock -v --test
hwclock from util-linux 2.33.1
System Time: 1563296223.425648
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1563291472 seconds after 1969
Last calibration done at 1563291472 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
hwclock: select() to /dev/rtc0 to wait for clock tick timed out
...synchronization failed
Test mode: nothing was changed.

With strace the clock tick problem looks like this:

write(1, "Waiting for clock tick...\n", 26Waiting for clock tick...
) = 26
ioctl(4, RTC_UIE_ON)                    = 0
_newselect(5, [4], NULL, NULL, {tv_sec=10, tv_usec=0}) = 0 (Timeout)
write(2, "hwclock: ", 9hwclock: )                = 9
write(2, "select() to /dev/rtc0 to wait fo"..., 54select() to /dev/rtc0 
to wait for clock tick timed out) = 54
write(2, "\n", 1)                       = 1
ioctl(4, PHN_NOT_OH or RTC_UIE_OFF)     = 0


It looks the same with

# hwclock --hctosys
hwclock: select() to /dev/rtc0 to wait for clock tick timed out

I wonder whether the problem comes from a missing interrupt assignment

rtc: rtc@10300 {
              compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
              reg = <0x10300 0x20>;
              interrupts = <53>;            <- HERE!?!
              clocks = <&gate_clk 7>;
                };

... I found in linux/arch/arm/boot/dts/kirkwood-6282.dtsi ?!?

In /proc/interrupts there's no rtc assigned to an interrupt 53.

Accessing the rtc values (time/date) via /sys/class/rtc/rtc0 entries 
works well and setting the date/time via "hwclock --systohc" does its 
job too. So I2C and the rtc_s35390a driver seem to work so far.

Any ideas why hwclock fails to work properly?

Best regards,
Oliver

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-07-23 22:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 15:30 TS-219 RTC issue with Debian Buster Oliver Hartkopp
2019-07-23 16:12 ` Andrew Lunn
2019-07-23 17:31   ` Oliver Hartkopp
2019-07-23 17:56     ` Oliver Hartkopp
2019-07-23 18:30       ` Oliver Hartkopp
2019-07-23 19:05         ` Oliver Hartkopp
2019-07-23 22:15         ` Andrew Lunn
2019-07-23 21:07       ` Russell King - ARM Linux admin
2019-07-23 19:06 ` Uwe Kleine-König
2019-07-23 19:06   ` Uwe Kleine-König
2019-07-23 19:21   ` Oliver Hartkopp
2019-07-23 19:21     ` Oliver Hartkopp
2019-07-23 19:34     ` Uwe Kleine-König
2019-07-23 19:34       ` Uwe Kleine-König
2019-07-23 20:07       ` Oliver Hartkopp
2019-07-23 20:07         ` Oliver Hartkopp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.