Lines Matching defs:dt
78 struct clock_ymdhms dt;
91 if (a34kbbc_read(ztwomap(0xdc0000), &dt) != 0)
118 a34kbbc_read(volatile struct rtclock3000 *rt, struct clock_ymdhms *dt)
125 dt->dt_sec = rt->second1 * 10 + rt->second2;
126 dt->dt_min = rt->minute1 * 10 + rt->minute2;
127 dt->dt_hour = rt->hour1 * 10 + rt->hour2;
128 dt->dt_wday = rt->weekday;
129 dt->dt_day = rt->day1 * 10 + rt->day2;
130 dt->dt_mon = rt->month1 * 10 + rt->month2;
131 dt->dt_year = rt->year1 * 10 + rt->year2;
133 dt->dt_year += CLOCK_BASE_YEAR;
137 if (dt->dt_year < STARTOFTIME)
138 dt->dt_year += 100;
146 if ((dt->dt_hour > 23) ||
147 (dt->dt_wday > 6) ||
148 (dt->dt_day > 31) ||
149 (dt->dt_mon > 12) ||
150 /* (dt.dt_year < STARTOFTIME) || */ (dt->dt_year > 2036))
157 a34kugettod(todr_chip_handle_t h, struct clock_ymdhms *dt)
161 return a34kbbc_read(sc->sc_addr, dt);
165 a34kusettod(todr_chip_handle_t h, struct clock_ymdhms *dt)
176 rt->second1 = dt->dt_sec / 10;
177 rt->second2 = dt->dt_sec % 10;
178 rt->minute1 = dt->dt_min / 10;
179 rt->minute2 = dt->dt_min % 10;
180 rt->hour1 = dt->dt_hour / 10;
181 rt->hour2 = dt->dt_hour % 10;
182 rt->weekday = dt->dt_wday;
183 rt->day1 = dt->dt_day / 10;
184 rt->day2 = dt->dt_day % 10;
185 rt->month1 = dt->dt_mon / 10;
186 rt->month2 = dt->dt_mon % 10;
187 rt->year1 = (dt->dt_year / 10) % 10;
188 rt->year2 = dt->dt_year % 10;
190 rt->leapyear = dt->dt_year; /* XXX implicit % 4 */