/kernel/linux/linux-5.10/arch/m68k/atari/ |
H A D | time.c | 141 int hour, year; in atari_mste_hwclk() local 156 hour = t->tm_hour; in atari_mste_hwclk() 158 if (hour > 11) in atari_mste_hwclk() 159 hour += 20 - 12; in atari_mste_hwclk() 160 if (hour == 0 || hour == 20) in atari_mste_hwclk() 161 hour += 12; in atari_mste_hwclk() 163 val.hr_ones = hour % 10; in atari_mste_hwclk() 164 val.hr_tens = hour / 10; in atari_mste_hwclk() 182 hour in atari_mste_hwclk() 200 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; atari_tt_hwclk() local [all...] |
/kernel/linux/linux-6.6/arch/m68k/atari/ |
H A D | time.c | 142 int hour, year; in atari_mste_hwclk() local 157 hour = t->tm_hour; in atari_mste_hwclk() 159 if (hour > 11) in atari_mste_hwclk() 160 hour += 20 - 12; in atari_mste_hwclk() 161 if (hour == 0 || hour == 20) in atari_mste_hwclk() 162 hour += 12; in atari_mste_hwclk() 164 val.hr_ones = hour % 10; in atari_mste_hwclk() 165 val.hr_tens = hour / 10; in atari_mste_hwclk() 183 hour in atari_mste_hwclk() 201 int sec=0, min=0, hour=0, day=0, mon=0, year=0, wday=0; atari_tt_hwclk() local [all...] |
/kernel/linux/linux-5.10/drivers/rtc/ |
H A D | rtc-ds1216.c | 19 u8 hour; member 88 if (regs.hour & DS1216_HOUR_1224) { in ds1216_rtc_read_time() 90 tm->tm_hour = bcd2bin(regs.hour & 0x1f); in ds1216_rtc_read_time() 91 if (regs.hour & DS1216_HOUR_AMPM) in ds1216_rtc_read_time() 94 tm->tm_hour = bcd2bin(regs.hour & 0x3f); in ds1216_rtc_read_time() 116 regs.hour &= DS1216_HOUR_1224; in ds1216_rtc_set_time() 117 if (regs.hour && tm->tm_hour > 12) { in ds1216_rtc_set_time() 118 regs.hour |= DS1216_HOUR_AMPM; in ds1216_rtc_set_time() 121 regs.hour |= bin2bcd(tm->tm_hour); in ds1216_rtc_set_time()
|
H A D | rtc-ftrtc010.c | 68 u32 days, hour, min, sec, offset; in ftrtc010_rtc_read_time() local 73 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_read_time() 77 time = offset + days * 86400 + hour * 3600 + min * 60 + sec; in ftrtc010_rtc_read_time() 87 u32 sec, min, hour, day, offset; in ftrtc010_rtc_set_time() local 94 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_set_time() 97 offset = time - (day * 86400 + hour * 3600 + min * 60 + sec); in ftrtc010_rtc_set_time() 112 u32 days, hour, min, sec; in ftrtc010_rtc_probe() local 167 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_probe() 170 rtc->rtc_dev->range_min = (u64)days * 86400 + hour * 3600 + in ftrtc010_rtc_probe()
|
H A D | rtc-rc5t619.c | 42 static uint8_t rtc5t619_12hour_bcd2bin(uint8_t hour) in rtc5t619_12hour_bcd2bin() argument 44 if (hour & HOUR_PMFLAG) { in rtc5t619_12hour_bcd2bin() 45 hour = bcd2bin(hour & ~HOUR_PMFLAG); in rtc5t619_12hour_bcd2bin() 46 return hour == 12 ? 12 : 12 + hour; in rtc5t619_12hour_bcd2bin() 49 hour = bcd2bin(hour); in rtc5t619_12hour_bcd2bin() 50 return hour == 12 ? 0 : hour; in rtc5t619_12hour_bcd2bin() 53 rtc5t619_12hour_bin2bcd(uint8_t hour) rtc5t619_12hour_bin2bcd() argument [all...] |
/kernel/linux/linux-6.6/drivers/rtc/ |
H A D | rtc-ds1216.c | 19 u8 hour; member 88 if (regs.hour & DS1216_HOUR_1224) { in ds1216_rtc_read_time() 90 tm->tm_hour = bcd2bin(regs.hour & 0x1f); in ds1216_rtc_read_time() 91 if (regs.hour & DS1216_HOUR_AMPM) in ds1216_rtc_read_time() 94 tm->tm_hour = bcd2bin(regs.hour & 0x3f); in ds1216_rtc_read_time() 116 regs.hour &= DS1216_HOUR_1224; in ds1216_rtc_set_time() 117 if (regs.hour && tm->tm_hour > 12) { in ds1216_rtc_set_time() 118 regs.hour |= DS1216_HOUR_AMPM; in ds1216_rtc_set_time() 121 regs.hour |= bin2bcd(tm->tm_hour); in ds1216_rtc_set_time()
|
H A D | rtc-ftrtc010.c | 68 u32 days, hour, min, sec, offset; in ftrtc010_rtc_read_time() local 73 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_read_time() 77 time = offset + days * 86400 + hour * 3600 + min * 60 + sec; in ftrtc010_rtc_read_time() 87 u32 sec, min, hour, day, offset; in ftrtc010_rtc_set_time() local 94 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_set_time() 97 offset = time - (day * 86400 + hour * 3600 + min * 60 + sec); in ftrtc010_rtc_set_time() 112 u32 days, hour, min, sec; in ftrtc010_rtc_probe() local 173 hour = readl(rtc->rtc_base + FTRTC010_RTC_HOUR); in ftrtc010_rtc_probe() 176 rtc->rtc_dev->range_min = (u64)days * 86400 + hour * 3600 + in ftrtc010_rtc_probe()
|
H A D | rtc-rc5t619.c | 42 static uint8_t rtc5t619_12hour_bcd2bin(uint8_t hour) in rtc5t619_12hour_bcd2bin() argument 44 if (hour & HOUR_PMFLAG) { in rtc5t619_12hour_bcd2bin() 45 hour = bcd2bin(hour & ~HOUR_PMFLAG); in rtc5t619_12hour_bcd2bin() 46 return hour == 12 ? 12 : 12 + hour; in rtc5t619_12hour_bcd2bin() 49 hour = bcd2bin(hour); in rtc5t619_12hour_bcd2bin() 50 return hour == 12 ? 0 : hour; in rtc5t619_12hour_bcd2bin() 53 rtc5t619_12hour_bin2bcd(uint8_t hour) rtc5t619_12hour_bin2bcd() argument [all...] |
H A D | rtc-bd70528.c | 30 u8 hour; member 60 d->hour &= ~BD70528_MASK_RTC_HOUR; in tmday2rtc() 63 d->hour |= bin2bcd(t->tm_hour); in tmday2rtc() 75 r->time.hour &= ~(BD70528_MASK_RTC_HOUR_PM | BD70528_MASK_RTC_HOUR_24H); in tm2rtc() 81 r->time.hour |= BD70528_MASK_RTC_HOUR_24H; in tm2rtc() 92 t->tm_hour = bcd2bin(r->time.hour & BD70528_MASK_RTC_HOUR); in rtc2tm() 97 if (!(r->time.hour & BD70528_MASK_RTC_HOUR_24H)) { in rtc2tm() 99 if (r->time.hour & BD70528_MASK_RTC_HOUR_PM) in rtc2tm()
|
/kernel/linux/linux-5.10/arch/mips/sibyte/swarm/ |
H A D | rtc_xicor1241.c | 143 /* hour is the most tricky one */ in xicor_set_time() 146 /* 24 hour format */ in xicor_set_time() 150 /* 12 hour format, with 0x2 for pm */ in xicor_set_time() 169 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local 175 hour = xicor_read(X1241REG_HR); in xicor_get_time() 177 if (hour & X1241REG_HR_MIL) { in xicor_get_time() 178 hour &= 0x3f; in xicor_get_time() 180 if (hour & 0x20) in xicor_get_time() 181 hour = (hour in xicor_get_time() [all...] |
/kernel/linux/linux-6.6/arch/mips/sibyte/swarm/ |
H A D | rtc_xicor1241.c | 143 /* hour is the most tricky one */ in xicor_set_time() 146 /* 24 hour format */ in xicor_set_time() 150 /* 12 hour format, with 0x2 for pm */ in xicor_set_time() 169 unsigned int year, mon, day, hour, min, sec, y2k; in xicor_get_time() local 175 hour = xicor_read(X1241REG_HR); in xicor_get_time() 177 if (hour & X1241REG_HR_MIL) { in xicor_get_time() 178 hour &= 0x3f; in xicor_get_time() 180 if (hour & 0x20) in xicor_get_time() 181 hour = (hour in xicor_get_time() [all...] |
/kernel/linux/linux-5.10/arch/mips/include/asm/ |
H A D | mc146818-time.h | 28 * BUG: This routine does not handle hour overflow properly; it just 51 * don't interfere with hour overflow. This avoids in mc146818_set_rtc_mmss() 58 real_minutes += 30; /* correct for half hour time zone */ in mc146818_set_rtc_mmss() 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 mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
/kernel/linux/linux-6.6/arch/mips/include/asm/ |
H A D | mc146818-time.h | 28 * BUG: This routine does not handle hour overflow properly; it just 51 * don't interfere with hour overflow. This avoids in mc146818_set_rtc_mmss() 58 real_minutes += 30; /* correct for half hour time zone */ in mc146818_set_rtc_mmss() 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 mktime64(year, mon, day, hour, min, sec); in mc146818_get_cmos_time()
|
/kernel/linux/linux-5.10/arch/mips/dec/ |
H A D | time.c | 24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local 32 hour = CMOS_READ(RTC_HOURS); in read_persistent_clock64() 49 hour = bcd2bin(hour); in read_persistent_clock64() 57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64() 91 * don't interfere with hour overflow. This avoids in update_persistent_clock64() 97 real_minutes += 30; /* correct for half hour time zone */ in update_persistent_clock64()
|
/kernel/linux/linux-6.6/arch/mips/dec/ |
H A D | time.c | 24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local 32 hour = CMOS_READ(RTC_HOURS); in read_persistent_clock64() 49 hour = bcd2bin(hour); in read_persistent_clock64() 57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64() 91 * don't interfere with hour overflow. This avoids in update_persistent_clock64() 97 real_minutes += 30; /* correct for half hour time zone */ in update_persistent_clock64()
|
/kernel/linux/linux-5.10/arch/loongarch/loongson64/ |
H A D | rtc.c | 16 unsigned int year, mon, day, hour, min, sec; in loongson_get_rtc_time() local 22 hour = (value >> 16) & 0x1f; in loongson_get_rtc_time() 29 return mktime64(year, mon, day, hour, min, sec); in loongson_get_rtc_time()
|
/kernel/linux/linux-5.10/fs/isofs/ |
H A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 27 hour = p[3]; in iso_date() 36 crtime = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
|
/kernel/linux/linux-6.6/fs/isofs/ |
H A D | util.c | 21 int year, month, day, hour, minute, second, tz; in iso_date() local 27 hour = p[3]; in iso_date() 36 crtime = mktime64(year+1900, month, day, hour, minute, second); in iso_date()
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/maple/ |
H A D | time.c | 80 int sec, min, hour, mon, mday, year; in maple_set_rtc_time() local 94 hour = tm->tm_hour; in maple_set_rtc_time() 102 hour = bin2bcd(hour); in maple_set_rtc_time() 109 maple_clock_write(hour, RTC_HOURS); in maple_set_rtc_time()
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/chrp/ |
H A D | time.c | 134 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local 139 hour = chrp_cmos_clock_read(RTC_HOURS); in chrp_get_rtc_time() 148 hour = bcd2bin(hour); in chrp_get_rtc_time() 157 tm->tm_hour = hour; in chrp_get_rtc_time()
|
/kernel/linux/linux-5.10/arch/sh/boards/mach-sh03/ |
H A D | rtc.c | 44 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 51 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday() 59 hour > 23 || min > 59 || sec > 59) { in sh03_rtc_gettimeofday() 62 printk("year=%d, mon=%d, day=%d, hour=%d, min=%d, sec=%d\n", in sh03_rtc_gettimeofday() 63 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday() 82 tm->tm_hour = hour; in sh03_rtc_gettimeofday() 105 real_minutes += 30; /* correct for half hour time zone */ in set_rtc_mmss()
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
H A D | rtc.c | 65 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local 90 hour = CMOS_READ(RTC_HOURS); in mach_get_cmos_time() 109 hour = bcd2bin(hour); in mach_get_cmos_time() 121 now->tv_sec = mktime64(year, mon, day, hour, min, sec); in mach_get_cmos_time()
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/chrp/ |
H A D | time.c | 132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local 137 hour = chrp_cmos_clock_read(RTC_HOURS); in chrp_get_rtc_time() 146 hour = bcd2bin(hour); in chrp_get_rtc_time() 155 tm->tm_hour = hour; in chrp_get_rtc_time()
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/maple/ |
H A D | time.c | 80 int sec, min, hour, mon, mday, year; in maple_set_rtc_time() local 94 hour = tm->tm_hour; in maple_set_rtc_time() 102 hour = bin2bcd(hour); in maple_set_rtc_time() 109 maple_clock_write(hour, RTC_HOURS); in maple_set_rtc_time()
|
/kernel/linux/linux-6.6/arch/sh/boards/mach-sh03/ |
H A D | rtc.c | 43 unsigned int year, mon, day, hour, min, sec; in sh03_rtc_gettimeofday() local 50 hour = (__raw_readb(RTC_HOU1) & 0xf) + (__raw_readb(RTC_HOU10) & 0xf) * 10; in sh03_rtc_gettimeofday() 58 hour > 23 || min > 59 || sec > 59) { in sh03_rtc_gettimeofday() 61 printk("year=%d, mon=%d, day=%d, hour=%d, min=%d, sec=%d\n", in sh03_rtc_gettimeofday() 62 year, mon, day, hour, min, sec); in sh03_rtc_gettimeofday() 81 tm->tm_hour = hour; in sh03_rtc_gettimeofday() 104 real_minutes += 30; /* correct for half hour time zone */ in set_rtc_mmss()
|