HelenOS sources
rtc 84 kernel/arch/arm32/include/arch/mach/integratorcp/integratorcp.h uintptr_t rtc;
rtc 143 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc = km_map(ICP_RTC, PAGE_SIZE, PAGE_SIZE,
rtc 145 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_load = icp.hw_map.rtc + ICP_RTC1_LOAD_OFFSET;
rtc 146 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_read = icp.hw_map.rtc + ICP_RTC1_READ_OFFSET;
rtc 147 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_ctl = icp.hw_map.rtc + ICP_RTC1_CTL_OFFSET;
rtc 148 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_intrclr = icp.hw_map.rtc + ICP_RTC1_INTRCLR_OFFSET;
rtc 149 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_bgload = icp.hw_map.rtc + ICP_RTC1_BGLOAD_OFFSET;
rtc 150 kernel/arch/arm32/src/mach/integratorcp/integratorcp.c icp.hw_map.rtc1_intrstat = icp.hw_map.rtc + ICP_RTC1_INTRSTAT_OFFSET;
rtc 86 uspace/drv/time/cmos-rtc/cmos-rtc.c static errno_t rtc_dev_initialize(rtc_t *rtc);
rtc 87 uspace/drv/time/cmos-rtc/cmos-rtc.c static bool rtc_pio_enable(rtc_t *rtc);
rtc 88 uspace/drv/time/cmos-rtc/cmos-rtc.c static void rtc_dev_cleanup(rtc_t *rtc);
rtc 91 uspace/drv/time/cmos-rtc/cmos-rtc.c static bool rtc_update_in_progress(rtc_t *rtc);
rtc 92 uspace/drv/time/cmos-rtc/cmos-rtc.c static int rtc_register_read(rtc_t *rtc, int reg);
rtc 96 uspace/drv/time/cmos-rtc/cmos-rtc.c static void rtc_register_write(rtc_t *rtc, int reg, int data);
rtc 97 uspace/drv/time/cmos-rtc/cmos-rtc.c static bool is_battery_ok(rtc_t *rtc);
rtc 162 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_dev_cleanup(rtc_t *rtc)
rtc 173 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_pio_enable(rtc_t *rtc)
rtc 175 uspace/drv/time/cmos-rtc/cmos-rtc.c if (pio_enable((void *) rtc->io_addr, REG_COUNT,
rtc 176 uspace/drv/time/cmos-rtc/cmos-rtc.c (void **) &rtc->port)) {
rtc 179 uspace/drv/time/cmos-rtc/cmos-rtc.c " for device %s", (long unsigned int)rtc->io_addr,
rtc 180 uspace/drv/time/cmos-rtc/cmos-rtc.c ddf_dev_get_name(rtc->dev));
rtc 194 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_dev_initialize(rtc_t *rtc)
rtc 202 uspace/drv/time/cmos-rtc/cmos-rtc.c ddf_msg(LVL_DEBUG, "rtc_dev_initialize %s", ddf_dev_get_name(rtc->dev));
rtc 204 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_sec = 0;
rtc 205 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_nsec = 0;
rtc 206 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->clients_connected = 0;
rtc 213 uspace/drv/time/cmos-rtc/cmos-rtc.c parent_sess = ddf_dev_parent_sess_get(rtc->dev);
rtc 216 uspace/drv/time/cmos-rtc/cmos-rtc.c of device %s.", ddf_dev_get_name(rtc->dev));
rtc 225 uspace/drv/time/cmos-rtc/cmos-rtc.c for device %s", ddf_dev_get_name(rtc->dev));
rtc 235 uspace/drv/time/cmos-rtc/cmos-rtc.c ddf_dev_get_name(rtc->dev));
rtc 240 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->io_addr = (ioport8_t *) (long) res->res.io_range.address;
rtc 243 uspace/drv/time/cmos-rtc/cmos-rtc.c "0x%lx", ddf_dev_get_name(rtc->dev),
rtc 244 uspace/drv/time/cmos-rtc/cmos-rtc.c (unsigned long int) rtc->io_addr);
rtc 255 uspace/drv/time/cmos-rtc/cmos-rtc.c ddf_dev_get_name(rtc->dev));
rtc 265 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_dev_cleanup(rtc);
rtc 279 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_read(rtc_t *rtc, int reg)
rtc 281 uspace/drv/time/cmos-rtc/cmos-rtc.c pio_write_8(REG_SEL_PORT(rtc->port), reg);
rtc 282 uspace/drv/time/cmos-rtc/cmos-rtc.c return pio_read_8(REG_RW_PORT(rtc->port));
rtc 292 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc_t *rtc, int reg, int data)
rtc 294 uspace/drv/time/cmos-rtc/cmos-rtc.c pio_write_8(REG_SEL_PORT(rtc->port), reg);
rtc 295 uspace/drv/time/cmos-rtc/cmos-rtc.c pio_write_8(REG_RW_PORT(rtc->port), data);
rtc 305 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_update_in_progress(rtc_t *rtc)
rtc 307 uspace/drv/time/cmos-rtc/cmos-rtc.c return rtc_register_read(rtc, RTC_STATUS_A) & RTC_A_UPDATE;
rtc 322 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = fun_rtc(fun);
rtc 324 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 326 uspace/drv/time/cmos-rtc/cmos-rtc.c if (rtc->boot_time.tv_sec) {
rtc 335 uspace/drv/time/cmos-rtc/cmos-rtc.c ts_add(&curtime, &rtc->boot_time);
rtc 336 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 342 uspace/drv/time/cmos-rtc/cmos-rtc.c if (!is_battery_ok(rtc)) {
rtc 343 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 353 uspace/drv/time/cmos-rtc/cmos-rtc.c while (rtc_update_in_progress(rtc))
rtc 356 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_sec = rtc_register_read(rtc, RTC_SEC);
rtc 357 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_min = rtc_register_read(rtc, RTC_MIN);
rtc 358 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_hour = rtc_register_read(rtc, RTC_HOUR);
rtc 359 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_mday = rtc_register_read(rtc, RTC_DAY);
rtc 360 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_mon = rtc_register_read(rtc, RTC_MON);
rtc 361 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_year = rtc_register_read(rtc, RTC_YEAR);
rtc 364 uspace/drv/time/cmos-rtc/cmos-rtc.c } while (t->tm_sec != rtc_register_read(rtc, RTC_SEC) ||
rtc 365 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_min != rtc_register_read(rtc, RTC_MIN) ||
rtc 366 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_mday != rtc_register_read(rtc, RTC_DAY) ||
rtc 367 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_mon != rtc_register_read(rtc, RTC_MON) ||
rtc 368 uspace/drv/time/cmos-rtc/cmos-rtc.c t->tm_year != rtc_register_read(rtc, RTC_YEAR));
rtc 371 uspace/drv/time/cmos-rtc/cmos-rtc.c bool _12h_mode = !(rtc_register_read(rtc, RTC_STATUS_B) &
rtc 383 uspace/drv/time/cmos-rtc/cmos-rtc.c bcd_mode = !(rtc_register_read(rtc, RTC_STATUS_B) & RTC_B_BCD);
rtc 423 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_sec = r;
rtc 424 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_nsec = t->tm_nsec; /* normalized */
rtc 425 uspace/drv/time/cmos-rtc/cmos-rtc.c ts_sub(&rtc->boot_time, &uptime);
rtc 429 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 451 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = fun_rtc(fun);
rtc 466 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 468 uspace/drv/time/cmos-rtc/cmos-rtc.c if (!is_battery_ok(rtc)) {
rtc 469 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 474 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_sec = 0;
rtc 475 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->boot_time.tv_nsec = 0;
rtc 478 uspace/drv/time/cmos-rtc/cmos-rtc.c if (rtc_register_read(rtc, RTC_YEAR) < 100)
rtc 485 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 491 uspace/drv/time/cmos-rtc/cmos-rtc.c reg_b = rtc_register_read(rtc, RTC_STATUS_B);
rtc 496 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_STATUS_B, reg_b);
rtc 520 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_STATUS_B, reg_b | RTC_B_INH);
rtc 523 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_SEC, t->tm_sec);
rtc 524 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_MIN, t->tm_min);
rtc 525 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_HOUR, t->tm_hour);
rtc 526 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_DAY, t->tm_mday);
rtc 527 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_MON, t->tm_mon);
rtc 528 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_YEAR, t->tm_year);
rtc 531 uspace/drv/time/cmos-rtc/cmos-rtc.c reg_a = rtc_register_read(rtc, RTC_STATUS_A);
rtc 532 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_STATUS_A, RTC_A_CLK_STOP | reg_a);
rtc 535 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_STATUS_B, reg_b);
rtc 536 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_register_write(rtc, RTC_STATUS_A, reg_a);
rtc 538 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 553 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = fun_rtc(fun);
rtc 555 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 556 uspace/drv/time/cmos-rtc/cmos-rtc.c const bool batt_ok = is_battery_ok(rtc);
rtc 557 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 572 uspace/drv/time/cmos-rtc/cmos-rtc.c is_battery_ok(rtc_t *rtc)
rtc 574 uspace/drv/time/cmos-rtc/cmos-rtc.c return rtc_register_read(rtc, RTC_STATUS_D) & RTC_D_BATTERY_OK;
rtc 586 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc;
rtc 595 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc = ddf_dev_data_alloc(dev, sizeof(rtc_t));
rtc 596 uspace/drv/time/cmos-rtc/cmos-rtc.c if (!rtc)
rtc 599 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->dev = dev;
rtc 600 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_initialize(&rtc->mutex);
rtc 602 uspace/drv/time/cmos-rtc/cmos-rtc.c rc = rtc_dev_initialize(rtc);
rtc 608 uspace/drv/time/cmos-rtc/cmos-rtc.c if (!rtc_pio_enable(rtc)) {
rtc 628 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->fun = fun;
rtc 647 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_dev_cleanup(rtc);
rtc 660 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = dev_rtc(dev);
rtc 663 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 664 uspace/drv/time/cmos-rtc/cmos-rtc.c if (rtc->clients_connected > 0) {
rtc 665 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 669 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->removed = true;
rtc 670 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 672 uspace/drv/time/cmos-rtc/cmos-rtc.c rc = rtc_fun_offline(rtc->fun);
rtc 678 uspace/drv/time/cmos-rtc/cmos-rtc.c rc = ddf_fun_unbind(rtc->fun);
rtc 684 uspace/drv/time/cmos-rtc/cmos-rtc.c ddf_fun_destroy(rtc->fun);
rtc 685 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_dev_cleanup(rtc);
rtc 700 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = fun_rtc(fun);
rtc 702 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 704 uspace/drv/time/cmos-rtc/cmos-rtc.c if (rtc->removed)
rtc 708 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->clients_connected++;
rtc 711 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
rtc 722 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc_t *rtc = fun_rtc(fun);
rtc 724 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_lock(&rtc->mutex);
rtc 726 uspace/drv/time/cmos-rtc/cmos-rtc.c rtc->clients_connected--;
rtc 727 uspace/drv/time/cmos-rtc/cmos-rtc.c assert(rtc->clients_connected >= 0);
rtc 729 uspace/drv/time/cmos-rtc/cmos-rtc.c fibril_mutex_unlock(&rtc->mutex);
HelenOS homepage, sources at GitHub