[Letux-kernel] 2016.11 uboot considered harmful

Andreas Kemnade andreas at kemnade.info
Wed Feb 1 22:57:52 CET 2017


Hi,

after some more clock hacking here is a short resume:
Starting with a correctly set clock (maybe using hwclock --systohc from
a running kernel) and then shutdown

you can read clock in uboot by
i2c dev 0
i2c mw 0x4b 0x29 0x41 1
i2c md 0x4b 0x1c 6
It will read out in bcd.
ss mm hh DD MM YY

If the values are sane and you boot the kernel, clock can be read out
correctly there.

Entering 2016.11 uboot gives a value
 >23 for hours (I have the suspicion it is a fixed offset.)
If you fix the hour value by hand 
 (i2c mw 0x4b 0x1e 0xXX 1 
  i2c mw 0x4b 0x29 0x41 1)
the kernel will have the correct value.

If not, after some time in the boot process the clock will be set to
2066.

Entering old uboot keeps the hours correctly.
 -> kernel has also correct time

If you you enter poweroff at uboot cmdline,
and restart 2016.11 you will also have garbled hour value in the
rtc. So no kernel is needed to harm the clock.

having power loss for a short time does not influence anything.

I am very puzzled about this because I do not find twl rtc code in the
new uboot. So some register definitions might be mixed up. Any hints?

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20170201/0700677d/attachment.asc>


More information about the Letux-kernel mailing list