Home
last modified time | relevance | path

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

12345

/linux/arch/mips/dec/
H A 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/arch/powerpc/platforms/chrp/
H A Dtime.c1 // SPDX-License-Identifier: GPL-2.0
49 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init()
58 base = r.start; in chrp_time_init()
84 * Set the hardware clock. -- Cort
121 * sheets anyway ... -- Markus Kuhn in chrp_set_rtc_time()
132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
140 year = chrp_cmos_clock_read(RTC_YEAR); in chrp_get_rtc_time()
149 year = bcd2bin(year); in chrp_get_rtc_time()
151 if (year < 70) in chrp_get_rtc_time()
152 year += 100; in chrp_get_rtc_time()
[all …]
/linux/arch/m68k/atari/
H A Dtime.c6 * Assembled of parts of former atari/config.c 97-12-18 by Roman Hodek
65 /* start timer C, div = 1:100 */ in atari_sched_init()
85 * the result may briefly stop changing after counter wrap-around. in atari_read_clk()
90 ticks = INT_TICKS - count; in atari_read_clk()
100 #define COPY(v) val->v=(mste_rtc.v & 0xf) in mste_read()
108 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_read()
114 #define COPY(v) mste_rtc.v=val->v in mste_write()
122 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_write()
144 int hour, year; in atari_mste_hwclk() local
155 val.sec_ones = t->tm_sec % 10; in atari_mste_hwclk()
[all …]
/linux/drivers/rtc/
H A 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 …]
H A 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 …]
H A 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 …]
H A Drtc-renesas-rtca3.c1 // SPDX-License-Identifier: GPL-2.0
3 * On-Chip RTC Support available on RZ/G3S SoC
93 * enum rtca3_alrm_set_step - RTCA3 alarm set steps
105 * struct rtca3_ppb_per_cycle - PPB per cycle
115 * struct rtca3_priv - RTCA3 private data structure
140 tmp = readb(priv->base + off); in rtca3_byte_update_bits()
143 writeb(tmp, priv->base + off); in rtca3_byte_update_bits()
150 val = readb(priv->base + RTCA3_RSR); in rtca3_alarm_handler_helper()
152 writeb(val & ~pending, priv->base + RTCA3_RSR); in rtca3_alarm_handler_helper()
155 rtc_update_irq(priv->rtc_dev, 1, RTC_AF | RTC_IRQF); in rtca3_alarm_handler_helper()
[all …]
H A 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 …]
H A 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)) + pdata->yy_offset; in m48t59_rtc_read_time()
75 /* tm_mon is 0-11 */ in m48t59_rtc_read_time()
[all …]
H A 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 …]
H A Drtc-bd70528.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 #include <linux/mfd/rohm-bd71815.h>
9 #include <linux/mfd/rohm-bd71828.h>
18 * block start
38 u8 year; member
58 d->sec &= ~BD70528_MASK_RTC_SEC; in tmday2rtc()
59 d->min &= ~BD70528_MASK_RTC_MINUTE; in tmday2rtc()
60 d->hour &= ~BD70528_MASK_RTC_HOUR; in tmday2rtc()
61 d->sec |= bin2bcd(t->tm_sec); in tmday2rtc()
62 d->min |= bin2bcd(t->tm_min); in tmday2rtc()
[all …]
H A Drtc-rx6110.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Driver for the Epson RTC module RX-6110 SA
19 /* RX-6110 Register definitions */
103 * rx6110_rtc_tm_to_data - convert rtc_time to native time encoding
113 * The year in the RTC is a value between 0 and 99. in rx6110_rtc_tm_to_data()
117 if (tm->tm_year < 100 || tm->tm_year >= 200) in rx6110_rtc_tm_to_data()
118 return -EINVAL; in rx6110_rtc_tm_to_data()
120 data[RTC_SEC] = bin2bcd(tm->tm_sec); in rx6110_rtc_tm_to_data()
121 data[RTC_MIN] = bin2bcd(tm->tm_min); in rx6110_rtc_tm_to_data()
122 data[RTC_HOUR] = bin2bcd(tm->tm_hour); in rx6110_rtc_tm_to_data()
[all …]
/linux/net/netfilter/
H A 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/arch/m68k/sun3/
H A Dintersil.c22 /* bits to set for start/run of the intersil */
33 todintersil = (struct intersil_dt *) &intersil_clock->counter; in sun3_hwclk()
37 intersil_clock->cmd_reg = STOP_VAL; in sun3_hwclk()
41 todintersil->csec = 0; in sun3_hwclk()
42 todintersil->hour = t->tm_hour; in sun3_hwclk()
43 todintersil->minute = t->tm_min; in sun3_hwclk()
44 todintersil->second = t->tm_sec; in sun3_hwclk()
45 todintersil->month = t->tm_mon + 1; in sun3_hwclk()
46 todintersil->day = t->tm_mday; in sun3_hwclk()
47 todintersil->year = (t->tm_year - 68) % 100; in sun3_hwclk()
[all …]
/linux/Documentation/devicetree/bindings/rtc/
H A 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-9]|[1-9][0-9]+))?$"
20 aux-voltage-chargeable:
29 quartz-load-femtofarads:
31 The capacitive load of the quartz(x-tal), expressed in femto
35 start-year:
39 shifted so the first usable year is the specified one.
[all …]
H A Dnuvoton,nct3018y.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - $ref: rtc.yaml#
13 - Medad CChien <ctcchien@nuvoton.com>
14 - Mia Lin <mimi05633@gmail.com>
23 start-year: true
25 reset-source: true
28 - compatible
29 - reg
[all …]
H A Dti,bq32000.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: TI BQ32000 I2C Serial Real-Time Clock
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: rtc.yaml#
25 start-year: true
27 trickle-resistor-ohms:
30 trickle-diode-disable: true
33 - compatible
[all …]
H A Dnxp,pcf8563.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: rtc.yaml#
18 - epson,rtc8564
19 - microcrystal,rv8564
20 - nxp,pca8565
21 - nxp,pcf8563
26 "#clock-cells":
[all …]
H A Darm,pl031.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
15 - compatible
18 - $ref: rtc.yaml#
21 - Rob Herring <robh@kernel.org>
26 - const: arm,pl031
27 - const: arm,primecell
38 clock-names:
41 start-year: true
[all …]
H A Dmstar,msc313-rtc.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/rtc/mstar,msc313-rtc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - $ref: rtc.yaml#
13 - Daniel Palmer <daniel@0x0f.com>
14 - Romain Perier <romain.perier@gmail.com>
19 - mstar,msc313-rtc
27 start-year: true
33 - compatible
[all …]
H A Dnxp,pcf2127.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - $ref: rtc.yaml#
13 - Alexandre Belloni <alexandre.belloni@bootlin.com>
18 - nxp,pca2129
19 - nxp,pcf2127
20 - nxp,pcf2129
21 - nxp,pcf2131
29 start-year: true
[all …]
H A Dnxp,pcf85363.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Alexandre Belloni <alexandre.belloni@bootlin.com>
13 - $ref: rtc.yaml#
18 - nxp,pcf85263
19 - nxp,pcf85363
24 "#clock-cells":
27 clock-output-names:
33 quartz-load-femtofarads:
[all …]
H A 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
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/crypto/asymmetric_keys/
H A Dx509_cert_parser.c1 // SPDX-License-Identifier: GPL-2.0-or-later
21 unsigned long data; /* Start of data */
47 public_key_free(cert->pub); in x509_free_certificate()
48 public_key_signature_free(cert->sig); in x509_free_certificate()
49 kfree(cert->issuer); in x509_free_certificate()
50 kfree(cert->subject); in x509_free_certificate()
51 kfree(cert->id); in x509_free_certificate()
52 kfree(cert->skid); in x509_free_certificate()
70 return ERR_PTR(-ENOMEM); in x509_cert_parse()
71 cert->pub = kzalloc(sizeof(struct public_key), GFP_KERNEL); in x509_cert_parse()
[all …]
/linux/drivers/firmware/
H A Ddmi_scan.c1 // SPDX-License-Identifier: GPL-2.0-only
49 const u8 *bp = ((u8 *) dm) + dm->length; in dmi_string_nosave()
53 while (--s > 0 && *bp) in dmi_string_nosave()
97 * (SMBIOS < 3.0 only) OR we reach an end-of-table marker (SMBIOS in dmi_decode_table()
102 (data - buf + sizeof(struct dmi_header)) <= dmi_len) { in dmi_decode_table()
109 if (dm->length < sizeof(struct dmi_header)) { in dmi_decode_table()
112 data - buf, i); in dmi_decode_table()
121 data += dm->length; in dmi_decode_table()
122 while ((data - buf < dmi_len - 1) && (data[0] || data[1])) in dmi_decode_table()
124 if (data - buf < dmi_len - 1) in dmi_decode_table()
[all …]

12345