/Linux-v5.10/drivers/gpu/drm/i915/gt/ |
D | intel_gt_clock_utils.c | 10 #define MHZ_12 12000000 /* 12MHz (24MHz/2), 83.333ns */ 11 #define MHZ_12_5 12500000 /* 12.5MHz (25MHz/2), 80ns */ 12 #define MHZ_19_2 19200000 /* 19.2MHz, 52.083ns */ 49 gt->clock_frequency / 1000); in intel_gt_init_clock_frequency() 71 return div_u64_roundup(mul_u32_u32(count, 1000 * 1000 * 1000), in intel_gt_clock_interval_to_ns() 80 u32 intel_gt_ns_to_clock_interval(const struct intel_gt *gt, u32 ns) in intel_gt_ns_to_clock_interval() argument 82 return div_u64_roundup(mul_u32_u32(gt->clock_frequency, ns), in intel_gt_ns_to_clock_interval() 83 1000 * 1000 * 1000); in intel_gt_ns_to_clock_interval() 86 u32 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u32 ns) in intel_gt_ns_to_pm_interval() argument 97 val = DIV_ROUND_UP(intel_gt_ns_to_clock_interval(gt, ns), 16); in intel_gt_ns_to_pm_interval()
|
/Linux-v5.10/arch/arm/boot/dts/ |
D | tegra20-cpu-opp.dtsi | 9 clock-latency-ns = <400000>; 15 clock-latency-ns = <400000>; 21 clock-latency-ns = <400000>; 27 clock-latency-ns = <400000>; 33 clock-latency-ns = <400000>; 39 clock-latency-ns = <400000>; 46 clock-latency-ns = <400000>; 52 clock-latency-ns = <400000>; 58 clock-latency-ns = <400000>; 64 clock-latency-ns = <400000>; [all …]
|
D | tegra30-cpu-opp.dtsi | 9 clock-latency-ns = <100000>; 15 clock-latency-ns = <100000>; 21 clock-latency-ns = <100000>; 27 clock-latency-ns = <100000>; 33 clock-latency-ns = <100000>; 39 clock-latency-ns = <100000>; 45 clock-latency-ns = <100000>; 51 clock-latency-ns = <100000>; 57 clock-latency-ns = <100000>; 63 clock-latency-ns = <100000>; [all …]
|
/Linux-v5.10/drivers/memory/ |
D | omap-gpmc.c | 284 rate /= 1000; in gpmc_get_fclk_period() 328 return (time_ns * 1000 + tick_ps - 1) / tick_ps; in gpmc_ns_to_clk_ticks() 349 return ticks * gpmc_get_clk_period(cs, cd) / 1000; in gpmc_clk_ticks_to_ns() 416 * tick format: gpmc,name = <value> /‍* x ns -- y ns; x ticks *‍/ 417 * Where x ns -- y ns result in the same tick value. 449 /* DTS tick format for timings in ns */ in get_gpmc_timing_reg() 456 pr_info("gpmc,%s = <%u>; /* %u ns - %u ns; %i ticks%s*/\n", in get_gpmc_timing_reg() 533 GPMC_GET_TICKS(GPMC_CS_CONFIG2, 0, 3, "cs-on-ns"); in gpmc_cs_show_timings() 534 GPMC_GET_TICKS(GPMC_CS_CONFIG2, 8, 12, "cs-rd-off-ns"); in gpmc_cs_show_timings() 535 GPMC_GET_TICKS(GPMC_CS_CONFIG2, 16, 20, "cs-wr-off-ns"); in gpmc_cs_show_timings() [all …]
|
/Linux-v5.10/drivers/video/fbdev/omap/ |
D | hwa742.c | 207 if ((width * hwa742.pix_tx_time / 1000) * height < in enable_tearsync() 208 (y + height) * (hwa742.line_upd_time / 1000)) { in enable_tearsync() 627 /* CSOnTime 0, WEOnTime 2 ns, REOnTime 2 ns, in calc_reg_timing() 628 * AccessTime 2 ns + 12.2 ns (regs), in calc_reg_timing() 629 * WEOffTime = WEOnTime + 1 ns, in calc_reg_timing() 630 * REOffTime = REOnTime + 16 ns (regs), in calc_reg_timing() 631 * CSOffTime = REOffTime + 1 ns in calc_reg_timing() 632 * ReadCycle = 2ns + 2*SYSCLK (regs), in calc_reg_timing() 633 * WriteCycle = 2*SYSCLK + 2 ns, in calc_reg_timing() 634 * CSPulseWidth = 10 ns */ in calc_reg_timing() [all …]
|
/Linux-v5.10/drivers/media/i2c/cx25840/ |
D | cx25840-ir.c | 125 * (0xffff + 1) * 1000 / 108/2 MHz = 1,213,629.629... ns 139 static inline u16 ns_to_clock_divider(unsigned int ns) in ns_to_clock_divider() argument 142 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_clock_divider() 147 /* Period of the Rx or Tx clock in ns */ in clock_divider_to_ns() 148 return DIV_ROUND_CLOSEST((divider + 1) * 1000, in clock_divider_to_ns() 181 * 0xffff * 1000 / 108/2 MHz = 1,213,611.11... ns 193 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument 196 DIV_ROUND_CLOSEST(CX25840_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count() 201 /* Duration of the Low Pass Filter rejection window in ns */ in lpf_count_to_ns() 202 return DIV_ROUND_CLOSEST(count * 1000, in lpf_count_to_ns() [all …]
|
/Linux-v5.10/Documentation/m68k/ |
D | buddha-driver.rst | 23 Rom-vector: $1000 97 $1000-$ffff Buddha-Rom with offset $1000 in the rom 124 A6=1 (for example $840 for port 0, register set 0), a 780ns 142 about 30ns to the clocks on the Zorro bus, that's why the 143 values are no multiple of 71. One clock-cycle is 71ns long 147 497ns Select (7 clock cycles) , IOR/IOW after 172ns (2 clock cycles) 152 639ns Select (9 clock cycles), IOR/IOW after 243ns (3 clock cycles) 155 781ns Select (11 clock cycles), IOR/IOW after 314ns (4 clock cycles) 158 355ns Select (5 clock cycles), IOR/IOW after 101ns (1 clock cycle) 161 355ns Select (5 clock cycles), IOR/IOW after 172ns (2 clock cycles) [all …]
|
/Linux-v5.10/arch/mips/include/asm/ |
D | delay.h | 17 extern void __ndelay(unsigned long ns); 20 #define ndelay(ns) __ndelay(ns) argument 24 #if HZ >= 1000 29 #define MAX_UDELAY_MS (1000 / HZ)
|
/Linux-v5.10/Documentation/devicetree/bindings/i2c/ |
D | i2c-rk3x.yaml | 78 i2c-scl-rising-time-ns: 79 default: 1000 83 the maximum the specification allows(1000 ns for Standard-mode, 84 300 ns for Fast-mode) which might cause slightly slower communication. 86 i2c-scl-falling-time-ns: 91 be the maximum the specification allows (300 ns) which might cause 94 i2c-sda-falling-time-ns: 134 i2c-scl-falling-time-ns = <100>; 135 i2c-scl-rising-time-ns = <800>;
|
/Linux-v5.10/tools/testing/selftests/timers/ |
D | raw_skew.c | 51 struct timespec nsec_to_ts(long long ns) in nsec_to_ts() argument 55 ts.tv_sec = ns/NSEC_PER_SEC; in nsec_to_ts() 56 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts() 129 printf("%lld.%i(est)", eppm/1000, abs((int)(eppm%1000))); in main() 132 ppm = (tx1.freq + tx2.freq) * 1000 / 2; in main() 133 ppm = (long long)tx1.freq * 1000; in main() 135 printf(" %lld.%i(act)", ppm/1000, abs((int)(ppm%1000))); in main() 137 if (llabs(eppm - ppm) > 1000) { in main()
|
/Linux-v5.10/drivers/nvme/target/ |
D | admin-cmd.c | 77 struct nvmet_ns *ns; in nvmet_get_smart_log_nsid() local 80 ns = nvmet_find_namespace(req->sq->ctrl, req->cmd->get_log_page.nsid); in nvmet_get_smart_log_nsid() 81 if (!ns) { in nvmet_get_smart_log_nsid() 88 /* we don't have the right data for file backed ns */ in nvmet_get_smart_log_nsid() 89 if (!ns->bdev) in nvmet_get_smart_log_nsid() 92 host_reads = part_stat_read(ns->bdev->bd_part, ios[READ]); in nvmet_get_smart_log_nsid() 93 data_units_read = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part, in nvmet_get_smart_log_nsid() 94 sectors[READ]), 1000); in nvmet_get_smart_log_nsid() 95 host_writes = part_stat_read(ns->bdev->bd_part, ios[WRITE]); in nvmet_get_smart_log_nsid() 96 data_units_written = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part, in nvmet_get_smart_log_nsid() [all …]
|
/Linux-v5.10/tools/testing/selftests/net/ |
D | pmtu.sh | 229 NS_A="ns-A" 230 NS_B="ns-B" 231 NS_C="ns-C" 232 NS_R1="ns-R1" 233 NS_R2="ns-R2" 252 # ns peer segment 262 # ns destination gateway 274 # ns family nh id destination gateway 286 # ns family prefix nh id 313 dummy6_0_prefix="fc00:1000::" [all …]
|
D | udpgro.sh | 6 readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)" 10 local -r ns="$(ip netns list|grep $PEER_NS)" 13 [ -n "$ns" ] && ip netns del $ns 2>/dev/null 40 ip netns exec "${PEER_NS}" ./udpgso_bench_rx -C 1000 -R 10 ${rx_args} && \ 84 ip netns exec "${PEER_NS}" ./udpgso_bench_rx -C 1000 -R 10 ${family} -b ${addr2%/*} ${rx_args} && \ 102 ip netns exec "${PEER_NS}" ./udpgso_bench_rx -C 1000 -R 10 ${rx_args} -p 12345 &
|
D | vrf-xfrm-tests.sh | 20 XFRM1_6=fc00:1000::1 21 XFRM2_6=fc00:1000::2 88 local ns=$1 92 if [ -n "${ns}" ]; then 93 ns="-netns ${ns}" 96 ip ${ns} link add ${vrf} type vrf table ${table} 97 ip ${ns} link set ${vrf} up 98 ip ${ns} route add vrf ${vrf} unreachable default metric 8192 99 ip ${ns} -6 route add vrf ${vrf} unreachable default metric 8192 101 ip ${ns} addr add 127.0.0.1/8 dev ${vrf} [all …]
|
/Linux-v5.10/drivers/ssb/ |
D | driver_extif.c | 86 void ssb_extif_timing_init(struct ssb_extif *extif, unsigned long ns) in ssb_extif_timing_init() argument 94 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init() 95 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init() 96 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init() 100 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init() 101 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; in ssb_extif_timing_init() 102 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init() 103 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init() 125 u32 ticks = (SSB_EXTIF_WATCHDOG_CLK / 1000) * ms; in ssb_extif_watchdog_timer_set_ms() 129 return (ticks * 1000) / SSB_EXTIF_WATCHDOG_CLK; in ssb_extif_watchdog_timer_set_ms()
|
/Linux-v5.10/drivers/video/fbdev/riva/ |
D | riva_hw.c | 253 long ns; in nv3_iterate() local 273 ns = 1000000 * ainfo->vburst_size/(state->memory_width/8)/state->mclk_khz; in nv3_iterate() 274 vfsize = ns * ainfo->vdrain_rate / 1000000; in nv3_iterate() 285 ns = 1000000 * (ainfo->gburst_size/(state->memory_width/8))/state->mclk_khz; in nv3_iterate() 286 gfsize = (ns * (long) ainfo->gdrain_rate)/1000000; in nv3_iterate() 340 … ns = 1000000 * (vmisses*state->mem_page_miss + state->mem_latency)/state->mclk_khz; in nv3_iterate() 341 vlwm = ns * ainfo->vdrain_rate/ 1000000; in nv3_iterate() 344 …ns = 1000000*(misses*state->mem_page_miss + ainfo->vburst_size)/(state->memory_width/8)/state->mcl… in nv3_iterate() 345 ainfo->vocc = ainfo->vocc + ainfo->vburst_size - ns*ainfo->vdrain_rate/1000000; in nv3_iterate() 346 ainfo->gocc = ainfo->gocc - ns*ainfo->gdrain_rate/1000000; in nv3_iterate() [all …]
|
/Linux-v5.10/drivers/media/pci/cx23885/ |
D | cx23888-ir.c | 164 * (0xffff + 1) * 1000 / 108/2 MHz = 1,213,629.629... ns 200 * 0xffff * 1000 / 108/2 MHz = 1,213,611.11... ns 212 static inline u16 ns_to_lpf_count(unsigned int ns) in ns_to_lpf_count() argument 215 DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ / 1000000 * ns, 1000)); in ns_to_lpf_count() 220 /* Duration of the Low Pass Filter rejection window in ns */ in lpf_count_to_ns() 221 return DIV_ROUND_CLOSEST(count * 1000, in lpf_count_to_ns() 239 * not readable, hence the << 2. This function returns ns. in clock_divider_to_resolution() 241 return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + 1) * 1000, in clock_divider_to_resolution() 254 n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */ in pulse_width_count_to_ns() 255 rem = do_div(n, CX23888_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns() [all …]
|
/Linux-v5.10/arch/sparc/vdso/ |
D | vclock_gettime.c | 150 u64 ns; in do_realtime() local 155 ns = vvar->wall_time_snsec; in do_realtime() 156 ns += vgetsns(vvar); in do_realtime() 157 ns >>= vvar->clock.shift; in do_realtime() 160 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime() 161 ts->tv_nsec = ns; in do_realtime() 170 u64 ns; in do_realtime_stick() local 175 ns = vvar->wall_time_snsec; in do_realtime_stick() 176 ns += vgetsns_stick(vvar); in do_realtime_stick() 177 ns >>= vvar->clock.shift; in do_realtime_stick() [all …]
|
/Linux-v5.10/drivers/net/ethernet/mscc/ |
D | ocelot_ptp.c | 17 s64 ns; in ocelot_ptp_gettime64() local 29 ns = ocelot_read_rix(ocelot, PTP_PIN_TOD_NSEC, TOD_ACC_PIN); in ocelot_ptp_gettime64() 34 if (ns >= 0x3ffffff0 && ns <= 0x3fffffff) { in ocelot_ptp_gettime64() 36 ns &= 0xf; in ocelot_ptp_gettime64() 37 ns += 999999984; in ocelot_ptp_gettime64() 40 set_normalized_timespec64(ts, s, ns); in ocelot_ptp_gettime64() 141 do_div(adj, 1000); in ocelot_ptp_adjfine() 143 /* If the adjustment value is too large, use ns instead */ in ocelot_ptp_adjfine() 146 do_div(adj, 1000); in ocelot_ptp_adjfine() 257 wf_high = 1000; in ocelot_ptp_enable()
|
/Linux-v5.10/drivers/i2c/busses/ |
D | i2c-mxs.c | 306 unsigned long timeout = jiffies + msecs_to_jiffies(1000); in mxs_i2c_pio_wait_xfer_end() 597 msecs_to_jiffies(1000)); in mxs_i2c_xfer_msg() 710 speed / 1000, speed % 1000, in mxs_i2c_derive_timing() 711 clk / divider / 1000, clk / divider % 1000); in mxs_i2c_derive_timing() 720 speed / 1000, speed % 1000, in mxs_i2c_derive_timing() 721 clk / divider / 1000, clk / divider % 1000); in mxs_i2c_derive_timing() 727 * tLOW (SCL LOW period) 4700 ns 1300 ns in mxs_i2c_derive_timing() 728 * tHIGH (SCL HIGH period) 4000 ns 600 ns in mxs_i2c_derive_timing() 729 * tSU;DAT (data setup time) 250 ns 100 ns in mxs_i2c_derive_timing() 730 * tHD;STA (START hold time) 4000 ns 600 ns in mxs_i2c_derive_timing() [all …]
|
D | i2c-jz4780.c | 249 int dev_clk_khz = clk_get_rate(i2c->clk) / 1000; in jz4780_i2c_set_speed() 263 * standard mode, min LOW and HIGH period are 4700 ns and 4000 ns in jz4780_i2c_set_speed() 264 * fast mode, min LOW and HIGH period are 1300 ns and 600 ns in jz4780_i2c_set_speed() 303 * a i2c device must internally provide a hold time at least 300ns in jz4780_i2c_set_speed() 305 * Standard Mode: min=300ns, max=3450ns in jz4780_i2c_set_speed() 306 * Fast Mode: min=0ns, max=900ns in jz4780_i2c_set_speed() 308 * Standard Mode: min=250ns, max=infinite in jz4780_i2c_set_speed() 309 * Fast Mode: min=100(250ns is recommended), max=infinite in jz4780_i2c_set_speed() 312 * on FPGA, dev_clk_khz = 12000, so 1i2c_clk = 1000/12 = 83ns in jz4780_i2c_set_speed() 313 * on Pisces(1008M), dev_clk_khz=126000, so 1i2c_clk = 1000 / 126 = 8ns in jz4780_i2c_set_speed() [all …]
|
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx4/ |
D | en_clock.c | 172 * Read the timecounter and return the correct value in ns after converting 181 u64 ns; in mlx4_en_phc_gettime() local 184 ns = timecounter_read(&mdev->clock); in mlx4_en_phc_gettime() 187 *ts = ns_to_timespec64(ns); in mlx4_en_phc_gettime() 205 u64 ns = timespec64_to_ns(ts); in mlx4_en_phc_settime() local 210 timecounter_init(&mdev->clock, &mdev->cycles, ns); in mlx4_en_phc_settime() 253 u32 freq_khz = freq * 1000; in freq_to_shift() 254 u64 max_val_cycles = freq_khz * 1000 * MLX4_EN_WRAP_AROUND_SEC; in freq_to_shift() 282 clocksource_khz2mult(1000 * dev->caps.hca_core_clock, mdev->cycles.shift); in mlx4_en_init_timestamp()
|
/Linux-v5.10/kernel/time/ |
D | sched_clock.c | 4 * counters to full 64-bit ns values. 130 u64 ns; in update_sched_clock() local 136 ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift); in update_sched_clock() 138 rd.epoch_ns = ns; in update_sched_clock() 155 u64 res, wrap, new_mask, new_epoch, cyc, ns; in sched_clock_register() local 167 /* Calculate the mult/shift to convert counter ticks to ns. */ in sched_clock_register() 182 ns = rd.epoch_ns + cyc_to_ns((cyc - rd.epoch_cyc) & rd.sched_clock_mask, rd.mult, rd.shift); in sched_clock_register() 190 rd.epoch_ns = ns; in sched_clock_register() 205 if (r >= 1000) { in sched_clock_register() 206 r /= 1000; in sched_clock_register() [all …]
|
/Linux-v5.10/arch/powerpc/kernel/ |
D | sysfs.c | 237 static unsigned int get_idle_ticks_bit(u64 ns) in get_idle_ticks_bit() argument 241 if (ns >= 10000) in get_idle_ticks_bit() 242 cycle = div_u64(ns + 500, 1000) * tb_ticks_per_usec; in get_idle_ticks_bit() 244 cycle = div_u64(ns * tb_ticks_per_usec, 1000); in get_idle_ticks_bit() 320 /* convert ms to ns */ in show_pw20_wait_time() 321 if (tb_ticks_per_usec > 1000) { in show_pw20_wait_time() 322 time = div_u64(tb_cycle, tb_ticks_per_usec / 1000); in show_pw20_wait_time() 328 time = time * 1000 + rem_us * 1000 / tb_ticks_per_usec; in show_pw20_wait_time() 442 /* convert ms to ns */ in show_altivec_idle_wait_time() 443 if (tb_ticks_per_usec > 1000) { in show_altivec_idle_wait_time() [all …]
|
/Linux-v5.10/arch/nds32/kernel/vdso/ |
D | gettimeofday.c | 85 u64 ns; in do_monotonic_coarse() local 91 ns = vdata->xtime_coarse_nsec + vdata->wtm_clock_nsec; in do_monotonic_coarse() 95 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_monotonic_coarse() 96 ts->tv_nsec = ns; in do_monotonic_coarse() 119 u64 ns; in do_realtime() local 123 ns = vdata->xtime_clock_nsec; in do_realtime() 124 ns += vgetsns(vdata); in do_realtime() 125 ns >>= vdata->cs_shift; in do_realtime() 128 ts->tv_sec += __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns); in do_realtime() 129 ts->tv_nsec = ns; in do_realtime() [all …]
|