mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 10:18:38 +00:00
07c652400d
The DS1307 driver was originally based on the DS1337 driver. However, the functionality of the clock set/get functions has diverged. In the original DS1337 driver, the set/get functions did the following: 1) Setting the clock ensured the oscillator was enabled. 2) Getting the clock checked and reset the oscillator-stop flag. The DS1307 does not have an oscillator-stop flag, but the driver tried (incorrectly) to emulate this by ensuring the oscillator was running. It really makes no sense to start a stopped clock without setting it. This patch makes the DS1307 driver behave like the original DS1337 driver again. For the DS1307 itself, this is just a removal of code, since there is no oscillator-fail bit to check or reset, and the clock is started when it is set. Since the DS1307 driver can now also be used for the DS1337 and DS1340 which do have this bit, add code to handle the oscillator-stop bit in the same was the original DS1337 driver did -- i.e. report that the oscillator had stopped and clear the flag. This means that setting the date using the date command (which does both a get and a set) will now clear the oscillator-stop flag in addition to setting and starting the clock. The old-style (non-DM) code has not been updated and will be removed in a future patch. Note that this older code does not support the DS1337, as there is a separate driver for this. Also note that the original (DM) code used the wrong control-register address for the DS1337. Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> |
||
---|---|---|
.. | ||
abx80x.c | ||
armada38x.c | ||
at91sam9_rtt.c | ||
davinci.c | ||
ds164x.c | ||
ds174x.c | ||
ds1302.c | ||
ds1306.c | ||
ds1307.c | ||
ds1337.c | ||
ds1374.c | ||
ds1556.c | ||
ds3231.c | ||
ds3232.c | ||
emul_rtc.c | ||
ftrtc010.c | ||
i2c_rtc_emul.c | ||
imxdi.c | ||
isl1208.c | ||
Kconfig | ||
m41t11.c | ||
m41t60.c | ||
m41t62.c | ||
m41t94.c | ||
m48t35ax.c | ||
Makefile | ||
max6900.c | ||
mc13xxx-rtc.c | ||
mc146818.c | ||
mcfrtc.c | ||
mk48t59.c | ||
mvrtc.c | ||
mvrtc.h | ||
mx27rtc.c | ||
mxsrtc.c | ||
pcf2127.c | ||
pcf8563.c | ||
pl031.c | ||
pt7c4338.c | ||
rs5c372.c | ||
rtc-uclass.c | ||
rv3028.c | ||
rv3029.c | ||
rv8803.c | ||
rx8010sj.c | ||
rx8025.c | ||
s3c24x0_rtc.c | ||
s35392a.c | ||
sandbox_rtc.c | ||
stm32_rtc.c | ||
x1205.c | ||
zynqmp_rtc.c |