/Linux-v6.1/arch/mips/dec/ |
D | time.c | 1 // 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-v6.1/arch/powerpc/platforms/maple/ |
D | time.c | 1 // 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-v6.1/arch/powerpc/platforms/chrp/ |
D | time.c | 1 // 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-v6.1/arch/m68k/atari/ |
D | time.c | 6 * Assembled of parts of former atari/config.c 97-12-18 by Roman Hodek 63 /* start timer C, div = 1:100 */ in atari_sched_init() 83 * the result may briefly stop changing after counter wrap-around. in atari_read_clk() 88 ticks = INT_TICKS - count; in atari_read_clk() 98 #define COPY(v) val->v=(mste_rtc.v & 0xf) in mste_read() 106 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_read() 112 #define COPY(v) mste_rtc.v=val->v in mste_write() 120 } while (val->sec_ones != (mste_rtc.sec_ones & 0xf)); in mste_write() 142 int hour, year; in atari_mste_hwclk() local 153 val.sec_ones = t->tm_sec % 10; in atari_mste_hwclk() [all …]
|
/Linux-v6.1/drivers/rtc/ |
D | rtc-lp8788.c | 1 // 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 …]
|
D | rtc-m48t35.c | 1 // 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 …]
|
D | rtc-bq4802.c | 1 // 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 …]
|
D | rtc-sh.c | 1 // 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 …]
|
D | rtc-m48t59.c | 1 // 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 …]
|
D | rtc-mt6397.c | 1 // 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 …]
|
D | rtc-pl031.c | 1 // 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 …]
|
D | rtc-bd70528.c | 1 // 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 …]
|
D | rtc-rx6110.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Driver for the Epson RTC module RX-6110 SA 21 /* RX-6110 Register definitions */ 105 * rx6110_rtc_tm_to_data - convert rtc_time to native time encoding 115 * The year in the RTC is a value between 0 and 99. in rx6110_rtc_tm_to_data() 119 if (tm->tm_year < 100 || tm->tm_year >= 200) in rx6110_rtc_tm_to_data() 120 return -EINVAL; in rx6110_rtc_tm_to_data() 122 data[RTC_SEC] = bin2bcd(tm->tm_sec); in rx6110_rtc_tm_to_data() 123 data[RTC_MIN] = bin2bcd(tm->tm_min); in rx6110_rtc_tm_to_data() 124 data[RTC_HOUR] = bin2bcd(tm->tm_hour); in rx6110_rtc_tm_to_data() [all …]
|
/Linux-v6.1/net/netfilter/ |
D | xt_time.c | 23 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-v6.1/arch/m68k/sun3/ |
D | intersil.c | 21 /* 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-v6.1/Documentation/devicetree/bindings/rtc/ |
D | rtc.yaml | 1 # 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: 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 …]
|
D | nuvoton,nct3018y.yaml | 1 # 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 …]
|
D | ti,bq32000.yaml | 1 # 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 …]
|
D | arm,pl031.yaml | 1 # 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 …]
|
D | mstar,msc313-rtc.yaml | 1 # 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 …]
|
D | nxp,pcf8563.yaml | 1 # 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 22 - nxp,pcf85263 [all …]
|
/Linux-v6.1/tools/edid/ |
D | edid.S | 18 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-v6.1/arch/x86/pci/ |
D | acpi.c | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <linux/pci-acpi.h> 40 printk(KERN_INFO "PCI: %s detected: ignoring ACPI _SEG\n", id->ident); in set_ignore_seg() 48 id->ident); in set_no_e820() 67 .ident = "ASRock ALiveSATA2-GLAN", 69 DMI_MATCH(DMI_PRODUCT_NAME, "ALiveSATA2-GLAN"), 76 .ident = "ASUS M2V-MX SE", 79 DMI_MATCH(DMI_BOARD_NAME, "M2V-MX SE"), 86 .ident = "MSI MS-7253", 88 DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), [all …]
|
/Linux-v6.1/crypto/asymmetric_keys/ |
D | x509_cert_parser.c | 1 // 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() 68 ret = -ENOMEM; in x509_cert_parse() 72 cert->pub = kzalloc(sizeof(struct public_key), GFP_KERNEL); in x509_cert_parse() [all …]
|
/Linux-v6.1/drivers/firmware/ |
D | dmi_scan.c | 1 // 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 …]
|