| /OK3568_Linux_fs/kernel/drivers/gpu/drm/i915/gt/ |
| H A 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()
|
| /OK3568_Linux_fs/kernel/drivers/memory/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/arch/arm/boot/dts/ |
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/video/fbdev/omap/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/ |
| H A D | rk3399-opp.dtsi | 38 rockchip,pvtm-sample-time = <1000>; 40 rockchip,pvtm-error = <1000>; 52 clock-latency-ns = <40000>; 61 clock-latency-ns = <40000>; 70 clock-latency-ns = <40000>; 80 clock-latency-ns = <40000>; 89 clock-latency-ns = <40000>; 98 clock-latency-ns = <40000>; 132 rockchip,pvtm-sample-time = <1000>; 134 rockchip,pvtm-error = <1000>; [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/i2c/cx25840/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/video/fbdev/riva/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/timers/ |
| H A 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()
|
| /OK3568_Linux_fs/kernel/Documentation/m68k/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/net/ |
| H A D | pmtu.sh | 239 NS_A="ns-A" 240 NS_B="ns-B" 241 NS_C="ns-C" 242 NS_R1="ns-R1" 243 NS_R2="ns-R2" 262 # ns peer segment 272 # ns destination gateway 284 # ns family nh id destination gateway 296 # ns family prefix nh id 323 dummy6_0_prefix="fc00:1000::" [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/ddr/fsl/ |
| H A D | ddr1_dimm_params.c | 54 * (That is, cycle times of .25, .33, .66 and .75 ns are 82 unsigned int ps = whole_ns * 1000 + tenths_ps[tenth_ns]; in convert_bcd_tenths_to_cycle_time_ps() 111 return ((trctrfc_ext & 0x1) * 256 + trfc) * 1000 in compute_trfc_ps_from_spd() 118 return trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7]; in compute_trc_ps_from_spd() 124 * Bits 7:2 == whole ns 125 * Bits 1:0 == quarter ns 126 * 00 == 0.00 ns 127 * 01 == 0.25 ns 128 * 10 == 0.50 ns 129 * 11 == 0.75 ns [all …]
|
| /OK3568_Linux_fs/kernel/drivers/media/pci/cx23885/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/nvme/target/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/i2c/ |
| H A 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>;
|
| /OK3568_Linux_fs/kernel/arch/mips/include/asm/ |
| H A 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)
|
| /OK3568_Linux_fs/kernel/drivers/i2c/busses/ |
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/board/xes/xpedite537x/ |
| H A D | ddr.c | 47 * Minimum chip delay (Ch 0): 1.372ns 48 * Maximum chip delay (Ch 0): 2.914ns 49 * Minimum chip delay (Ch 1): 1.220ns 50 * Maximum chip delay (Ch 1): 2.595ns 52 * CLK adjust = 5 (from simulations) = 5/8* 3.33ns = 2080ps 58 * = 3.808ns 64 * = 6.240ns 70 * = 3.288ns 76 * = 5.536ns 78 * Ch.0: 3.808ns to 6.240ns additional delay needed (pick 5ns as target) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/ssb/ |
| H A 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()
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-socfpga/ |
| H A D | freeze_controller.c | 54 * Note: Delay for 20ns at min in sys_mgr_frzctrl_freeze_req() 135 * Note: Delay for 20ns at min in sys_mgr_frzctrl_thaw_req() 144 * Note: Delay for 20ns at min in sys_mgr_frzctrl_thaw_req() 160 * Note: Delay for 40ns at min in sys_mgr_frzctrl_thaw_req() 166 /* Delay 1000 intosc cycles. The intosc is based on eosc1. */ in sys_mgr_frzctrl_thaw_req() 167 eosc1_freq = cm_get_osc_clk_hz(1) / 1000; /* kHz */ in sys_mgr_frzctrl_thaw_req() 184 * is 1/50MHz * 33 = 660ns ~= 1us in sys_mgr_frzctrl_thaw_req() 196 * Note: Delay for 40ns at min in sys_mgr_frzctrl_thaw_req() 203 * Note: Delay for 40ns at min in sys_mgr_frzctrl_thaw_req()
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/host/xtest/ |
| H A D | sha_perf.c | 204 uint64_t ns = 0; in timespec_diff_ns() local 207 ns += 1000000000 * (end->tv_sec - start->tv_sec - 1); in timespec_diff_ns() 208 ns += 1000000000 - start->tv_nsec + end->tv_nsec; in timespec_diff_ns() 210 ns += 1000000000 * (end->tv_sec - start->tv_sec); in timespec_diff_ns() 211 ns += end->tv_nsec - start->tv_nsec; in timespec_diff_ns() 213 return ns; in timespec_diff_ns() 302 vverbose("Clock resolution is %jd ns\n", in sha_perf_run_test() 344 stats.min / 1000, stats.max / 1000, stats.m / 1000, in sha_perf_run_test() 345 sd / 1000, 100 * sd / stats.m, mb_per_sec(size, stats.m)); in sha_perf_run_test() 347 (stats.m - 2 * sd) / 1000, (stats.m + 2 * sd) / 1000, in sha_perf_run_test()
|
| /OK3568_Linux_fs/kernel/arch/powerpc/kernel/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/mscc/ |
| H A 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()
|
| /OK3568_Linux_fs/kernel/arch/sparc/vdso/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx4/ |
| H A 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()
|