/openbmc/u-boot/include/ |
H A D | rtc.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 13 /* bcd<->bin functions are needed by almost all the RTC drivers, let's include 23 * get() - get the current time 34 * set() - set the current time 45 * reset() - reset the RTC to a known-good state 47 * This function resets the RTC to a known-good state. The time may 52 * @return 0 if OK, -ve on error 57 * read8() - Read an 8-bit register 61 * @return value read, or -ve on error 66 * write8() - Write an 8-bit register [all …]
|
/openbmc/linux/arch/mips/dec/ |
H A 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 …]
|
/openbmc/qemu/docs/system/arm/ |
H A D | orangepi.rst | 1 Orange Pi PC (``orangepi-pc``) 5 based embedded computer with mainline support in both U-Boot 6 and Linux. The board comes with a Quad Core Cortex-A7 @ 1.3GHz, 15 * SMP (Quad Core Cortex-A7) 20 * Timer device (re-used from Allwinner A10) 36 - Graphical output via HDMI, GPU and/or the Display Engine 37 - Audio output 38 - Hardware Watchdog 41 for a complete list of unimplemented I/O devices: ``./hw/arm/allwinner-h3.c`` 46 The Orange Pi PC machine can start using the standard -kernel functionality [all …]
|
/openbmc/qemu/tests/qtest/ |
H A D | m48t59-test.c | 2 * QTest testcase for the M48T59 and M48T08 real-time clocks 11 * See the COPYING file in the top-level directory. 93 return -1; in tm_cmp() 104 printf("%04d-%02d-%02d %02d:%02d:%02d %+02ld\n", 105 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, 106 tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_gmtoff); 112 int sec, min, hour, mday, mon, year; in cmos_get_date_time() local 121 year = cmos_read(s, RTC_YEAR); in cmos_get_date_time() 128 year = bcd2dec(year); in cmos_get_date_time() 133 date->tm_isdst = dummy.tm_isdst; in cmos_get_date_time() [all …]
|
H A D | rtc-test.c | 2 * QTest testcase for the MC146818 real-time clock 10 * See the COPYING file in the top-level directory. 16 #include "libqtest-single.h" 54 return -1; in tm_cmp() 65 printf("%04d-%02d-%02d %02d:%02d:%02d\n", 66 tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, 67 tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_gmtoff); 74 int sec, min, hour, mday, mon, year; in cmos_get_date_time() local 83 year = cmos_read(RTC_YEAR); in cmos_get_date_time() 91 year = bcd2dec(year); in cmos_get_date_time() [all …]
|
/openbmc/libpldm/include/libpldm/ |
H A D | bios.h | 1 /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ 115 uint16_t year; //!< Year in BCD format member 129 uint16_t year; //!< Year in BCD format member 210 * @param[in] instance_id - Message's instance id 211 * @param[out] msg - Message will be written to this 225 * protocol layer error and all the out-parameters are invalid. 227 * @param[in] msg - Response message 228 * @param[in] payload_length - Length of response message payload 229 * @param[out] completion_code - Pointer to response msg's PLDM completion code 230 * @param[out] seconds - Seconds in BCD format [all …]
|
/openbmc/linux/arch/powerpc/platforms/maple/ |
H A 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 …]
|
/openbmc/linux/arch/powerpc/platforms/chrp/ |
H A 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 …]
|
/openbmc/linux/arch/m68k/atari/ |
H A 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 …]
|
/openbmc/linux/drivers/rtc/ |
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
H A 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 …]
|
/openbmc/libcper/ |
H A D | cper-utils.c | 10 #include <libcper/cper-utils.h> 25 error_status->Type, 18, in cper_generic_error_status_to_ir() 34 json_object_new_boolean(error_status->AddressSignal)); in cper_generic_error_status_to_ir() 37 json_object_new_boolean(error_status->ControlSignal)); in cper_generic_error_status_to_ir() 40 json_object_new_boolean(error_status->DataSignal)); in cper_generic_error_status_to_ir() 43 json_object_new_boolean(error_status->DetectedByResponder)); in cper_generic_error_status_to_ir() 46 json_object_new_boolean(error_status->DetectedByRequester)); in cper_generic_error_status_to_ir() 49 json_object_new_boolean(error_status->FirstError)); in cper_generic_error_status_to_ir() 52 json_object_new_boolean(error_status->OverflowNotLogged)); in cper_generic_error_status_to_ir() 57 //Converts the given CPER-JSON generic error status into a CPER structure. [all …]
|
/openbmc/u-boot/drivers/rtc/ |
H A D | rx8025.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com. 16 /*---------------------------------------------------------------------*/ 24 /*---------------------------------------------------------------------*/ 63 * sequence (start sequence without a prior stop). 65 * U-Boot's 4xx i2c driver is currently not capable 81 uchar sec, min, hour, mday, wday, mon, year, ctl2; in rtc_get() local 93 year = rtc_read(RTC_YR_REG_ADDR); in rtc_get() 95 DEBUGR ("Get RTC year: %02x mon: %02x mday: %02x wday: %02x " in rtc_get() 97 year, mon, mday, wday, hour, min, sec); in rtc_get() [all …]
|
H A D | mk48t59.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com> 51 /* ------------------------------------------------------------------------- */ 58 while (count--) in nvram_read() 69 while (count--) in nvram_write() 73 /* ------------------------------------------------------------------------- */ 78 uchar sec, min, hour, mday, wday, mon, year; in rtc_get() local 93 year = rtc_read (RTC_YEAR); in rtc_get() 95 /* re-enable update */ in rtc_get() 100 printf ( "Get RTC year: %02x mon/cent: %02x mday: %02x wday: %02x " in rtc_get() [all …]
|
H A D | m41t60.c | 1 // SPDX-License-Identifier: GPL-2.0+ 13 * STMicroelectronics M41T60 serial access real-time clock 25 * assume years are in the range 1900 - 2299. 28 static unsigned char year2cb(unsigned const year) in year2cb() argument 30 if (year < 1900 || year >= 2300) in year2cb() 31 printf("M41T60 RTC: year %d out of range\n", year); in year2cb() 33 return (year / 100) & 0x3; in year2cb() 66 printf("RTC dump %s: %02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X\n", in rtc_dump() 78 * determine whether there has been an initial power-up since the last in rtc_validate() 97 * oscillator so it can be "kick-started" as per data sheet. in rtc_validate() [all …]
|
H A D | ds1302.c | 2 * ds1302.c - Support for the Dallas Semiconductor DS1302 Timekeeping Chip 34 while (num--) printf("%x ", *ptr++); in DUMP() 45 unsigned char CH:1; /* clock halt 1=stop 0=start */ 55 unsigned char hr10:2; /* 10 (0-2) or am/pm (am/pm, 0-1) */ 70 unsigned char year:4; member 225 if (bbclk.year>9) { in rtc_init() 226 printf("ds1302: Year was corrupted, fixing\n"); in rtc_init() 227 bbclk.year10=100/10; /* 2000 - why not? ;) */ in rtc_init() 228 bbclk.year=0; in rtc_init() 267 rel = -1; in rtc_get() [all …]
|
H A D | ds1306.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * (C) Copyright 2004, Li-Pro.Net <www.li-pro.net> 6 * Stephan Linz <linz@li-pro.net> 12 * - SXNI855T: it uses its own soft SPI here in this file 13 * - all other: use the external spi_xfer() function 53 /*----------------------------------------------------------------------- 62 /* ------------------------------------------------------------------------- */ 73 immap->im_cpm.cp_pbdat |= PB_SPI_CE; in rtc_get() 80 tmp->tm_sec = bcd2bin (soft_spi_read ()); /* Read seconds */ in rtc_get() 81 tmp->tm_min = bcd2bin (soft_spi_read ()); /* Read minutes */ in rtc_get() [all …]
|
/openbmc/linux/net/netfilter/ |
H A 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 …]
|
/openbmc/linux/arch/m68k/sun3/ |
H A 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 …]
|
/openbmc/linux/Documentation/devicetree/bindings/rtc/ |
H A 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-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 …]
|
/openbmc/bmcweb/redfish-core/include/utils/extern/ |
H A D | date.h | 3 // clang-format off 80 # pragma GCC diagnostic ignored "-Wpedantic" 81 # pragma GCC diagnostic ignored "-Wconversion" 82 # pragma GCC diagnostic ignored "-Wold-style-cast" 85 // GCC 4.9 Bug 61489 Wrong warning with -Wmissing-field-initializers 86 # pragma GCC diagnostic ignored "-Wmissing-field-initializers" 91 # pragma GCC diagnostic ignored "-Wunsafe-buffer-usage" 92 # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" 93 # pragma GCC diagnostic ignored "-Wold-style-cast" 105 //---------------+ [all …]
|
/openbmc/linux/tools/edid/ |
H A 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 …]
|