Write RTC seconds first to maintain settings integrity per
Maxim/Dallas DS1306 data sheet. Patch by Alan J. Luse, 02 May 2006
This commit is contained in:
parent
983bebbea3
commit
da4849fb30
|
@ -2,6 +2,10 @@
|
||||||
Changes since U-Boot 1.1.4:
|
Changes since U-Boot 1.1.4:
|
||||||
======================================================================
|
======================================================================
|
||||||
|
|
||||||
|
* Write RTC seconds first to maintain settings integrity per
|
||||||
|
Maxim/Dallas DS1306 data sheet.
|
||||||
|
Patch by Alan J. Luse, 02 May 2006
|
||||||
|
|
||||||
* Scheduled for removal: strnicmp() which is unused
|
* Scheduled for removal: strnicmp() which is unused
|
||||||
|
|
||||||
* Update for Intel Monahans boards:
|
* Update for Intel Monahans boards:
|
||||||
|
@ -9,12 +13,12 @@ Changes since U-Boot 1.1.4:
|
||||||
- NAND support for zylonite board + some minor cleanup
|
- NAND support for zylonite board + some minor cleanup
|
||||||
|
|
||||||
* Declare load_serial_ymodem() when using CFG_CMD_LOADB.
|
* Declare load_serial_ymodem() when using CFG_CMD_LOADB.
|
||||||
Patch by Jon Loeliger, 01. May 2006
|
Patch by Jon Loeliger, 01 May 2006
|
||||||
|
|
||||||
* Fixed handling of bad checksums with "mkimage -l"
|
* Fixed handling of bad checksums with "mkimage -l"
|
||||||
|
|
||||||
* Added support for BC3450 board
|
* Added support for BC3450 board
|
||||||
Patch by Stefan Strobl, 21. Oct 2005
|
Patch by Stefan Strobl, 21 Oct 2005
|
||||||
|
|
||||||
* Update for NC650 board:
|
* Update for NC650 board:
|
||||||
- Support rev1 and rev2 hardware
|
- Support rev1 and rev2 hardware
|
||||||
|
|
12
rtc/ds1306.c
12
rtc/ds1306.c
|
@ -360,13 +360,13 @@ void rtc_set (struct rtc_time *tmp)
|
||||||
tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
|
tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
|
||||||
tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
|
||||||
|
|
||||||
rtc_write (RTC_YEAR, bin2bcd (tmp->tm_year - 2000));
|
|
||||||
rtc_write (RTC_MONTH, bin2bcd (tmp->tm_mon));
|
|
||||||
rtc_write (RTC_DATE_OF_MONTH, bin2bcd (tmp->tm_mday));
|
|
||||||
rtc_write (RTC_DAY_OF_WEEK, bin2bcd (tmp->tm_wday + 1));
|
|
||||||
rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour));
|
|
||||||
rtc_write (RTC_MINUTES, bin2bcd (tmp->tm_min));
|
|
||||||
rtc_write (RTC_SECONDS, bin2bcd (tmp->tm_sec));
|
rtc_write (RTC_SECONDS, bin2bcd (tmp->tm_sec));
|
||||||
|
rtc_write (RTC_MINUTES, bin2bcd (tmp->tm_min));
|
||||||
|
rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour));
|
||||||
|
rtc_write (RTC_DAY_OF_WEEK, bin2bcd (tmp->tm_wday + 1));
|
||||||
|
rtc_write (RTC_DATE_OF_MONTH, bin2bcd (tmp->tm_mday));
|
||||||
|
rtc_write (RTC_MONTH, bin2bcd (tmp->tm_mon));
|
||||||
|
rtc_write (RTC_YEAR, bin2bcd (tmp->tm_year - 2000));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in New Issue