| /linux/drivers/clocksource/ |
| H A D | arm_global_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-only 59 * To get the value from the Global Timer Counter register proceed as follows: 60 * 1. Read the upper 32-bit timer counter register 61 * 2. Read the lower 32-bit timer counter register 62 * 3. Read the upper 32-bit timer counter register again. If the value is 63 * different to the 32-bit upper value read previously, go back to step 2. 64 * Otherwise the 64-bit timer counter value is correct. 93 * 1. Clear the Comp Enable bit in the Timer Control Register. 94 * 2. Write the lower 32-bit Comparator Value Register. 95 * 3. Write the upper 32-bit Comparator Value Register. [all …]
|
| H A D | timer-cadence-ttc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * This file contains driver for the Cadence Triple Timer Counter Rev 06 5 * Copyright (C) 2011-2013 Xilinx 7 * based on arch/mips/kernel/time.c timer driver 23 * This driver configures the 2 16/32-bit count-up timers as follows: 25 * T1: Timer 1, clocksource for generic timekeeping 26 * T2: Timer 2, clockevent source for hrtimers 27 * T3: Timer 3, <unused> 29 * The input frequency to the timer module for emulation is 2.5MHz which is 30 * common to all the timer channels (T1, T2, and T3). With a pre-scaler of 32, [all …]
|
| H A D | scx200_hrt.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * high-resolution timer. The Geode SC-1100 (at least) has a buggy 8 * given as a boot-arg. In its absence, the Generic Timekeeping code 9 * will detect and de-rate the bad TSC, allowing this timer to take 12 * Based on work by John Stultz, and Ted Phelps (in a 2.6.12-rc6 patch) 29 MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)"); 31 /* HiRes Timer configuration register address */ 35 #define HR_TMEN (1 << 0) /* timer interrupt enable */ 37 #define HR_TM27MPD (1 << 2) /* 1 turns off input clock (power-down) */ 39 /* The base timer frequency, * 27 if selected */ [all …]
|
| H A D | timer-pxa.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * arch/arm/mach-pxa/time.c 8 * Derived from Nicolas Pitre's PXA timer handler Copyright (c) 2001 26 #define OSMR0 0x00 /* OS Timer 0 Match Register */ 27 #define OSMR1 0x04 /* OS Timer 1 Match Register */ 28 #define OSMR2 0x08 /* OS Timer 2 Match Register */ 29 #define OSMR3 0x0C /* OS Timer 3 Match Register */ 31 #define OSCR 0x10 /* OS Timer Counter Register */ 32 #define OSSR 0x14 /* OS Timer Status Register */ 33 #define OWER 0x18 /* OS Timer Watchdog Enable Register */ [all …]
|
| H A D | timer-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Inspired by time-efm32.c from Uwe Kleine-Koenig 23 #include "timer-of.h" 54 * stm32_timer_of_bits_set - set accessor helper 58 * Accessor helper to set the number of bits in the timer-of private 64 struct stm32_timer_private *pd = to->private_data; in stm32_timer_of_bits_set() 66 pd->bits = bits; in stm32_timer_of_bits_set() 70 * stm32_timer_of_bits_get - get accessor helper 73 * Accessor helper to get the number of bits in the timer-of private 80 struct stm32_timer_private *pd = to->private_data; in stm32_timer_of_bits_get() [all …]
|
| /linux/drivers/net/ethernet/freescale/ |
| H A D | fec_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 92 * fec_ptp_read - read raw cycle counter (to be used by time counter) 105 tempval = readl(fep->hwp + FEC_ATIME_CTRL); in fec_ptp_read() 107 writel(tempval, fep->hwp + FEC_ATIME_CTRL); in fec_ptp_read() 109 if (fep->quirks & FEC_QUIRK_BUG_CAPTURE) in fec_ptp_read() 112 return readl(fep->hwp + FEC_ATIME); in fec_ptp_read() 120 * This function enables the PPS output on the timer channel. 129 spin_lock_irqsave(&fep->tmreg_lock, flags); in fec_ptp_enable_pps() 131 if (fep->perout_enable) { in fec_ptp_enable_pps() 132 spin_unlock_irqrestore(&fep->tmreg_lock, flags); in fec_ptp_enable_pps() [all …]
|
| /linux/drivers/net/ethernet/intel/igc/ |
| H A D | igc_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 27 struct igc_hw *hw = &adapter->hw; in igc_ptp_read() 34 ts->tv_sec = sec; in igc_ptp_read() 35 ts->tv_nsec = nsec; in igc_ptp_read() 41 struct igc_hw *hw = &adapter->hw; in igc_ptp_write_i225() 43 wr32(IGC_SYSTIML, ts->tv_nsec); in igc_ptp_write_i225() 44 wr32(IGC_SYSTIMH, ts->tv_sec); in igc_ptp_write_i225() 51 struct igc_hw *hw = &igc->hw; in igc_ptp_adjfine_i225() 58 scaled_ppm = -scaled_ppm; in igc_ptp_adjfine_i225() 80 spin_lock_irqsave(&igc->tmreg_lock, flags); in igc_ptp_adjtime_i225() [all …]
|
| /linux/drivers/net/ethernet/intel/idpf/ |
| H A D | idpf_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 * idpf_ptp_get_access - Determine the access type of the PTP features 18 if (adapter->ptp->caps & direct) in idpf_ptp_get_access() 20 else if (adapter->ptp->caps & mailbox) in idpf_ptp_get_access() 27 * idpf_ptp_get_features_access - Determine the access type of PTP features 35 struct idpf_ptp *ptp = adapter->ptp; in idpf_ptp_get_features_access() 41 ptp->get_dev_clk_time_access = idpf_ptp_get_access(adapter, in idpf_ptp_get_features_access() 48 ptp->get_cross_tstamp_access = idpf_ptp_get_access(adapter, in idpf_ptp_get_features_access() 55 ptp->set_dev_clk_time_access = idpf_ptp_get_access(adapter, in idpf_ptp_get_features_access() 59 /* Adjust the device clock time */ in idpf_ptp_get_features_access() [all …]
|
| H A D | idpf_ptp.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 10 * struct idpf_ptp_cmd - PTP command masks 19 /* struct idpf_ptp_dev_clk_regs - PTP device registers 28 * @shadj_l: low part of the shadow adjust register 29 * @shadj_h: high part of the shadow adjust register 32 * @phy_shadj_l: low part of the PHY shadow adjust register 33 * @phy_shadj_h: high part of the PHY shadow adjust register 43 /* PHY timer */ 51 /* Main timer adjustments */ 57 /* PHY timer adjustments */ [all …]
|
| H A D | virtchnl2.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 16 * all the structures in this header follow little-endian format. 90 * enum virtchnl2_vport_type - Type of virtual port. 98 * enum virtchnl2_queue_model - Type of queue model. 230 * enum virtchnl2_action_types - Available actions for sideband flow steering 254 * enum virtchnl2_txq_sched_mode - Transmit Queue Scheduling Modes. 269 * enum virtchnl2_rxq_flags - Receive Queue Feature flags. 302 * models. With Split Queue model, 2 additional types are introduced - 325 * enum virtchnl2_mac_addr_type - MAC address types. 436 * 32768 - 65534 are used for user defined protocol ids. [all …]
|
| /linux/drivers/platform/x86/ |
| H A D | intel_ips.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2009-2010 Intel Corporation 10 * Some Intel Ibex Peak based platforms support so-called "intelligent 25 * close or over our TDP) we don't adjust the clamps more than once every 34 * - dual MCP configs 37 * - handle CPU hotplug 38 * - provide turbo enable/disable api 41 * - CDI 403777, 403778 - Auburndale EDS vol 1 & 2 42 * - CDI 401376 - Ibex Peak EDS 43 * - ref 26037, 26641 - IPS BIOS spec [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | en_clock.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 39 /* mlx4_en_read_clock - read raw cycle counter (to be used by time counter) 45 struct mlx4_dev *dev = mdev->dev; in mlx4_en_read_clock() 47 return mlx4_read_clock(dev) & tc->mask; in mlx4_en_read_clock() 55 lo = (u64)be16_to_cpu(ts_cqe->timestamp_lo); in mlx4_en_get_cqe_ts() 56 hi = ((u64)be32_to_cpu(ts_cqe->timestamp_hi) + !lo) << 16; in mlx4_en_get_cqe_ts() 67 seq = read_seqbegin(&mdev->clock_lock); in mlx4_en_get_hwtstamp() 68 nsec = timecounter_cyc2time(&mdev->clock, timestamp); in mlx4_en_get_hwtstamp() 69 } while (read_seqretry(&mdev->clock_lock, seq)); in mlx4_en_get_hwtstamp() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4/ |
| H A D | cxgb4_ptp.c | 4 * Copyright (c) 2003-2017 Chelsio Communications, Inc. All rights reserved. 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 54 * cxgb4_ptp_is_ptp_tx - determine whether TX packet is PTP or not 63 return skb->len >= PTP_MIN_LENGTH && in cxgb4_ptp_is_ptp_tx() 64 skb->len <= PTP_IN_TRANSMIT_PACKET_MAXNUM && in cxgb4_ptp_is_ptp_tx() 65 likely(skb->protocol == htons(ETH_P_IP)) && in cxgb4_ptp_is_ptp_tx() 66 ip_hdr(skb)->protocol == IPPROTO_UDP && in cxgb4_ptp_is_ptp_tx() 67 uh->dest == htons(PTP_EVENT_PORT); in cxgb4_ptp_is_ptp_tx() 75 return (pi->ptp_enable && cxgb4_xmit_with_hwtstamp(skb) && in is_ptp_enabled() [all …]
|
| /linux/arch/mips/kernel/ |
| H A D | time.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 24 #include <asm/cpu-features.h> 25 #include <asm/cpu-type.h> 40 struct cpumask *cpus = freq->policy->cpus; in cpufreq_callback() 45 * Skip lpj numbers adjustment if the CPU-freq transition is safe for in cpufreq_callback() 48 if (freq->flags & CPUFREQ_CONST_LOOPS) in cpufreq_callback() 54 glb_lpj_ref_freq = freq->old; in cpufreq_callback() 59 per_cpu(pcp_lpj_ref_freq, cpu) = freq->old; in cpufreq_callback() 64 * Adjust global lpj variable and per-CPU udelay_val number in in cpufreq_callback() 67 if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) || in cpufreq_callback() [all …]
|
| /linux/drivers/net/wireless/broadcom/b43/ |
| H A D | lo.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 5 /* G-PHY Local Oscillator */ 11 /* Local Oscillator control value-pair. */ 67 * the item really expired when the 15 second timer hits, we 69 #define B43_LO_CALIB_EXPIRE (HZ * (30 - 2)) 70 #define B43_LO_PWRVEC_EXPIRE (HZ * (30 - 2)) 71 #define B43_LO_TXCTL_EXPIRE (HZ * (180 - 4)) 74 /* Adjust the Local Oscillator to the saved attenuation 78 /* Adjust to specific values. */
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
| H A D | gm20b.c | 27 #include <subdev/timer.h> 34 gm20b_gr_acr_bld_patch(struct nvkm_acr *acr, u32 bld, s64 adjust) in gm20b_gr_acr_bld_patch() argument 39 nvkm_robj(acr->wpr, bld, &hdr, sizeof(hdr)); in gm20b_gr_acr_bld_patch() 41 hdr.code_dma_base = lower_32_bits((addr + adjust) >> 8); in gm20b_gr_acr_bld_patch() 42 hdr.code_dma_base1 = upper_32_bits((addr + adjust) >> 8); in gm20b_gr_acr_bld_patch() 44 hdr.data_dma_base = lower_32_bits((addr + adjust) >> 8); in gm20b_gr_acr_bld_patch() 45 hdr.data_dma_base1 = upper_32_bits((addr + adjust) >> 8); in gm20b_gr_acr_bld_patch() 46 nvkm_wobj(acr->wpr, bld, &hdr, sizeof(hdr)); in gm20b_gr_acr_bld_patch() 48 flcn_bl_dmem_desc_dump(&acr->subdev, &hdr); in gm20b_gr_acr_bld_patch() 55 const u64 base = lsfw->offset.img + lsfw->app_start_offset; in gm20b_gr_acr_bld_write() [all …]
|
| /linux/drivers/net/ethernet/intel/e1000e/ |
| H A D | ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 18 * e1000e_phc_adjfine - adjust the frequency of the hardware clock 22 * Adjust the frequency of the PHC cycle counter by the indicated delta from 31 struct e1000_hw *hw = &adapter->hw; in e1000e_phc_adjfine() 42 spin_lock_irqsave(&adapter->systim_lock, flags); in e1000e_phc_adjfine() 52 adapter->ptp_delta = delta; in e1000e_phc_adjfine() 54 spin_unlock_irqrestore(&adapter->systim_lock, flags); in e1000e_phc_adjfine() 60 * e1000e_phc_adjtime - Shift the time of the hardware clock 64 * Adjust the timer by resetting the timecounter structure. [all …]
|
| /linux/arch/alpha/kernel/ |
| H A D | rtc.c | 1 // SPDX-License-Identifier: GPL-2.0 25 * We don't want to use the rtc-cmos driver, because we don't want to support 26 * alarms, as that would be indistinguishable from timer interrupts. 31 * than 1900, and so it's easy to adjust. 54 /* The epoch was specified on the command-line. */ in init_rtc_epoch() 64 /* PC-like is standard; used for year >= 70 */ in init_rtc_epoch() 90 /* Adjust for non-default epochs. It's easier to depend on the in alpha_rtc_read_time() 91 generic __get_rtc_time and adjust the epoch here than create in alpha_rtc_read_time() 94 int year = tm->tm_year; in alpha_rtc_read_time() 97 year -= 100; in alpha_rtc_read_time() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/engine/sec2/ |
| H A D | gp102.c | 26 #include <subdev/timer.h> 35 nvkm_warn(&sec2->engine.subdev, "firmware unavailable\n"); in gp102_sec2_nofw() 45 const char *name = nvkm_acr_lsf_id(msg->falcon_id); in gp102_sec2_acr_bootstrap_falcon_callback() 47 if (msg->error_code) { in gp102_sec2_acr_bootstrap_falcon_callback() 50 msg->falcon_id, name, msg->error_code); in gp102_sec2_acr_bootstrap_falcon_callback() 51 return -EINVAL; in gp102_sec2_acr_bootstrap_falcon_callback() 64 .cmd.hdr.unit_id = sec2->func->unit_acr, in gp102_sec2_acr_bootstrap_falcon() 71 return nvkm_falcon_cmdq_send(sec2->cmdq, &cmd.cmd.hdr, in gp102_sec2_acr_bootstrap_falcon() 73 &sec2->engine.subdev, in gp102_sec2_acr_bootstrap_falcon() 78 gp102_sec2_acr_bld_patch(struct nvkm_acr *acr, u32 bld, s64 adjust) in gp102_sec2_acr_bld_patch() argument [all …]
|
| /linux/drivers/net/ethernet/intel/igb/ |
| H A D | igb_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 /* The 82580 timesync updates the system timer every 8ns by 8ns, 38 * +--------------+ +---+---+------+ 40 * +--------------+ +---+---+------+ 43 * +----------+---+ +--------------+ 45 * +----------+---+ +--------------+ 50 * 2^45 * 10^-9 / 3600 = 9.77 hours. 53 * 2^40 * 10^-9 / 60 = 18.3 minutes. 67 #define INCVALUE_82576_MASK GENMASK(E1000_TIMINCA_16NS_SHIFT - 1, 0) 79 struct e1000_hw *hw = &igb->hw; in igb_ptp_read_82576() [all …]
|
| /linux/drivers/net/ethernet/atheros/atl1e/ |
| H A D | atl1e_param.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright(c) 1999 - 2005 Intel Corporation. All rights reserved. 13 /* This is the only thing that needs to be changed to adjust the 19 #define OPTION_UNSET -1 37 * Valid Range: 64-2048 48 * Valid Range: 16-512 59 * Valid Range: 0-5 60 * - 0 - auto-negotiate at all supported speeds 61 * - 1 - only link at 100Mbps Full Duplex 62 * - 2 - only link at 100Mbps Half Duplex [all …]
|
| /linux/kernel/time/ |
| H A D | hrtimer.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright(C) 2005-2006, Linutronix GmbH, Thomas Gleixner <tglx@kernel.org> 4 * Copyright(C) 2005-2007, Red Hat, Inc., Ingo Molnar 5 * Copyright(C) 2006-2007 Timesys Corp., Thomas Gleixner 7 * High-resolution kernel timers 9 * In contrast to the low-resolution timeout API, aka timer wheel, 16 * Based on the original timer wheel code 42 #include <linux/timer.h> 48 #include <trace/events/timer.h> 50 #include "tick-internal.h" [all …]
|
| /linux/block/ |
| H A D | blk-iolatency.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Block rq-qos base io controller 7 * - It's bio based, so the latency covers the whole block layer in addition to 9 * - We will throttle all IO that comes in here if we need to. 10 * - We use the mean latency over the 100ms window. This is because writes can 13 * - By default there's no throttling, we set the queue_depth to UINT_MAX so 39 * adjust the queue depth of ourselves if needed. 43 * 1) Queue depth throttling. As we throttle down we will adjust the maximum 44 * number of IO's we're allowed to have in flight. This starts at (u64)-1 down 55 * total_time += min_lat_nsec - actual_io_completion [all …]
|
| /linux/fs/smb/smbdirect/ |
| H A D | accept.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 struct smbdirect_socket_parameters *sp = &sc->parameters; in smbdirect_accept_connect_request() 30 return -EINVAL; in smbdirect_accept_connect_request() 35 sp->initiator_depth = min_t(u8, sp->initiator_depth, in smbdirect_accept_connect_request() 36 sc->ib.dev->attrs.max_qp_rd_atom); in smbdirect_accept_connect_request() 38 peer_initiator_depth = param->initiator_depth; in smbdirect_accept_connect_request() 39 peer_responder_resources = param->responder_resources; in smbdirect_accept_connect_request() 71 ret = -EINVAL; in smbdirect_accept_connect_request() 77 recv_io->cqe.done = smbdirect_accept_negotiate_recv_done; in smbdirect_accept_connect_request() 83 sc->recv_io.expected = SMBDIRECT_EXPECT_NEGOTIATE_REQ; in smbdirect_accept_connect_request() [all …]
|
| /linux/net/sctp/ |
| H A D | transport.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Copyright (c) 1999-2000 Cisco, Inc. 4 * Copyright (c) 1999-2001 Motorola, Inc. 5 * Copyright (c) 2001-2003 International Business Machines Corp. 17 * lksctp developers <linux-sctp@vger.kernel.org> 46 peer->af_specific = sctp_get_af_specific(addr->sa.sa_family); in sctp_transport_init() 47 memcpy(&peer->ipaddr, addr, peer->af_specific->sockaddr_len); in sctp_transport_init() 48 memset(&peer->saddr, 0, sizeof(union sctp_addr)); in sctp_transport_init() 50 peer->sack_generation = 0; in sctp_transport_init() 58 peer->rto = msecs_to_jiffies(net->sctp.rto_initial); in sctp_transport_init() [all …]
|