Lines Matching refs:day
86 s32 day; in rtd119x_rtc_read_time() local
95 day = readl_relaxed(data->base + RTD_RTCDATE1) & RTD_RTCDATE1_RTCDATE1_MASK; in rtd119x_rtc_read_time()
96 day |= (readl_relaxed(data->base + RTD_RTCDATE2) & RTD_RTCDATE2_RTCDATE2_MASK) << 8; in rtd119x_rtc_read_time()
110 while (day >= rtd119x_rtc_days_in_year(year)) { in rtd119x_rtc_read_time()
111 day -= rtd119x_rtc_days_in_year(year); in rtd119x_rtc_read_time()
115 tm->tm_yday = day; in rtd119x_rtc_read_time()
118 while (day >= rtc_month_days(tm->tm_mon, year)) { in rtd119x_rtc_read_time()
119 day -= rtc_month_days(tm->tm_mon, year); in rtd119x_rtc_read_time()
122 tm->tm_mday = day + 1; in rtd119x_rtc_read_time()
130 unsigned int day; in rtd119x_rtc_set_time() local
136 day = 0; in rtd119x_rtc_set_time()
138 day += rtd119x_rtc_days_in_year(i); in rtd119x_rtc_set_time()
140 day += tm->tm_yday; in rtd119x_rtc_set_time()
141 if (day > 0x7fff) in rtd119x_rtc_set_time()
149 writel_relaxed(day & RTD_RTCDATE1_RTCDATE1_MASK, data->base + RTD_RTCDATE1); in rtd119x_rtc_set_time()
150 writel_relaxed((day >> 8) & RTD_RTCDATE2_RTCDATE2_MASK, data->base + RTD_RTCDATE2); in rtd119x_rtc_set_time()