/openbmc/u-boot/drivers/rtc/ |
H A D | mxsrtc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include <asm/arch/imx-regs.h> 17 /* Set time in seconds since 1970-01-01 */ 18 int mxs_rtc_set_time(uint32_t secs) in mxs_rtc_set_time() argument 23 writel(secs, &rtc_regs->hw_rtc_seconds); in mxs_rtc_set_time() 30 ret = mxs_wait_mask_clr(&rtc_regs->hw_rtc_stat_reg, in mxs_rtc_set_time() 34 printf("MXS RTC: Timeout waiting for update\n"); in mxs_rtc_set_time() 42 uint32_t secs; in rtc_get() local 44 secs = readl(&rtc_regs->hw_rtc_seconds); in rtc_get() 45 rtc_to_tm(secs, time); in rtc_get() [all …]
|
/openbmc/linux/drivers/watchdog/ |
H A D | booke_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Watchdog timer for PowerPC Book-E systems 8 * Copyright 2005, 2008, 2010-2011 Freescale Semiconductor Inc. 22 * Also, the wdt_period sets the watchdog timer period timeout. 23 * For E500 cpus the wdt_period sets which bit changing from 0->1 will 24 * trigger a watchdog timeout. This watchdog timeout will occur 3 times, the 55 * 2.5 * (2^(63-period+1)) / timebase_freq 58 * at least 1. This will still result in a very long timeout. 62 unsigned long long tmp = 1ULL << (64 - period); in period_to_sec() 75 * This procedure will find the highest period which will give a timeout [all …]
|
H A D | sb_wdog.c | 74 __raw_writeq(t & 0x7fffffUL, wdog - 0x10); in sbwdog_set() 94 static unsigned long timeout = 0x7fffffUL; /* useconds: 8.3ish secs. */ variable 110 return -EBUSY; in sbwdog_open() 116 sbwdog_set(user_dog, timeout); in sbwdog_open() 142 * 42 - the answer 159 return -EFAULT; in sbwdog_write() 172 int ret = -ENOTTY; in sbwdog_ioctl() 179 ret = copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in sbwdog_ioctl() 199 ret = -EINVAL; in sbwdog_ioctl() 202 timeout = time; in sbwdog_ioctl() [all …]
|
H A D | da9063_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 25 * Watchdog selector to timeout in seconds. 27 * others: timeout = 2048 ms * 2^(TWDSCALE-1). 34 #define DA9063_TWDSCALE_MAX (ARRAY_SIZE(wdt_timeout) - 1) 40 static unsigned int da9063_wdt_timeout_to_sel(unsigned int secs) in da9063_wdt_timeout_to_sel() argument 45 if (wdt_timeout[i] >= secs) in da9063_wdt_timeout_to_sel() 53 * Read the currently active timeout. 60 regmap_read(da9063->regmap, DA9063_REG_CONTROL_D, &val); in da9063_wdt_read_timeout() 67 return regmap_update_bits(da9063->regmap, DA9063_REG_CONTROL_D, in da9063_wdt_disable_timer() 73 da9063_wdt_update_timeout(struct da9063 *da9063, unsigned int timeout) in da9063_wdt_update_timeout() argument [all …]
|
H A D | da9062_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 26 #define DA9062_TWDSCALE_MAX (ARRAY_SIZE(wdt_timeout) - 1) 29 #define DA9062_WDG_DEFAULT_TIMEOUT wdt_timeout[DA9062_TWDSCALE_MAX-1] 42 regmap_read(wdt->hw->regmap, DA9062AA_CONTROL_D, &val); in da9062_wdt_read_timeout() 47 static unsigned int da9062_wdt_timeout_to_sel(unsigned int secs) in da9062_wdt_timeout_to_sel() argument 52 if (wdt_timeout[i] >= secs) in da9062_wdt_timeout_to_sel() 61 return regmap_update_bits(wdt->hw->regmap, DA9062AA_CONTROL_F, in da9062_reset_watchdog_timer() 69 struct da9062 *chip = wdt->hw; in da9062_wdt_update_timeout_register() 71 regmap_update_bits(chip->regmap, in da9062_wdt_update_timeout_register() 78 return regmap_update_bits(chip->regmap, in da9062_wdt_update_timeout_register() [all …]
|
H A D | hpwdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 29 #define SECS_TO_TICKS(secs) ((secs) * 1000 / 128) argument 40 static int kdumptimeout = -1; 42 static void __iomem *pci_mem_addr; /* the PCI-memory address */ 73 int reload = SECS_TO_TICKS(min(wdd->timeout, wdd->max_hw_heartbeat_ms/1000)); in hpwdt_start() 75 dev_dbg(wdd->parent, "start watchdog 0x%08x:0x%08x:0x%02x\n", wdd->timeout, reload, control); in hpwdt_start() 108 int reload = SECS_TO_TICKS(min(wdd->timeout, wdd->max_hw_heartbeat_ms/1000)); in hpwdt_ping() 110 dev_dbg(wdd->parent, "ping watchdog 0x%08x:0x%08x\n", wdd->timeout, reload); in hpwdt_ping() 123 dev_dbg(wdd->parent, "set_timeout = %d\n", val); in hpwdt_settimeout() 125 wdd->timeout = val; in hpwdt_settimeout() [all …]
|
H A D | tqmx86_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 19 /* default timeout (secs) */ 22 static unsigned int timeout; variable 23 module_param(timeout, uint, 0); 24 MODULE_PARM_DESC(timeout, 25 "Watchdog timeout in seconds. (1<=timeout<=4096, default=" 39 iowrite8(0x81, priv->io_base + TQMX86_WDCS); in tqmx86_wdt_start() 52 iowrite8(val, priv->io_base + TQMX86_WDCFG); in tqmx86_wdt_set_timeout() 54 wdd->timeout = t; in tqmx86_wdt_set_timeout() 73 struct device *dev = &pdev->dev; in tqmx86_wdt_probe() [all …]
|
H A D | ep93xx_wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 26 /* default timeout (secs) */ 33 static unsigned int timeout; variable 34 module_param(timeout, uint, 0); 35 MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds."); 49 writel(0xaaaa, priv->mmio + EP93XX_WATCHDOG); in ep93xx_wdt_start() 58 writel(0xaa55, priv->mmio + EP93XX_WATCHDOG); in ep93xx_wdt_stop() 67 writel(0x5555, priv->mmio + EP93XX_WATCHDOG); in ep93xx_wdt_ping() 89 struct device *dev = &pdev->dev; in ep93xx_wdt_probe() 97 return -ENOMEM; in ep93xx_wdt_probe() [all …]
|
H A D | cpwd.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* cpwd.c - driver implementation for hardware watchdog 6 * interface and Solaris-compatible ioctls as best it is 43 #define WD_BADMODEL "SUNW,501-5336" 79 unsigned long timeout; member 90 u16 timeout; member 97 /* Sun uses Altera PLD EPF8820ATC144-4 100 * 1) RIC - sends an interrupt when triggered 101 * 2) XIR - asserts XIR_B_RESET when triggered, resets CPU 102 * 3) POR - asserts POR_B_RESET when triggered, resets CPU, backplane, board [all …]
|
H A D | pic32-wdt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 19 #include <asm/mach-pic32/pic32.h> 46 return !!(readl(wdt->regs + WDTCON_REG) & WDTCON_WIN_EN); in pic32_wdt_is_win_enabled() 51 u32 v = readl(wdt->regs + WDTCON_REG); in pic32_wdt_get_post_scaler() 58 u32 v = readl(wdt->regs + WDTCON_REG); in pic32_wdt_get_clk_id() 65 u32 v = readl(wdt->rst_base); in pic32_wdt_bootstatus() 67 writel(RESETCON_WDT_TIMEOUT, PIC32_CLR(wdt->rst_base)); in pic32_wdt_bootstatus() 77 rate = clk_get_rate(wdt->clk); in pic32_wdt_get_timeout_secs() 82 /* default, prescaler of 32 (i.e. div-by-32) is implicit. */ in pic32_wdt_get_timeout_secs() 91 /* find time taken (in secs) to reach terminal count */ in pic32_wdt_get_timeout_secs() [all …]
|
/openbmc/u-boot/board/gateworks/gw_ventana/ |
H A D | gsc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 20 * 2 back-to-back transfers. Thus we wrap i2c_read and i2c_write with 35 if (ret != -ENODEV) in gsc_i2c_read() 54 if (ret != -ENODEV) in gsc_i2c_write() 67 printf("%-8s:", name); in read_hwmon() 74 ui -= 0xffff; in read_hwmon() 103 ui -= 0xffff; in gsc_info() 125 read_hwmon("VDD_IO3", GSC_HWMON_VDD_IO4, 3); /* -C rev */ in gsc_info() 130 read_hwmon("VDD_IO4", GSC_HWMON_VDD_IO4, 3); /* -C rev */ in gsc_info() 134 read_hwmon("VDD_IO3", GSC_HWMON_VDD_IO4, 3); /* -C rev */ in gsc_info() [all …]
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-jz4740.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de> 9 #include <linux/clk-provider.h> 75 return readl(rtc->base + reg); in jz4740_rtc_reg_read() 82 return readl_poll_timeout(rtc->base + JZ_REG_RTC_CTRL, ctrl, in jz4740_rtc_wait_write_ready() 95 writel(JZ_RTC_WENR_MAGIC, rtc->base + JZ_REG_RTC_WENR); in jz4780_rtc_enable_write() 97 return readl_poll_timeout(rtc->base + JZ_REG_RTC_WENR, ctrl, in jz4780_rtc_enable_write() 106 if (rtc->type >= ID_JZ4760) in jz4740_rtc_reg_write() 111 writel(val, rtc->base + reg); in jz4740_rtc_reg_write() 123 spin_lock_irqsave(&rtc->lock, flags); in jz4740_rtc_ctrl_set_bits() [all …]
|
H A D | rtc-ab8500.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) ST-Ericsson SA 2010 63 unsigned long timeout = jiffies + HZ; in ab8500_rtc_read_time() local 65 unsigned long mins, secs; in ab8500_rtc_read_time() local 76 while (time_before(jiffies, timeout)) { in ab8500_rtc_read_time() 99 secs = (buf[3] << 8) | buf[4]; in ab8500_rtc_read_time() 100 secs = secs / COUNTS_PER_SEC; in ab8500_rtc_read_time() 101 secs = secs + (mins * 60); in ab8500_rtc_read_time() 103 rtc_time64_to_tm(secs, tm); in ab8500_rtc_read_time() 111 unsigned long no_secs, no_mins, secs = 0; in ab8500_rtc_set_time() local [all …]
|
H A D | rtc-sc27xx.c | 1 // SPDX-License-Identifier: GPL-2.0 99 /* timeout of synchronizing time and alarm registers (us) */ 128 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_clear_alarm_ints() 137 ret = regmap_read(rtc->regmap, rtc->base + SPRD_RTC_SPG_VALUE, &val); in sprd_rtc_lock_alarm() 147 ret = regmap_write(rtc->regmap, rtc->base + SPRD_RTC_SPG_UPD, val); in sprd_rtc_lock_alarm() 152 ret = regmap_read_poll_timeout(rtc->regmap, in sprd_rtc_lock_alarm() 153 rtc->base + SPRD_RTC_INT_RAW_STS, val, in sprd_rtc_lock_alarm() 158 dev_err(rtc->dev, "failed to update SPG value:%d\n", ret); in sprd_rtc_lock_alarm() 162 return regmap_write(rtc->regmap, rtc->base + SPRD_RTC_INT_CLR, in sprd_rtc_lock_alarm() 167 time64_t *secs) in sprd_rtc_get_secs() argument [all …]
|
/openbmc/linux/drivers/scsi/cxlflash/ |
H A D | main.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 64 /* TIMEOUT and RETRY definitions */ 66 /* AFU command timeout values */ 67 #define MC_AFU_SYNC_TIMEOUT 5 /* 5 secs */ 68 #define MC_LUN_PROV_TIMEOUT 5 /* 5 secs */ 69 #define MC_AFU_DEBUG_TIMEOUT 5 /* 5 secs */ 107 if (ddv->flags & CXLFLASH_OCXL_DEV) in cxlflash_assign_ops() 112 if (!(ddv->flags & CXLFLASH_OCXL_DEV)) in cxlflash_assign_ops()
|
/openbmc/u-boot/net/ |
H A D | link_local.c | 2 * RFC3927 ZeroConf IPv4 Link-Local addressing 5 * Copied from BusyBox - networking/zcip.c 29 /* protocol timeout parameters, specified in seconds */ 53 static int timeout_ms = -1; 74 } while (tmp > (IN_CLASSB_HOST - 0x0200)); in pick() 80 * Return milliseconds of random delay, up to "secs" seconds. 82 static inline unsigned random_delay_ms(unsigned secs) in random_delay_ms() argument 84 return rand_r(&seed) % (secs * 1000); in random_delay_ms() 89 if (timeout_ms == -1) in configure_wait() 92 /* poll, being ready to adjust current timeout */ in configure_wait() [all …]
|
/openbmc/linux/tools/testing/selftests/futex/functional/ |
H A D | futex_requeue_pi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Copyright © International Business Machines Corp., 2006-2008 15 * 2008-Jan-13: Initial version by Sripathi Kodi <sripathik@in.ibm.com> 16 * 2009-Nov-6: futex test adaptation by Darren Hart <dvhart@linux.intel.com> 31 #define TEST_NAME "futex-requeue-pi" 51 struct timespec *timeout; member 60 printf(" -b Broadcast wakeup (all waiters)\n"); in usage() 61 printf(" -c Use color\n"); in usage() 62 printf(" -h Display this help message\n"); in usage() 63 printf(" -l Lock the pi futex across requeue\n"); in usage() [all …]
|
/openbmc/linux/net/netfilter/ |
H A D | nf_conntrack_proto_sctp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Copyright (c) 2004-2012 Patrick McHardy <kaber@trash.net> 42 #define SECS * HZ macro 43 #define MINS * 60 SECS 48 [SCTP_CONNTRACK_CLOSED] = 10 SECS, 49 [SCTP_CONNTRACK_COOKIE_WAIT] = 3 SECS, 50 [SCTP_CONNTRACK_COOKIE_ECHOED] = 3 SECS, 51 [SCTP_CONNTRACK_ESTABLISHED] = 210 SECS, 52 [SCTP_CONNTRACK_SHUTDOWN_SENT] = 3 SECS, 53 [SCTP_CONNTRACK_SHUTDOWN_RECD] = 3 SECS, [all …]
|
/openbmc/linux/fs/xfs/ |
H A D | xfs_sysctl.h | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2001-2005 Silicon Graphics, Inc. 37 xfs_sysctl_val_t fstrm_timer; /* Filestream dir-AG assoc'n timeout. */ 88 int log_recovery_delay; /* log recovery delay (secs) */ 89 int mount_delay; /* mount setup delay (secs) */
|
/openbmc/linux/Documentation/watchdog/ |
H A D | watchdog-parameters.rst | 7 be listed here unless the driver has its own driver-specific information 10 See Documentation/admin-guide/kernel-parameters.rst for information on 14 ------------------------------------------------- 21 timeout. Setting this to a non-zero value can be useful to ensure that 25 ------------------------------------------------- 36 ------------------------------------------------- 43 timeout: 44 Watchdog timeout in seconds. 1<= timeout <=63, default=60. 49 ------------------------------------------------- 52 timeout: [all …]
|
/openbmc/phosphor-host-ipmid/ |
H A D | meson.options | 4 'boot-flag-safe-mode-support', 9 'i2c-whitelist-check', 17 'softoff-busname', 23 'softoff-objpath', 29 'ipmi-sms-atn-ack-timeout-secs', 32 description: 'Timeout for host to ack and query SMS_ATN from BMC', 35 'ipmi-host-shutdown-complete-timeout-secs', 40 # Indicates an in-band power off or reboot request from the host 44 'host-inband-request-dir', 50 'host-inband-request-file', [all …]
|
H A D | meson.build | 2 'phosphor-host-ipmid', 19 conf_data.set_quoted('BOARD_SENSOR', get_option('board-sensor')) 20 conf_data.set_quoted('SYSTEM_SENSOR', get_option('system-sensor')) 23 get_option('ipmi-sms-atn-ack-timeout-secs'), 28 conf_data.set_quoted('SOFTOFF_BUSNAME', get_option('softoff-busname')) 29 conf_data.set_quoted('SOFTOFF_OBJPATH', get_option('softoff-objpath')) 32 get_option('ipmi-host-shutdown-complete-timeout-secs'), 36 get_option('host-inband-request-dir'), 40 get_option('host-inband-request-file'), 44 conf_data.set_quoted('CONTROL_HOST_BUSNAME', get_option('control-host-busname')) [all …]
|
/openbmc/linux/drivers/base/firmware_loader/ |
H A D | fallback.c | 1 // SPDX-License-Identifier: GPL-2.0 19 * use small loading timeout for caching devices' firmware because all these 22 * current distributions is about 2M bytes, so 10 secs should be enough. 30 /* Restores the timeout to the value last configured during normal operation */ 42 static inline int fw_sysfs_wait_timeout(struct fw_priv *fw_priv, long timeout) in fw_sysfs_wait_timeout() argument 44 return __fw_state_wait_common(fw_priv, timeout); in fw_sysfs_wait_timeout() 57 if (!fw_priv->need_uevent || !only_kill_custom) in kill_pending_fw_fallback_reqs() 64 * fw_load_sysfs_fallback() - load a firmware via the sysfs fallback mechanism 66 * @timeout: timeout to wait for the load 70 static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, long timeout) in fw_load_sysfs_fallback() argument [all …]
|
/openbmc/linux/drivers/net/dsa/microchip/ |
H A D | ksz9477.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2017-2024 Microchip Technology Inc. 11 #include <linux/platform_data/microchip-ksz.h> 50 if (!dsa_is_cpu_port(dev->ds, port)) in ksz9477_change_mtu() 72 mutex_lock(&dev->vlan_mutex); in ksz9477_get_vlan_table() 80 dev_dbg(dev->dev, "Failed to read vlan table\n"); in ksz9477_get_vlan_table() 91 mutex_unlock(&dev->vlan_mutex); in ksz9477_get_vlan_table() 101 mutex_lock(&dev->vlan_mutex); in ksz9477_set_vlan_table() 113 dev_dbg(dev->dev, "Failed to write vlan table\n"); in ksz9477_set_vlan_table() 120 dev->vlan_cache[vid].table[0] = vlan_table[0]; in ksz9477_set_vlan_table() [all …]
|
/openbmc/u-boot/drivers/watchdog/ |
H A D | Kconfig | 4 bool "Enable U-Boot watchdog reset" 6 This option enables U-Boot watchdog support where U-Boot is using 7 watchdog_reset function to service watchdog device in U-Boot. Enable 8 this option if you want to service enabled watchdog by U-Boot. Disable 9 this option if you want U-Boot to start watchdog but never service it. 18 that the watchdog will not be fed in u-boot. 27 hardware, with a max timeout of ~15secs. 143 bool "AT91 watchdog timeout specified"
|