Changeset f004318 in mainline
- Timestamp:
- 2012-04-17T21:06:26Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e5fbe06
- Parents:
- 074324f1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/time/cmos-rtc/cmos-rtc.c
r074324f1 rf004318 317 317 /* The RTC is working in 12h mode, check if it is AM or PM */ 318 318 if (t->tm_hour & 0x80) { 319 /* PM flag is active, it must to be cleared 320 * or the BCD conversion will fail. 321 */ 319 /* PM flag is active, it must be cleared */ 322 320 t->tm_hour &= ~0x80; 323 321 pm_mode = true; … … 357 355 358 356 fibril_mutex_unlock(&rtc->mutex); 359 return EOK; 357 358 return rtc_tm_sanity_check(t); 360 359 } 361 360 … … 386 385 reg_b = rtc_register_read(rtc, RTC_STATUS_B); 387 386 388 /* Force 24h mode of operation */ 389 rtc_register_write(rtc, RTC_STATUS_B, reg_b | RTC_MASK_24H); 387 if (!(reg_b & RTC_MASK_24H)) { 388 /* Force 24h mode of operation */ 389 reg_b |= RTC_MASK_24H; 390 rtc_register_write(rtc, RTC_STATUS_B, reg_b); 391 } 390 392 391 393 if (rtc_register_read(rtc, RTC_YEAR) < 100) {
Note:
See TracChangeset
for help on using the changeset viewer.