Home
last modified time | relevance | path

Searched +full:start +full:- +full:year (Results 1 – 25 of 109) sorted by relevance

12345

/Linux-v5.10/arch/x86/platform/intel-mid/
Dintel_mid_vrtc.c1 // SPDX-License-Identifier: GPL-2.0-only
23 #include <asm/intel-mid.h>
60 u32 year; in vrtc_get_time() local
72 year = vrtc_cmos_read(RTC_YEAR); in vrtc_get_time()
76 /* vRTC YEAR reg contains the offset to 1972 */ in vrtc_get_time()
77 year += 1972; in vrtc_get_time()
80 "mon: %d year: %d\n", sec, min, hour, mday, mon, year); in vrtc_get_time()
82 now->tv_sec = mktime64(year, mon, mday, hour, min, sec); in vrtc_get_time()
83 now->tv_nsec = 0; in vrtc_get_time()
90 int year; in vrtc_set_mmss() local
[all …]
/Linux-v5.10/arch/mips/dec/
Dtime.c1 // SPDX-License-Identifier: GPL-2.0
6 * This file contains the time handling details for PC-style clocks as
15 #include <asm/cpu-features.h>
24 unsigned int year, mon, day, hour, min, sec, real_year; in read_persistent_clock64() local
35 year = CMOS_READ(RTC_YEAR); in read_persistent_clock64()
37 * The PROM will reset the year to either '72 or '73. in read_persistent_clock64()
38 * Therefore we store the real year separately, in one in read_persistent_clock64()
52 year = bcd2bin(year); in read_persistent_clock64()
55 year += real_year - 72 + 2000; in read_persistent_clock64()
57 ts->tv_sec = mktime64(year, mon, day, hour, min, sec); in read_persistent_clock64()
[all …]
/Linux-v5.10/arch/x86/kernel/
Drtc.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <asm/intel-mid.h>
23 * CMOS/RTC registers. See include/asm-i386/mc146818rtc.h for details.
44 unsigned long long nowtime = now->tv_sec; in mach_set_rtc_mmss()
58 retval = -EINVAL; in mach_set_rtc_mmss()
65 unsigned int status, year, mon, day, hour, min, sec, century = 0; in mach_get_cmos_time() local
73 now->tv_sec = now->tv_nsec = 0; in mach_get_cmos_time()
82 * is the reliable way to read RTC - registers. If UIP is set in mach_get_cmos_time()
93 year = CMOS_READ(RTC_YEAR); in mach_get_cmos_time()
112 year = bcd2bin(year); in mach_get_cmos_time()
[all …]
/Linux-v5.10/arch/powerpc/platforms/maple/
Dtime.c1 // SPDX-License-Identifier: GPL-2.0-or-later
54 tm->tm_sec = maple_clock_read(RTC_SECONDS); in maple_get_rtc_time()
55 tm->tm_min = maple_clock_read(RTC_MINUTES); in maple_get_rtc_time()
56 tm->tm_hour = maple_clock_read(RTC_HOURS); in maple_get_rtc_time()
57 tm->tm_mday = maple_clock_read(RTC_DAY_OF_MONTH); in maple_get_rtc_time()
58 tm->tm_mon = maple_clock_read(RTC_MONTH); in maple_get_rtc_time()
59 tm->tm_year = maple_clock_read(RTC_YEAR); in maple_get_rtc_time()
60 } while (tm->tm_sec != maple_clock_read(RTC_SECONDS)); in maple_get_rtc_time()
64 tm->tm_sec = bcd2bin(tm->tm_sec); in maple_get_rtc_time()
65 tm->tm_min = bcd2bin(tm->tm_min); in maple_get_rtc_time()
[all …]
/Linux-v5.10/arch/powerpc/platforms/chrp/
Dtime.c1 // SPDX-License-Identifier: GPL-2.0
51 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init()
60 base = r.start; in chrp_time_init()
86 * Set the hardware clock. -- Cort
123 * sheets anyway ... -- Markus Kuhn in chrp_set_rtc_time()
134 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
142 year = chrp_cmos_clock_read(RTC_YEAR); in chrp_get_rtc_time()
151 year = bcd2bin(year); in chrp_get_rtc_time()
153 if (year < 70) in chrp_get_rtc_time()
154 year += 100; in chrp_get_rtc_time()
[all …]
/Linux-v5.10/arch/m68k/atari/
Dtime.c6 * Assembled of parts of former atari/config.c 97-12-18 by Roman Hodek
62 /* start timer C, div = 1:100 */ in atari_sched_init()
82 * the result may briefly stop changing after counter wrap-around. in atari_read_clk()
87 ticks = INT_TICKS - count; in atari_read_clk()
97 #define COPY(v) val->v=(mste_rtc.v & 0xf) in mste_read()
105 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_read()
111 #define COPY(v) mste_rtc.v=val->v in mste_write()
119 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_write()
141 int hour, year; in atari_mste_hwclk() local
152 val.sec_ones = t->tm_sec % 10; in atari_mste_hwclk()
[all …]
/Linux-v5.10/drivers/rtc/
Drtc-lp8788.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI LP8788 MFD - rtc driver
100 return LP8788_WDAY_SET << (tm_wday - 1); in _to_lp8788_wday()
112 struct lp8788 *lp = rtc->lp; in lp8788_rtc_read_time()
122 tm->tm_sec = data[LPTIME_SEC]; in lp8788_rtc_read_time()
123 tm->tm_min = data[LPTIME_MIN]; in lp8788_rtc_read_time()
124 tm->tm_hour = data[LPTIME_HOUR]; in lp8788_rtc_read_time()
125 tm->tm_mday = data[LPTIME_MDAY]; in lp8788_rtc_read_time()
126 tm->tm_mon = data[LPTIME_MON] - LP8788_MONTH_OFFSET; in lp8788_rtc_read_time()
127 tm->tm_year = data[LPTIME_YEAR] + LP8788_BASE_YEAR - 1900; in lp8788_rtc_read_time()
[all …]
Drtc-m48t35.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for the SGS-Thomson M48T35 Timekeeper RAM chip
28 u8 year; member
40 u8 year; member
64 * by the RTC when initially set to a non-zero value. in m48t35_read_time()
66 spin_lock_irq(&priv->lock); in m48t35_read_time()
67 control = readb(&priv->reg->control); in m48t35_read_time()
68 writeb(control | M48T35_RTC_READ, &priv->reg->control); in m48t35_read_time()
69 tm->tm_sec = readb(&priv->reg->sec); in m48t35_read_time()
70 tm->tm_min = readb(&priv->reg->min); in m48t35_read_time()
[all …]
Drtc-bq4802.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* rtc-bq4802.c: TI BQ4802 RTC driver.
32 return inb(p->ioport + off); in bq4802_read_io()
37 outb(val, p->ioport + off); in bq4802_write_io()
42 return readb(p->regs + off); in bq4802_read_mem()
47 writeb(val, p->regs + off); in bq4802_write_mem()
57 spin_lock_irqsave(&p->lock, flags); in bq4802_read_time()
59 val = p->read(p, 0x0e); in bq4802_read_time()
60 p->write(p, 0xe, val | 0x08); in bq4802_read_time()
62 tm->tm_sec = p->read(p, 0x00); in bq4802_read_time()
[all …]
Drtc-pcf8523.c1 // SPDX-License-Identifier: GPL-2.0-only
12 #define DRIVER_NAME "rtc-pcf8523"
20 #define REG_CONTROL3_PM_VDD (1 << 6) /* switch-over disabled */
23 #define REG_CONTROL3_BLF (1 << 2) /* battery low bit, read-only */
44 msgs[0].addr = client->addr; in pcf8523_read()
49 msgs[1].addr = client->addr; in pcf8523_read()
54 err = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in pcf8523_read()
69 msg.addr = client->addr; in pcf8523_write()
74 err = i2c_transfer(client->adapter, &msg, 1); in pcf8523_write()
104 of_property_read_u32(client->dev.of_node, "quartz-load-femtofarads", in pcf8523_load_capacitance()
[all …]
Drtc-sh.c1 // SPDX-License-Identifier: GPL-2.0
3 * SuperH On-Chip RTC Support
5 * Copyright (C) 2006 - 2009 Paul Mundt
38 #define DRV_NAME "sh-rtc"
50 #define RYRCNT RTC_REG(7) /* RTC year */
72 /* ALARM Bits - or with BCD encoded value */
92 #define RCR2_ADJ 0x04 /* ADJustment (30-second) */
94 #define RCR2_START 0x01 /* Start bit */
114 tmp = readb(rtc->regbase + RCR1); in __sh_rtc_interrupt()
117 writeb(tmp, rtc->regbase + RCR1); in __sh_rtc_interrupt()
[all …]
Drtc-isl12022.c1 // SPDX-License-Identifier: GPL-2.0-only
55 .addr = client->addr, in isl12022_read_regs()
61 .addr = client->addr, in isl12022_read_regs()
71 ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in isl12022_read_regs()
73 dev_err(&client->dev, "%s: read error, ret=%d\n", in isl12022_read_regs()
75 return -EIO; in isl12022_read_regs()
90 dev_err(&client->dev, in isl12022_write_reg()
93 return -EIO; in isl12022_write_reg()
102 * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
115 dev_warn(&client->dev, in isl12022_rtc_read_time()
[all …]
Drtc-m48t59.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #define NO_IRQ (-1)
25 #define M48T59_READ(reg) (pdata->read_byte(dev, pdata->offset + reg))
27 (pdata->write_byte(dev, pdata->offset + reg, val))
42 * This is the generic access method when the chip is memory-mapped
49 writeb(val, m48t59->ioaddr+ofs); in m48t59_mem_writeb()
57 return readb(m48t59->ioaddr+ofs); in m48t59_mem_readb()
70 spin_lock_irqsave(&m48t59->lock, flags); in m48t59_rtc_read_time()
74 tm->tm_year = bcd2bin(M48T59_READ(M48T59_YEAR)); in m48t59_rtc_read_time()
75 /* tm_mon is 0-11 */ in m48t59_rtc_read_time()
[all …]
Drtc-mrst.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rtc-mrst.c: Driver for Moorestown virtual RTC
15 * This driver is based upon drivers/rtc/rtc-cmos.c
37 #include <asm/intel-mid.h>
72 * rtc_time's year contains the increment over 1900, but vRTC's YEAR
74 * driver chose to use 1972 (1970 is UNIX time start point) as the base,
78 * make it consistent in leap year setting for both vrtc and low-level
80 * 1960, for a device's first use, its YEAR register is 0 and the system
81 * year will be parsed as 1960 which is not a valid UNIX time and will
92 time->tm_sec = vrtc_cmos_read(RTC_SECONDS); in mrst_read_time()
[all …]
Drtc-rx6110.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for the Epson RTC module RX-6110 SA
20 /* RX-6110 Register definitions */
104 * rx6110_rtc_tm_to_data - convert rtc_time to native time encoding
114 * The year in the RTC is a value between 0 and 99. in rx6110_rtc_tm_to_data()
118 if (tm->tm_year < 100 || tm->tm_year >= 200) in rx6110_rtc_tm_to_data()
119 return -EINVAL; in rx6110_rtc_tm_to_data()
121 data[RTC_SEC] = bin2bcd(tm->tm_sec); in rx6110_rtc_tm_to_data()
122 data[RTC_MIN] = bin2bcd(tm->tm_min); in rx6110_rtc_tm_to_data()
123 data[RTC_HOUR] = bin2bcd(tm->tm_hour); in rx6110_rtc_tm_to_data()
[all …]
Drtc-mt6397.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2014-2015 MediaTek Inc.
24 ret = regmap_write(rtc->regmap, rtc->addr_base + rtc->data->wrtgr, 1); in mtk_rtc_write_trigger()
28 ret = regmap_read_poll_timeout(rtc->regmap, in mtk_rtc_write_trigger()
29 rtc->addr_base + RTC_BBPU, data, in mtk_rtc_write_trigger()
34 dev_err(rtc->rtc_dev->dev.parent, in mtk_rtc_write_trigger()
46 ret = regmap_read(rtc->regmap, rtc->addr_base + RTC_IRQ_STA, &irqsta); in mtk_rtc_irq_handler_thread()
48 rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF); in mtk_rtc_irq_handler_thread()
50 mutex_lock(&rtc->lock); in mtk_rtc_irq_handler_thread()
51 if (regmap_write(rtc->regmap, rtc->addr_base + RTC_IRQ_EN, in mtk_rtc_irq_handler_thread()
[all …]
Drtc-pl031.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * drivers/rtc/rtc-pl031.c
12 * Copyright 2010 (c) ST-Ericsson AB
40 #define RTC_YDR 0x30 /* Year data read register */
41 #define RTC_YMR 0x34 /* Year match register */
42 #define RTC_YLR 0x38 /* Year data load register */
55 #define RTC_SEC_MASK (0x3F << RTC_SEC_SHIFT) /* Second [0-59] */
57 #define RTC_MIN_MASK (0x3F << RTC_MIN_SHIFT) /* Minute [0-59] */
59 #define RTC_HOUR_MASK (0x1F << RTC_HOUR_SHIFT) /* Hour [0-23] */
61 #define RTC_WDAY_MASK (0x7 << RTC_WDAY_SHIFT) /* Day of Week [1-7] 1=Sunday */
[all …]
/Linux-v5.10/net/netfilter/
Dxt_time.c23 u_int8_t month; /* (1-12) */
24 u_int8_t monthday; /* (1-31) */
25 u_int8_t weekday; /* (1-7) */
26 u_int8_t hour; /* (0-23) */
27 u_int8_t minute; /* (0-59) */
28 u_int8_t second; /* (0-59) */
51 /* 2039 - 2030 */
53 /* 2029 - 2020 */
55 /* 2019 - 2010 */
57 /* 2009 - 2000 */
[all …]
/Linux-v5.10/crypto/asymmetric_keys/
Dx509_cert_parser.c1 // SPDX-License-Identifier: GPL-2.0-or-later
21 unsigned long data; /* Start of data */
22 const void *cert_start; /* Start of cert content */
49 public_key_free(cert->pub); in x509_free_certificate()
50 public_key_signature_free(cert->sig); in x509_free_certificate()
51 kfree(cert->issuer); in x509_free_certificate()
52 kfree(cert->subject); in x509_free_certificate()
53 kfree(cert->id); in x509_free_certificate()
54 kfree(cert->skid); in x509_free_certificate()
70 ret = -ENOMEM; in x509_cert_parse()
[all …]
/Linux-v5.10/arch/m68k/sun3/
Dintersil.c21 /* bits to set for start/run of the intersil */
32 todintersil = (struct intersil_dt *) &intersil_clock->counter; in sun3_hwclk()
36 intersil_clock->cmd_reg = STOP_VAL; in sun3_hwclk()
40 todintersil->csec = 0; in sun3_hwclk()
41 todintersil->hour = t->tm_hour; in sun3_hwclk()
42 todintersil->minute = t->tm_min; in sun3_hwclk()
43 todintersil->second = t->tm_sec; in sun3_hwclk()
44 todintersil->month = t->tm_mon + 1; in sun3_hwclk()
45 todintersil->day = t->tm_mday; in sun3_hwclk()
46 todintersil->year = (t->tm_year - 68) % 100; in sun3_hwclk()
[all …]
/Linux-v5.10/Documentation/devicetree/bindings/rtc/
Drtc.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
18 pattern: "^rtc(@.*|-[0-9a-f])*$"
20 aux-voltage-chargeable:
29 quartz-load-femtofarads:
32 The capacitive load of the quartz(x-tal), expressed in femto
36 start-year:
40 shifted so the first usable year is the specified one.
[all …]
Dmicrocrystal,rv3032.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Microchip RV-3032 RTC Device Tree Bindings
10 - $ref: "rtc.yaml#"
13 - Alexandre Belloni <alexandre.belloni@bootlin.com>
25 start-year: true
27 trickle-resistor-ohms:
29 - 1000
30 - 2000
[all …]
/Linux-v5.10/tools/edid/
Dedid.S18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
27 #define YEAR 2012 macro
48 ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f))
74 /* Year of manufacture, less 1990. (1990-2245)
75 If week=255, it is the model year instead */
76 year: .byte YEAR-1990 label
82 Bits 6-1 Reserved, must be 0
86 Bits 6-5 Video white and sync levels, relative to blank
87 00=+0.7/-0.3 V; 01=+0.714/-0.286 V;
88 10=+1.0/-0.4 V; 11=+0.7/0 V
[all …]
/Linux-v5.10/arch/x86/pci/
Dacpi.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/pci-acpi.h>
39 printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); in set_ignore_seg()
58 .ident = "ASRock ALiveSATA2-GLAN",
60 DMI_MATCH(DMI_PRODUCT_NAME, "ALiveSATA2-GLAN"),
67 .ident = "ASUS M2V-MX SE",
70 DMI_MATCH(DMI_BOARD_NAME, "M2V-MX SE"),
77 .ident = "MSI MS-7253",
79 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
80 DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),
[all …]
/Linux-v5.10/drivers/firmware/
Ddmi_scan.c1 // SPDX-License-Identifier: GPL-2.0-only
48 const u8 *bp = ((u8 *) dm) + dm->length; in dmi_string_nosave()
52 while (--s > 0 && *bp) in dmi_string_nosave()
96 * (SMBIOS < 3.0 only) OR we reach an end-of-table marker (SMBIOS in dmi_decode_table()
101 (data - buf + sizeof(struct dmi_header)) <= dmi_len) { in dmi_decode_table()
109 data += dm->length; in dmi_decode_table()
110 while ((data - buf < dmi_len - 1) && (data[0] || data[1])) in dmi_decode_table()
112 if (data - buf < dmi_len - 1) in dmi_decode_table()
119 * 7.45 End-of-Table (Type 127) [SMBIOS reference spec v3.0.0] in dmi_decode_table()
120 * For tables behind a 64-bit entry point, we have no item in dmi_decode_table()
[all …]

12345