/linux/drivers/net/ethernet/chelsio/libcxgb/ |
H A D | libcxgb_ppm.h | 8 * General Public License (GPL) Version 2, available from the file 77 * [page selector:2] [sw/free bits] [0] [idx] [color:6] 113 unsigned char pg_idx:2; 120 /* per cpu ppm pool */ 124 spinlock_t lock; /* ppm pool lock */ 143 spinlock_t map_lock; /* ppm map lock */ 153 #define PPOD_PAGES_SHIFT 2 /* 4 pages per pod */ 158 /* page pods are allocated in groups of this size (must be power of 2) */ 197 static inline int cxgbi_ppm_is_ddp_tag(struct cxgbi_ppm *ppm, u32 tag) in cxgbi_ppm_is_ddp_tag() argument 199 return !(tag & ppm->tformat.no_ddp_mask); in cxgbi_ppm_is_ddp_tag() [all …]
|
H A D | libcxgb_ppm.c | 8 * General Public License (GPL) Version 2, available from the file 65 int cxgbi_ppm_find_page_index(struct cxgbi_ppm *ppm, unsigned long pgsz) in cxgbi_ppm_find_page_index() argument 67 struct cxgbi_tag_format *tformat = &ppm->tformat; in cxgbi_ppm_find_page_index() 73 pr_debug("%s: %s ppm, pgsz %lu -> idx %d.\n", in cxgbi_ppm_find_page_index() 74 __func__, ppm->ndev->name, pgsz, i); in cxgbi_ppm_find_page_index() 104 static void ppm_mark_entries(struct cxgbi_ppm *ppm, int i, int count, in ppm_mark_entries() argument 107 struct cxgbi_ppod_data *pdata = ppm->ppod_data + i; in ppm_mark_entries() 118 static int ppm_get_cpu_entries(struct cxgbi_ppm *ppm, unsigned int count, in ppm_get_cpu_entries() argument 125 if (!ppm->pool) in ppm_get_cpu_entries() 129 pool = per_cpu_ptr(ppm->pool, cpu); in ppm_get_cpu_entries() [all …]
|
/linux/tools/testing/selftests/timers/ |
H A D | raw_skew.c | 13 * the Free Software Foundation, either version 2 of the License, or 84 tmp = (ts_to_nsec(start) + ts_to_nsec(end))/2; in get_monotonic_and_raw() 93 long long delta1, delta2, interval, eppm, ppm; in main() 124 /* calculate measured ppm between MONOTONIC and MONOTONIC_RAW */ in main() 130 ppm = (long long)(tx1.freq + tx2.freq) * 1000 / 2; in main() 131 ppm = shift_right(ppm, 16); in main() 132 printf(" %lld.%i(act)", ppm/1000, abs((int)(ppm in main() 95 long long delta1, delta2, interval, eppm, ppm; main() local [all...] |
H A D | adjtick.c | 11 * the Free Software Foundation, either version 2 of the License, or 86 tmp = (ts_to_nsec(start) + ts_to_nsec(end))/2; in get_monotonic_and_raw() 113 long long eppm, ppm; in get_ppm_drift() 130 ppm = ((long long)tickval * MILLION)/systick - MILLION; in check_tick_adj() 131 printf("Estimating tick (act: %ld usec, %lld ppm): ", tickval, ppm); in check_tick_adj() 134 printf("%lld usec, %lld ppm", systick + (systick * eppm / MILLION), eppm); in check_tick_adj() 147 * Here we use 100ppm difference as an error bound. in check_tick_adj() 151 * with the adjustment, resulting in > 10ppm error during in check_tick_adj() 152 * a 10% adjustment. 100ppm als in check_tick_adj() 117 long long eppm, ppm; check_tick_adj() local [all...] |
H A D | change_skew.c | 16 * the Free Software Foundation, either version 2 of the License, or 33 int change_skew_test(int ppm) in change_skew_test() argument 39 tx.freq = ppm << 16; in change_skew_test() 60 int ppm[5] = {0, 250, 500, -250, -500}; in main() local 76 printf("Using %i ppm adjustment\n", ppm[i]); in main() 77 ret = change_skew_test(ppm[i]); in main()
|
H A D | skew_consistency.c | 16 * the Free Software Foundation, either version 2 of the License, or 42 int ret, ppm; in main() local 52 ppm = 500; in main() 56 ppm = -ppm; in main() 58 tx.freq = ppm << 16; in main()
|
H A D | valid-adjtimex.c | 16 * the Free Software Foundation, either version 2 of the License, or 58 #define NUM_FREQ_INVALID 2 131 printf("Error: adjtimex(ADJ_FREQ, %ld - %ld ppm\n", in validate_freq() 150 printf("Error: adjtimex(ADJ_FREQ, %ld - %ld ppm\n", in validate_freq() 269 if (set_offset(5 * NSEC_PER_SEC + NSEC_PER_SEC / 2, 1)) in validate_set_offset() 272 if (set_offset(-5 * NSEC_PER_SEC - NSEC_PER_SEC / 2, 1)) in validate_set_offset() 290 if (set_offset(5 * USEC_PER_SEC + USEC_PER_SEC / 2, 0)) in validate_set_offset() 293 if (set_offset(-5 * USEC_PER_SEC - USEC_PER_SEC / 2, 0)) in validate_set_offset() 301 if (set_bad_offset(0, 2 * NSEC_PER_SEC, 1)) in validate_set_offset() 303 if (set_bad_offset(0, 2 * USEC_PER_SE in validate_set_offset() [all...] |
/linux/drivers/scsi/isci/ |
H A D | probe_roms.h | 10 * it under the terms of version 2 of the GNU General Public License as 69 /* generation 2 (i.e. 3.0 Gb/s) */ 70 #define SCIC_SDS_PARM_GEN2_SPEED 2 95 * to transmit 2 ALIGN primitives. This applies for SAS connections 104 * - A value of 2 indicates generation 2 (i.e. 3.0 Gb/s). 175 #define SCI_MAX_CONTROLLERS 2 234 * NOTE: Max spread for SATA is +0 / -5000 PPM. 237 * SATA SSC Tx at +0 / -1419 PPM Spread = 0x2 238 * SATA SSC Tx at +0 / -2129 PPM Spread = 0x3 239 * SATA SSC Tx at +0 / -4257 PPM Spread = 0x6 [all …]
|
/linux/drivers/target/iscsi/cxgbit/ |
H A D | cxgbit_ddp.c | 64 cxgbit_ppod_init_idata(struct cxgbit_device *cdev, struct cxgbi_ppm *ppm, in cxgbit_ppod_init_idata() argument 69 unsigned int pm_addr = (idx << PPOD_SIZE_SHIFT) + ppm->llimit; in cxgbit_ppod_init_idata() 98 cxgbit_ppod_write_idata(struct cxgbi_ppm *ppm, struct cxgbit_sock *csk, in cxgbit_ppod_write_idata() argument 110 skb = cxgbit_ppod_init_idata(cdev, ppm, idx, npods, csk->tid); in cxgbit_ppod_write_idata() 127 cxgbit_ddp_set_map(struct cxgbi_ppm *ppm, struct cxgbit_sock *csk, in cxgbit_ddp_set_map() argument 143 ret = cxgbit_ppod_write_idata(ppm, csk, ttinfo, pidx, cnt, in cxgbit_ddp_set_map() 175 struct cxgbi_ppm *ppm = cdev2ppm(cdev); in cxgbit_ddp_reserve() local 182 pr_debug("ppm 0x%p, pgidx %u, xfer %u, sgcnt %u, NO ddp.\n", in cxgbit_ddp_reserve() 183 ppm, ppm->tformat.pgsz_idx_dflt, in cxgbit_ddp_reserve() 197 ret = cxgbi_ppm_ppods_reserve(ppm, ttinfo->nr_pages, 0, &ttinfo->idx, in cxgbit_ddp_reserve() [all …]
|
/linux/drivers/clocksource/ |
H A D | scx200_hrt.c | 27 static int ppm; variable 28 module_param(ppm, int, 0); /* load time only */ 29 MODULE_PARM_DESC(ppm, "+-adjust to actual XO freq (ppm)"); 37 #define HR_TM27MPD (1 << 2) /* 1 turns off input clock (power-down) */ 76 freq = (HRT_FREQ + ppm); in init_hrt_clocksource() 80 pr_info("enabling scx200 high-res timer (%s MHz +%d ppm)\n", mhz27 ? "27":"1", ppm); in init_hrt_clocksource()
|
/linux/Documentation/devicetree/bindings/iio/afe/ |
H A D | temperature-transducer.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 78 alpha-ppm-per-celsius: 92 - alpha-ppm-per-celsius 103 alpha-ppm-per-celsius = <1>; /* 1 uA/K */ 109 io-channels = <&temp_adc 2>; 112 alpha-ppm-per-celsius = <4000>; /* 4 mV/K */
|
H A D | temperature-sense-rtd.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 62 alpha-ppm-per-celsius: 87 - alpha-ppm-per-celsius 98 alpha-ppm-per-celsius = <3908>;
|
/linux/drivers/media/dvb-frontends/ |
H A D | l64781.c | 44 struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 }; in l64781_writereg() 61 ret = i2c_transfer(state->i2c, msg, 2); in l64781_readreg() 63 if (ret != 2) return ret; in l64781_readreg() 113 static const u8 fec_tab[] = { 7, 0, 1, 2, 9, 3, 10, 4 }; in apply_frontend_param() 115 static const u8 qam_tab [] = { 2, 4, 0, 6 }; in apply_frontend_param() 116 static const u8 guard_tab [] = { 1, 2, 4, 8 }; in apply_frontend_param() 118 static const u32 ppm = 8000; in apply_frontend_param() local 120 /* u32 ddfs_offset_variable = 0x6000-((1000000UL+ppm)/ */ in apply_frontend_param() 179 ddfs_offset_fixed = 0x4000-(ppm<<16)/bw/1000000; in apply_frontend_param() 181 /* This works up to 20000 ppm, it overflows if too large ppm! */ in apply_frontend_param() [all …]
|
/linux/include/uapi/linux/ |
H A D | timex.h | 68 __kernel_long_t freq; /* frequency offset (scaled ppm) */ 74 __kernel_long_t tolerance;/* clock frequency tolerance (ppm) 80 __kernel_long_t ppsfreq;/* pps frequency (scaled ppm) (ro) */ 83 __kernel_long_t stabil; /* pps stability (scaled ppm) (ro) */ 106 long long freq; /* frequency offset (scaled ppm) */ 113 long long tolerance;/* clock frequency tolerance (ppm) 119 long long ppsfreq;/* pps frequency (scaled ppm) (ro) */ 123 long long stabil; /* pps stability (scaled ppm) (ro) */ 200 #define TIME_DEL 2 /* delete leap second */
|
/linux/drivers/media/dvb-frontends/cxd2880/ |
H A D | cxd2880_tnrdmd_dvbt_mon.c | 133 *mode = (enum cxd2880_dvbt_mode)((rdata >> 2) & 0x03); in cxd2880_tnrdmd_dvbt_mon_mode_guard() 184 ((rdata[0] & 0x1f) << 24) | (rdata[1] << 16) | (rdata[2] << 8) | in cxd2880_tnrdmd_dvbt_mon_carrier_offset() 282 info->fnum = (rdata[2] >> 6) & 0x03; in cxd2880_tnrdmd_dvbt_mon_tps_info() 283 info->length_indicator = rdata[2] & 0x3f; in cxd2880_tnrdmd_dvbt_mon_tps_info() 328 *pen = (rdata[1] << 8) | rdata[2]; in cxd2880_tnrdmd_dvbt_mon_packet_error_number() 394 u8 rdata[2]; in dvbt_read_snr_reg() 420 0x13, rdata, 2); in dvbt_read_snr_reg() 543 *tnr_dmd, int *ppm) in cxd2880_tnrdmd_dvbt_mon_sampling_offset() argument 554 if (!tnr_dmd || !ppm) in cxd2880_tnrdmd_dvbt_mon_sampling_offset() 616 trl_ctl_val |= ctl_val_reg[2] << 16; in cxd2880_tnrdmd_dvbt_mon_sampling_offset() [all …]
|
/linux/drivers/net/ethernet/ti/ |
H A D | am65-cpts.c | 30 u32 ppm_low; /* PPM Load Low Value 0:31 */ 31 u32 ppm_hi; /* PPM Load High Value 32:63 */ 59 u32 ts_ppm_low; /* Time Stamp PPM Load Low Value 0:31 */ 60 u32 ts_ppm_hi; /* Time Stamp PPM Load High Value 32:63 */ 70 #define AM65_CPTS_CONTROL_TS_COMP_POLARITY BIT(2) 458 /* GenF PPM will do correction using cpts refclk tick which is in am65_cpts_ptp_adjfine() 459 * (cpts->ts_add_val + 1) ns, so GenF length PPM adj period in am65_cpts_ptp_adjfine() 470 * - delay between PPM dir and PPM value changes can cause err due old in am65_cpts_ptp_adjfine() 471 * PPM correction applied in wrong direction in am65_cpts_ptp_adjfine() 472 * - delay between CPTS-clock PPM cfg and GenF PPM cfg can cause err in am65_cpts_ptp_adjfine() [all …]
|
/linux/drivers/gpu/drm/radeon/ |
H A D | r600_dpm.c | 170 (radeon_crtc->v_border * 2)); in r600_dpm_get_vblank_time() 215 *u = (b_c + 1) / 2; in r600_calculate_u_and_p() 216 *p = i_c / (1 << (2 * (*u))); in r600_calculate_u_and_p() 447 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable() 450 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable() 458 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable_pulse_skipping() 461 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable_pulse_skipping() 469 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable_post_divider() 472 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART2 + (index * 4 * 2), in r600_engine_clock_entry_enable_post_divider() 479 WREG32_P(SCLK_FREQ_SETTING_STEP_0_PART1 + (index * 4 * 2), in r600_engine_clock_entry_set_post_divider() [all …]
|
/linux/drivers/scsi/cxgbi/ |
H A D | libcxgbi.c | 1224 struct cxgbi_ppm *ppm = (struct cxgbi_ppm *)(*ppm_pp); in cxgbi_ddp_ppm_setup() local 1226 if (ppm->ppmax < 1024 || in cxgbi_ddp_ppm_setup() 1227 ppm->tformat.pgsz_idx_dflt >= DDP_PGIDX_MAX) in cxgbi_ddp_ppm_setup() 1266 struct cxgbi_ppm *ppm = cdev->cdev2ppm(cdev); in cxgbi_ddp_reserve() local 1279 if (!ppm || xferlen < DDP_THRESHOLD || !sgcnt || in cxgbi_ddp_reserve() 1280 ppm->tformat.pgsz_idx_dflt >= DDP_PGIDX_MAX) { in cxgbi_ddp_reserve() 1282 "ppm 0x%p, pgidx %u, xfer %u, sgcnt %u, NO ddp.\n", in cxgbi_ddp_reserve() 1283 ppm, ppm ? ppm->tformat.pgsz_idx_dflt : DDP_PGIDX_MAX, in cxgbi_ddp_reserve() 1297 * the itt generated by libiscsi is saved in the ppm and can be in cxgbi_ddp_reserve() 1300 err = cxgbi_ppm_ppods_reserve(ppm, ttinfo->nr_pages, 0, &ttinfo->idx, in cxgbi_ddp_reserve() [all …]
|
/linux/include/linux/ |
H A D | ptp_clock_kernel.h | 231 * scaled_ppm_to_ppb() - convert scaled ppm to ppb 233 * @ppm: Parts per million, but with a 16 bit binary fractional field 235 static inline long scaled_ppm_to_ppb(long ppm) in scaled_ppm_to_ppb() argument 243 * ppb = scaled_ppm * 1000 / 2^16 in scaled_ppm_to_ppb() 247 * ppb = scaled_ppm * 125 / 2^13 in scaled_ppm_to_ppb() 249 s64 ppb = 1 + ppm; in scaled_ppm_to_ppb() 257 * diff_by_scaled_ppm - Calculate difference using scaled ppm
|
/linux/drivers/gpu/drm/amd/pm/legacy-dpm/ |
H A D | legacy_dpm.c | 249 if (fan_info->fan.ucFanTableFormat >= 2) in amdgpu_parse_extended_power_table() 528 ATOM_PPLIB_PPM_Table *ppm = (ATOM_PPLIB_PPM_Table *) in amdgpu_parse_extended_power_table() local 535 adev->pm.dpm.dyn_state.ppm_table->ppm_design = ppm->ucPpmDesign; in amdgpu_parse_extended_power_table() 537 le16_to_cpu(ppm->usCpuCoreNumber); in amdgpu_parse_extended_power_table() 539 le32_to_cpu(ppm->ulPlatformTDP); in amdgpu_parse_extended_power_table() 541 le32_to_cpu(ppm->ulSmallACPlatformTDP); in amdgpu_parse_extended_power_table() 543 le32_to_cpu(ppm->ulPlatformTDC); in amdgpu_parse_extended_power_table() 545 le32_to_cpu(ppm->ulSmallACPlatformTDC); in amdgpu_parse_extended_power_table() 547 le32_to_cpu(ppm->ulApuTDP); in amdgpu_parse_extended_power_table() 549 le32_to_cpu(ppm->ulDGpuTDP); in amdgpu_parse_extended_power_table() [all …]
|
/linux/drivers/video/logo/ |
H A D | pnmtologo.c | 26 #define LINUX_LOGO_VGA16 2 /* 16 colors VGA text palette */ 74 __attribute__((noreturn)) __attribute((format (printf, 1, 2))); 118 return (255*val+maxval/2)/maxval; in get_number255() 140 case '2': in read_image() 142 /* Plain PBM/PGM/PPM */ in read_image() 148 /* Binary PBM/PGM/PPM */ in read_image() 179 case '2': in read_image() 189 /* Plain PPM */ in read_image() 318 "Use ppmquant(1) -map clut_vga16.ppm to reduce the number " in write_logo_vga16()
|
/linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | ptp.c | 14 /* The scaled_ppm parameter is ppm (parts per million) with a 16-bit fractional 16 * 2^-16 ppm, and 2^16=65536 is 1 ppm.
|
/linux/arch/alpha/kernel/ |
H A D | time.c | 20 * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM 241 outb(0xb6, 0x43); /* pit counter 2: speaker */ in common_init_rtc() 352 * Now let's take care of CTC channel 2 in calibrate_cc_with_pit() 354 * Set the Gate high, program CTC channel 2 for mode 0, in calibrate_cc_with_pit() 358 outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */ in calibrate_cc_with_pit() 409 /* Calibrate CPU clock -- attempt #2. */ in time_init() 419 /* If the given value is within 250 PPM of what we calculated, in time_init()
|
/linux/drivers/usb/typec/ucsi/ |
H A D | ucsi.c | 21 * UCSI_TIMEOUT_MS - PPM communication timeout 26 * before it is actually passed to the PPM. 34 * if the PPM does not generate Connector Change events before that with 180 dev_warn(ucsi->dev, "PPM Policy conflict\n"); in ucsi_read_error() 561 struct ucsi_altmode alt[2]; in ucsi_register_altmodes() 1393 /* Give the PPM time to process a reset before reading CCI */ in ucsi_reset_ppm() 1400 /* If the PPM is still doing something else, reset it again. */ in ucsi_reset_ppm() 1422 /* PPM most likely stopped responding. Resetting everything. */ in ucsi_role_cmd() 1765 /* Reset the PPM */ in ucsi_init() 1768 dev_err(ucsi->dev, "failed to reset PPM!\n"); in ucsi_init() [all …]
|
/linux/drivers/clk/ |
H A D | clk-si570.c | 112 *n1 = ((reg[0] & N1_6_2_MASK) << 2) + ((reg[1] & N1_1_0_MASK) >> 6) + 1; in si570_get_divs() 118 tmp = (tmp << 8) + reg[2]; in si570_get_divs() 175 reg[2] = (data->rfreq >> 16) & 0xff; in si570_update_rfreq() 219 n1 += (n1 == 1 ? 1 : 2); in si570_calc_divs() 263 div64_u64(data->frequency, 2), data->frequency); in si570_round_rate() 285 * Update output frequency for big frequency changes (> 3,500 ppm). 303 (((data->n1 - 1) >> 2) & N1_6_2_MASK)); in si570_set_frequency() 320 * Update output frequency for small frequency changes (< 3,500 ppm). 331 div_u64(data->frequency, 2), data->frequency); in si570_set_frequency_small() 433 /* adjust register offsets for 7ppm devices */ in si570_probe()
|