| /drivers/net/ethernet/cadence/ |
| A D | macb_ptp.c | 128 u64 adj; in gem_ptp_adjfine() local 141 adj = (u64)scaled_ppm * word; in gem_ptp_adjfine() 145 adj += (USEC_PER_SEC >> 1); in gem_ptp_adjfine() 147 adj = div_u64(adj, USEC_PER_SEC); in gem_ptp_adjfine() 148 adj = neg_adj ? (word - adj) : (word + adj); in gem_ptp_adjfine() 150 incr_spec.ns = (adj >> GEM_SUBNSINCR_SIZE) in gem_ptp_adjfine() 161 u32 adj, sign = 0; in gem_ptp_adjtime() local 177 gem_writel(bp, TA, adj); in gem_ptp_adjtime() 208 u64 adj; in gem_ptp_init_timer() local 212 adj = rem; in gem_ptp_init_timer() [all …]
|
| /drivers/gpu/drm/atmel-hlcdc/ |
| A D | atmel_hlcdc_crtc.c | 106 vm.vfront_porch = adj->crtc_vsync_start - adj->crtc_vdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 107 vm.vback_porch = adj->crtc_vtotal - adj->crtc_vsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 108 vm.vsync_len = adj->crtc_vsync_end - adj->crtc_vsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 109 vm.hfront_porch = adj->crtc_hsync_start - adj->crtc_hdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 110 vm.hback_porch = adj->crtc_htotal - adj->crtc_hsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 111 vm.hsync_len = adj->crtc_hsync_end - adj->crtc_hsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 123 (adj->crtc_hdisplay - 1) | in atmel_hlcdc_crtc_mode_set_nofb() 124 ((adj->crtc_vdisplay - 1) << 16)); in atmel_hlcdc_crtc_mode_set_nofb() 127 mode_rate = adj->crtc_clock * 1000; in atmel_hlcdc_crtc_mode_set_nofb() 170 if (adj->flags & DRM_MODE_FLAG_NVSYNC) in atmel_hlcdc_crtc_mode_set_nofb() [all …]
|
| /drivers/net/ethernet/marvell/octeontx2/af/ |
| A D | ptp.c | 212 adj = comp * ns_drift; in ptp_calc_adjusted_comp() 213 adj = adj / 1000000000ULL; in ptp_calc_adjusted_comp() 216 comp += adj; in ptp_calc_adjusted_comp() 221 adj = comp * cycle_time; in ptp_calc_adjusted_comp() 222 adj = adj / 1000000000ULL; in ptp_calc_adjusted_comp() 223 adj = adj / CYCLE_MULT; in ptp_calc_adjusted_comp() 224 comp -= adj; in ptp_calc_adjusted_comp() 316 u64 comp, adj; in ptp_adjfine() local 350 adj = comp * ppb; in ptp_adjfine() 351 adj = div_u64(adj, 1000000000ull); in ptp_adjfine() [all …]
|
| /drivers/gpu/drm/armada/ |
| A D | armada_crtc.c | 341 rm = adj->crtc_hsync_start - adj->crtc_hdisplay; in armada_drm_crtc_mode_set_nofb() 342 lm = adj->crtc_htotal - adj->crtc_hsync_end; in armada_drm_crtc_mode_set_nofb() 343 bm = adj->crtc_vsync_start - adj->crtc_vdisplay; in armada_drm_crtc_mode_set_nofb() 344 tm = adj->crtc_vtotal - adj->crtc_vsync_end; in armada_drm_crtc_mode_set_nofb() 360 adj->crtc_htotal; in armada_drm_crtc_mode_set_nofb() 362 val = adj->crtc_hsync_start; in armada_drm_crtc_mode_set_nofb() 367 val -= adj->crtc_htotal / 2; in armada_drm_crtc_mode_set_nofb() 376 val = adj->crtc_vdisplay << 16 | adj->crtc_hdisplay; in armada_drm_crtc_mode_set_nofb() 401 if (adj->flags & DRM_MODE_FLAG_NCSYNC) in armada_drm_crtc_mode_set_nofb() 403 if (adj->flags & DRM_MODE_FLAG_NHSYNC) in armada_drm_crtc_mode_set_nofb() [all …]
|
| /drivers/block/drbd/ |
| A D | drbd_vli.h | 136 u64 adj = 1; in vli_decode_bits() local 141 *out = ((in & ((~0ULL) >> (64-t))) >> b) + adj; \ in vli_decode_bits() 144 adj += 1ULL << (t - b); \ in vli_decode_bits() 159 u64 adj = 1; in __vli_encode_bits() local 168 *out = ((in - adj) << b) | v; \ in __vli_encode_bits() 171 adj = max + 1; \ in __vli_encode_bits()
|
| /drivers/interconnect/imx/ |
| A D | imx.c | 70 freq = (node->avg_bw + node->peak_bw) * node_data->desc->adj->bw_mul; in imx_icc_node_set() 71 do_div(freq, node_data->desc->adj->bw_div); in imx_icc_node_set() 121 const struct imx_icc_node_adj_desc *adj = node_data->desc->adj; in imx_icc_node_init_qos() local 126 if (adj->main_noc) { in imx_icc_node_init_qos() 131 dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0); in imx_icc_node_init_qos() 134 adj->phandle_name); in imx_icc_node_init_qos() 140 adj->phandle_name, node->name); in imx_icc_node_init_qos() 197 if (node_desc->adj) { in imx_icc_node_add()
|
| A D | imx.h | 75 const struct imx_icc_node_adj_desc *adj; member 96 .adj = _adj, \
|
| /drivers/net/ethernet/cavium/common/ |
| A D | cavium_ptp.c | 99 u64 adj; in cavium_ptp_adjfine() local 123 adj = comp * scaled_ppm; in cavium_ptp_adjfine() 124 adj >>= 16; in cavium_ptp_adjfine() 125 adj = div_u64(adj, 1000000ull); in cavium_ptp_adjfine() 126 comp = neg_adj ? comp - adj : comp + adj; in cavium_ptp_adjfine()
|
| /drivers/ptp/ |
| A D | ptp_mock.c | 52 s64 adj; in mock_phc_adjfine() local 54 adj = (s64)scaled_ppm << MOCK_PHC_FADJ_SHIFT; in mock_phc_adjfine() 55 adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR); in mock_phc_adjfine() 59 phc->cc.mult = MOCK_PHC_CC_MULT + adj; in mock_phc_adjfine()
|
| A D | ptp_vclock.c | 46 s64 adj; in ptp_vclock_adjfine() local 48 adj = (s64)scaled_ppm << PTP_VCLOCK_FADJ_SHIFT; in ptp_vclock_adjfine() 49 adj = div_s64(adj, PTP_VCLOCK_FADJ_DENOMINATOR); in ptp_vclock_adjfine() 54 vclock->cc.mult = PTP_VCLOCK_CC_MULT + adj; in ptp_vclock_adjfine()
|
| /drivers/gpu/drm/imx/dc/ |
| A D | dc-crtc.c | 155 struct drm_display_mode *adj = &new_crtc_state->adjusted_mode; in dc_crtc_atomic_check() local 159 status = dc_crtc_check_clock(dc_crtc, adj->clock); in dc_crtc_atomic_check() 229 struct drm_display_mode *adj = &new_crtc_state->adjusted_mode; in dc_crtc_atomic_enable() local 234 dc_crtc_dbg(crtc, "mode " DRM_MODE_FMT "\n", DRM_MODE_ARG(adj)); in dc_crtc_atomic_enable() 251 dc_fg_cfg_videomode(dc_crtc->fg, adj); in dc_crtc_atomic_enable() 254 adj->crtc_hdisplay, adj->crtc_vdisplay); in dc_crtc_atomic_enable() 256 adj->crtc_hdisplay, adj->crtc_vdisplay); in dc_crtc_atomic_enable()
|
| /drivers/usb/gadget/udc/ |
| A D | r8a66597-udc.h | 200 int adj = 0; in r8a66597_write_fifo() local 222 adj = 0x03; /* 32-bit wide */ in r8a66597_write_fifo() 224 adj = 0x01; /* 16-bit wide */ in r8a66597_write_fifo() 230 iowrite8(buf[i], fifoaddr + adj - (i & adj)); in r8a66597_write_fifo()
|
| /drivers/thermal/renesas/ |
| A D | rcar_gen3_thermal.c | 166 int adj, decicelsius, reg, thcode; in rcar_gen3_thermal_get_temp() local 172 adj = priv->info->adj_below; in rcar_gen3_thermal_get_temp() 176 adj = priv->info->adj_above; in rcar_gen3_thermal_get_temp() 192 *temp = decicelsius * 100 + adj * 1000; in rcar_gen3_thermal_get_temp() 202 int adj, celsius, thcode; in rcar_gen3_thermal_mcelsius_to_temp() local 207 adj = priv->info->adj_below; in rcar_gen3_thermal_mcelsius_to_temp() 211 adj = priv->info->adj_above; in rcar_gen3_thermal_mcelsius_to_temp() 215 return thcode - DIV_ROUND_CLOSEST((celsius - adj) * coef->b, coef->a); in rcar_gen3_thermal_mcelsius_to_temp()
|
| /drivers/macintosh/ |
| A D | windfarm_pid.c | 91 s32 error, target, sval, adj; in wf_cpu_pid_run() local 120 adj = min(st->param.ttarget, sval); in wf_cpu_pid_run() 122 DBG("integ: %lx, sval: %lx, adj: %lx\n", integ, sval, adj); in wf_cpu_pid_run() 131 prop = st->last_delta = (new_temp - adj); in wf_cpu_pid_run()
|
| /drivers/video/backlight/ |
| A D | corgi_lcd.c | 189 int adj; in lcdtg_set_phadadj() local 194 adj = sharpsl_param.phadadj; in lcdtg_set_phadadj() 195 adj = (adj < 0) ? PHACTRL_PHASE_MANUAL : in lcdtg_set_phadadj() 196 PHACTRL_PHASE_MANUAL | ((adj & 0xf) << 1); in lcdtg_set_phadadj() 201 adj = (DEFAULT_PHAD_QVGA << 1) | PHACTRL_PHASE_MANUAL; in lcdtg_set_phadadj() 205 corgi_ssp_lcdtg_send(lcd, PHACTRL_ADRS, adj); in lcdtg_set_phadadj()
|
| /drivers/rtc/ |
| A D | rtc-rx8025.c | 483 long adj; in rx8025_sysfs_show_clock_adjust() local 487 err = rx8025_read_offset(dev, &adj); in rx8025_sysfs_show_clock_adjust() 491 return sprintf(buf, "%ld\n", -adj); in rx8025_sysfs_show_clock_adjust() 498 long adj; in rx8025_sysfs_store_clock_adjust() local 502 if (kstrtol(buf, 10, &adj) != 0) in rx8025_sysfs_store_clock_adjust() 505 err = rx8025_set_offset(dev, -adj); in rx8025_sysfs_store_clock_adjust()
|
| /drivers/gpu/drm/i915/gt/ |
| A D | intel_rps.c | 890 int adj; in intel_rps_park() local 935 adj *= 2; in intel_rps_park() 937 adj = -2; in intel_rps_park() 1854 adj = 0; in rps_work() 1857 adj *= 2; in rps_work() 1862 adj = 0; in rps_work() 1864 adj = 0; in rps_work() 1870 adj = 0; in rps_work() 1878 adj = 0; in rps_work() 1880 adj = 0; in rps_work() [all …]
|
| /drivers/net/ethernet/mscc/ |
| A D | ocelot_ptp.c | 143 u64 adj = 0; in ocelot_ptp_adjfine() local 155 adj = PSEC_PER_SEC << 16; in ocelot_ptp_adjfine() 156 do_div(adj, scaled_ppm); in ocelot_ptp_adjfine() 157 do_div(adj, 1000); in ocelot_ptp_adjfine() 160 if (adj >= (1L << 30)) { in ocelot_ptp_adjfine() 162 do_div(adj, 1000); in ocelot_ptp_adjfine() 166 if (adj >= (1L << 30)) in ocelot_ptp_adjfine() 169 ocelot_write(ocelot, unit | adj, PTP_CLK_CFG_ADJ_FREQ); in ocelot_ptp_adjfine()
|
| /drivers/gpu/drm/bridge/analogix/ |
| A D | anx7625.c | 2249 struct drm_display_mode *adj) in anx7625_bridge_mode_fixup() argument 2270 hsync, hfp, hbp, adj->clock); in anx7625_bridge_mode_fixup() 2272 adj->hsync_start, adj->hsync_end, adj->htotal); in anx7625_bridge_mode_fixup() 2308 vref = adj->clock * 1000 / (adj->htotal * adj->vtotal); in anx7625_bridge_mode_fixup() 2311 adj_clock = vref * delta_adj * adj->vtotal; in anx7625_bridge_mode_fixup() 2312 adj->clock += DIV_ROUND_UP(adj_clock, 1000); in anx7625_bridge_mode_fixup() 2315 adj_clock = vref * delta_adj * adj->vtotal; in anx7625_bridge_mode_fixup() 2355 adj->hsync_start = adj->hdisplay + adj_hfp; in anx7625_bridge_mode_fixup() 2356 adj->hsync_end = adj->hsync_start + adj_hsync; in anx7625_bridge_mode_fixup() 2357 adj->htotal = adj->hsync_end + adj_hbp; in anx7625_bridge_mode_fixup() [all …]
|
| /drivers/net/dsa/hirschmann/ |
| A D | hellcreek_ptp.c | 137 u64 adj; in hellcreek_ptp_adjfine() local 156 adj = scaled_ppm; in hellcreek_ptp_adjfine() 157 adj <<= 11; in hellcreek_ptp_adjfine() 158 addend = (u32)div_u64(adj, 15625); in hellcreek_ptp_adjfine()
|
| /drivers/gpu/drm/bridge/ |
| A D | sii902x.c | 359 const struct drm_display_mode *adj) in sii902x_bridge_mode_set() argument 366 u16 pixel_clock_10kHz = adj->clock / 10; in sii902x_bridge_mode_set() 374 buf[2] = drm_mode_vrefresh(adj); in sii902x_bridge_mode_set() 376 buf[4] = adj->hdisplay; in sii902x_bridge_mode_set() 377 buf[5] = adj->hdisplay >> 8; in sii902x_bridge_mode_set() 378 buf[6] = adj->vdisplay; in sii902x_bridge_mode_set() 379 buf[7] = adj->vdisplay >> 8; in sii902x_bridge_mode_set() 397 &sii902x->connector, adj); in sii902x_bridge_mode_set()
|
| /drivers/net/ethernet/intel/ice/ |
| A D | ice_ptp_hw.c | 1279 cycles = (s64)adj << 32; in ice_ptp_prep_phy_adj_eth56g() 2910 if (adj > 0) in ice_ptp_prep_phy_adj_e82x() 2911 cycles = (s64)adj << 32; in ice_ptp_prep_phy_adj_e82x() 2913 cycles = -(((s64)-adj) << 32); in ice_ptp_prep_phy_adj_e82x() 3650 adj = div_u64(tu_per_sec, 125); in ice_phy_calc_pmd_adj_e82x() 3651 adj *= mult; in ice_phy_calc_pmd_adj_e82x() 3652 adj = div_u64(adj, e822_vernier[link_spd].pmd_adj_divisor); in ice_phy_calc_pmd_adj_e82x() 3677 adj += cycle_adj; in ice_phy_calc_pmd_adj_e82x() 3699 adj += cycle_adj; in ice_phy_calc_pmd_adj_e82x() 3704 *pmd_adj = adj; in ice_phy_calc_pmd_adj_e82x() [all …]
|
| /drivers/net/ethernet/pensando/ionic/ |
| A D | ionic_phc.c | 322 s64 adj; in ionic_phc_adjfine() local 330 adj = (s64)scaled_ppm * phc->init_cc_mult; in ionic_phc_adjfine() 333 adj /= (s64)SCALED_PPM; in ionic_phc_adjfine() 336 adj += phc->init_cc_mult; in ionic_phc_adjfine() 342 phc->cc.mult = adj; in ionic_phc_adjfine()
|
| /drivers/net/wireless/mediatek/mt76/mt7603/ |
| A D | mac.c | 1718 u32 adj; in mt7603_adjust_sensitivity() local 1723 adj = 7 + (dev->sensitivity + 92) / 2; in mt7603_adjust_sensitivity() 1726 agc0 |= adj << 12; in mt7603_adjust_sensitivity() 1727 agc0 |= adj << 16; in mt7603_adjust_sensitivity() 1733 agc0 |= adj << 8; in mt7603_adjust_sensitivity() 1734 agc0 |= adj << 12; in mt7603_adjust_sensitivity() 1735 agc0 |= adj << 16; in mt7603_adjust_sensitivity() 1745 agc0 |= adj << 4; in mt7603_adjust_sensitivity() 1746 agc0 |= adj << 8; in mt7603_adjust_sensitivity() 1747 agc0 |= adj << 12; in mt7603_adjust_sensitivity() [all …]
|
| /drivers/net/dsa/mv88e6xxx/ |
| A D | ptp.c | 264 u64 adj; in mv88e6xxx_ptp_adjfine() local 272 adj = chip->cc_coeffs->cc_mult_num; in mv88e6xxx_ptp_adjfine() 273 adj *= scaled_ppm; in mv88e6xxx_ptp_adjfine() 274 diff = div_u64(adj, chip->cc_coeffs->cc_mult_dem); in mv88e6xxx_ptp_adjfine()
|