/linux-2.6.39/arch/m68k/atari/ |
D | time.c | 109 int hour, year; in atari_mste_hwclk() local 124 hour = t->tm_hour; in atari_mste_hwclk() 126 if (hour > 11) in atari_mste_hwclk() 127 hour += 20 - 12; in atari_mste_hwclk() 128 if (hour == 0 || hour == 20) in atari_mste_hwclk() 129 hour += 12; in atari_mste_hwclk() 131 val.hr_ones = hour % 10; in atari_mste_hwclk() 132 val.hr_tens = hour / 10; in atari_mste_hwclk() 150 hour = val.hr_ones + val.hr_tens * 10; in atari_mste_hwclk() 152 if (hour == 12 || hour == 12 + 20) in atari_mste_hwclk() [all …]
|
/linux-2.6.39/arch/mips/sibyte/swarm/ |
D | rtc_xicor1241.c | 173 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local 179 hour = xicor_read(X1241REG_HR); in xicor_get_time() 181 if (hour & X1241REG_HR_MIL) { in xicor_get_time() 182 hour &= 0x3f; in xicor_get_time() 184 if (hour & 0x20) in xicor_get_time() 185 hour = (hour & 0xf) + 0x12; in xicor_get_time() 196 hour = bcd2bin(hour); in xicor_get_time() 204 return mktime(year, mon, day, hour, min, sec); in xicor_get_time()
|
D | rtc_m41t81.c | 193 unsigned int year, mon, day, hour, min, sec; in m41t81_get_time() local 206 hour = m41t81_read(M41T81REG_HR) & 0x3f; in m41t81_get_time() 214 hour = bcd2bin(hour); in m41t81_get_time() 221 return mktime(year, mon, day, hour, min, sec); in m41t81_get_time()
|
/linux-2.6.39/arch/h8300/kernel/ |
D | time.c | 44 unsigned int year, mon, day, hour, min, sec; in read_persistent_clock() local 51 hour = min = sec = 0; in read_persistent_clock() 53 h8300_gettod (&year, &mon, &day, &hour, &min, &sec); in read_persistent_clock() 57 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
|
/linux-2.6.39/arch/frv/kernel/ |
D | time.c | 91 unsigned int year, mon, day, hour, min, sec; in read_persistent_clock() local 93 extern void arch_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec); in read_persistent_clock() 100 hour = min = sec = 0; in read_persistent_clock() 101 arch_gettod (&year, &mon, &day, &hour, &min, &sec); in read_persistent_clock() 105 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
|
/linux-2.6.39/drivers/rtc/ |
D | rtc-ds1216.c | 20 u8 hour; member 92 if (regs.hour & DS1216_HOUR_1224) { in ds1216_rtc_read_time() 94 tm->tm_hour = bcd2bin(regs.hour & 0x1f); in ds1216_rtc_read_time() 95 if (regs.hour & DS1216_HOUR_AMPM) in ds1216_rtc_read_time() 98 tm->tm_hour = bcd2bin(regs.hour & 0x3f); in ds1216_rtc_read_time() 121 regs.hour &= DS1216_HOUR_1224; in ds1216_rtc_set_time() 122 if (regs.hour && tm->tm_hour > 12) { in ds1216_rtc_set_time() 123 regs.hour |= DS1216_HOUR_AMPM; in ds1216_rtc_set_time() 126 regs.hour |= bin2bcd(tm->tm_hour); in ds1216_rtc_set_time()
|
D | rtc-s35390a.c | 104 static char s35390a_hr2reg(struct s35390a *s35390a, int hour) in s35390a_hr2reg() argument 107 return bin2bcd(hour); in s35390a_hr2reg() 109 if (hour < 12) in s35390a_hr2reg() 110 return bin2bcd(hour); in s35390a_hr2reg() 112 return 0x40 | bin2bcd(hour - 12); in s35390a_hr2reg() 117 unsigned hour; in s35390a_reg2hr() local 122 hour = bcd2bin(reg & 0x3f); in s35390a_reg2hr() 124 hour += 12; in s35390a_reg2hr() 126 return hour; in s35390a_reg2hr()
|
D | rtc-rs5c372.c | 149 unsigned hour; in rs5c_reg2hr() local 154 hour = bcd2bin(reg & 0x1f); in rs5c_reg2hr() 155 if (hour == 12) in rs5c_reg2hr() 156 hour = 0; in rs5c_reg2hr() 158 hour += 12; in rs5c_reg2hr() 159 return hour; in rs5c_reg2hr() 162 static unsigned rs5c_hr2reg(struct rs5c372 *rs5c, unsigned hour) in rs5c_hr2reg() argument 165 return bin2bcd(hour); in rs5c_hr2reg() 167 if (hour > 12) in rs5c_hr2reg() 168 return 0x20 | bin2bcd(hour - 12); in rs5c_hr2reg() [all …]
|
D | rtc-m41t94.c | 63 int ret, hour; in m41t94_read_time() local 87 hour = spi_w8r8(spi, M41T94_REG_HOURS); in m41t94_read_time() 88 tm->tm_hour = bcd2bin(hour & 0x3f); in m41t94_read_time() 93 if ((hour & M41T94_BIT_CB) || !(hour & M41T94_BIT_CEB)) in m41t94_read_time()
|
D | rtc-mv.c | 69 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_time() local 76 hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hours mode */ in mv_rtc_read_time() 85 tm->tm_hour = bcd2bin(hour); in mv_rtc_read_time() 100 unsigned int year, month, day, hour, minute, second, wday; in mv_rtc_read_alarm() local 107 hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hours mode */ in mv_rtc_read_alarm() 116 alm->time.tm_hour = bcd2bin(hour); in mv_rtc_read_alarm()
|
D | rtc-ds1305.c | 111 unsigned hour = 0; in bcd2hour() local 115 hour = 12; in bcd2hour() 118 hour += bcd2bin(bcd); in bcd2hour() 119 return hour - 1; in bcd2hour() 124 static u8 hour2bcd(bool hr12, int hour) in hour2bcd() argument 127 hour++; in hour2bcd() 128 if (hour <= 12) in hour2bcd() 129 return DS1305_HR_12 | bin2bcd(hour); in hour2bcd() 130 hour -= 12; in hour2bcd() 131 return DS1305_HR_12 | DS1305_HR_PM | bin2bcd(hour); in hour2bcd() [all …]
|
D | rtc-ds3232.c | 105 unsigned int year, month, day, hour, minute, second; in ds3232_read_time() local 118 hour = buf[2]; in ds3232_read_time() 126 twelve_hr = hour & 0x40; in ds3232_read_time() 127 am_pm = hour & 0x20; in ds3232_read_time() 137 time->tm_hour = bcd2bin(hour & 0x1F) + 12; in ds3232_read_time() 139 time->tm_hour = bcd2bin(hour & 0x1F); in ds3232_read_time() 141 time->tm_hour = bcd2bin(hour); in ds3232_read_time()
|
/linux-2.6.39/arch/m68k/kernel/ |
D | time_no.c | 57 unsigned int year, mon, day, hour, min, sec; in read_rtc_mmss() local 60 mach_gettod(&year, &mon, &day, &hour, &min, &sec); in read_rtc_mmss() 66 hour = min = sec = 0; in read_rtc_mmss() 70 return mktime(year, mon, day, hour, min, sec); in read_rtc_mmss()
|
/linux-2.6.39/arch/mips/include/asm/ |
D | mc146818-time.h | 91 unsigned int year, mon, day, hour, min, sec; in mc146818_get_cmos_time() local 99 hour = CMOS_READ(RTC_HOURS); in mc146818_get_cmos_time() 108 hour = bcd2bin(hour); in mc146818_get_cmos_time() 116 return mktime(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
/linux-2.6.39/arch/cris/kernel/ |
D | time.c | 103 unsigned int year, mon, day, hour, min, sec; in get_cmos_time() local 109 hour = CMOS_READ(RTC_HOURS); in get_cmos_time() 116 hour = bcd2bin(hour); in get_cmos_time() 124 return mktime(year, mon, day, hour, min, sec); in get_cmos_time()
|
/linux-2.6.39/arch/mips/dec/ |
D | time.c | 23 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock() local 31 hour = CMOS_READ(RTC_HOURS); in read_persistent_clock() 48 hour = bcd2bin(hour); in read_persistent_clock() 56 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
|
/linux-2.6.39/arch/mips/pmc-sierra/yosemite/ |
D | setup.c | 75 unsigned int year, month, day, hour, min, sec; in read_persistent_clock() local 87 hour = bcd2bin(m48t37_base->hour); in read_persistent_clock() 95 ts->tv_sec = mktime(year, month, day, hour, min, sec); in read_persistent_clock() 127 m48t37_base->hour = bin2bcd(tm.tm_hour); in rtc_mips_set_time()
|
/linux-2.6.39/arch/powerpc/platforms/chrp/ |
D | time.c | 131 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local 136 hour = chrp_cmos_clock_read(RTC_HOURS); in chrp_get_rtc_time() 145 hour = bcd2bin(hour); in chrp_get_rtc_time() 154 tm->tm_hour = hour; in chrp_get_rtc_time()
|
/linux-2.6.39/arch/sh/boards/mach-sh03/ |
D | rtc.c | 42 unsigned int year, mon, day, hour, min, sec; in get_cmos_time() local 49 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in get_cmos_time() 57 hour > 23 || min > 59 || sec > 59) { in get_cmos_time() 61 year, mon, day, hour, min, sec); in get_cmos_time() 77 return mktime(year, mon, day, hour, min, sec); in get_cmos_time()
|
/linux-2.6.39/fs/isofs/ |
D | util.c | 19 int year, month, day, hour, minute, second, tz; in iso_date() local 25 hour = p[3]; in iso_date() 44 crtime = ((((days * 24) + hour) * 60 + minute) * 60) in iso_date()
|
/linux-2.6.39/arch/powerpc/platforms/maple/ |
D | time.c | 87 int sec, min, hour, mon, mday, year; in maple_set_rtc_time() local 101 hour = tm->tm_hour; in maple_set_rtc_time() 109 hour = bin2bcd(hour); in maple_set_rtc_time() 116 maple_clock_write(hour, RTC_HOURS); in maple_set_rtc_time()
|
/linux-2.6.39/arch/x86/platform/mrst/ |
D | vrtc.c | 60 u8 sec, min, hour, mday, mon; in vrtc_get_time() local 68 hour = vrtc_cmos_read(RTC_HOURS); in vrtc_get_time() 77 "mon: %d year: %d\n", sec, min, hour, mday, mon, year); in vrtc_get_time() 79 return mktime(year, mon, mday, hour, min, sec); in vrtc_get_time()
|
/linux-2.6.39/arch/x86/kernel/ |
D | rtc.c | 101 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local 114 hour = CMOS_READ(RTC_HOURS); in mach_get_cmos_time() 131 hour = bcd2bin(hour); in mach_get_cmos_time() 144 return mktime(year, mon, day, hour, min, sec); in mach_get_cmos_time()
|
/linux-2.6.39/arch/m32r/kernel/ |
D | time.c | 143 unsigned int epoch, year, mon, day, hour, min, sec; in read_persistent_clock() local 145 sec = min = hour = day = mon = year = 0; in read_persistent_clock() 161 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
|
/linux-2.6.39/arch/alpha/kernel/ |
D | time.c | 121 unsigned int year, mon, day, hour, min, sec, epoch; in read_persistent_clock() local 125 hour = CMOS_READ(RTC_HOURS); in read_persistent_clock() 133 hour = bcd2bin(hour); in read_persistent_clock() 155 ts->tv_sec = mktime(year, mon, day, hour, min, sec); in read_persistent_clock()
|