/linux-master/drivers/media/tuners/ |
H A D | max2165.c | 150 static int fixpt_div32(u32 dividend, u32 divisor, u32 *quotient, u32 *fraction) argument 156 if (0 == divisor) 159 q = dividend / divisor; 160 remainder = dividend - q * divisor; 164 if (remainder >= divisor) { 166 remainder -= divisor;
|
/linux-master/drivers/i2c/busses/ |
H A D | i2c-aspeed.c | 150 u32 divisor); 827 u32 divisor) 843 * = APB_freq / divisor 860 base_clk_divisor = divisor > clk_high_low_max ? 861 ilog2((divisor - 1) / clk_high_low_max) + 1 : 0; 869 divisor, (1 << base_clk_divisor) * clk_high_low_max); 871 tmp = (divisor + (1 << base_clk_divisor) - 1) 892 static u32 aspeed_i2c_24xx_get_clk_reg_val(struct device *dev, u32 divisor) argument 898 return aspeed_i2c_get_clk_reg_val(dev, GENMASK(2, 0), divisor); 901 static u32 aspeed_i2c_25xx_get_clk_reg_val(struct device *dev, u32 divisor) argument 825 aspeed_i2c_get_clk_reg_val(struct device *dev, u32 clk_high_low_mask, u32 divisor) argument 913 u32 divisor, clk_reg_val; local [all...] |
/linux-master/net/sched/ |
H A D | cls_u32.c | 75 unsigned int divisor; member in struct:tc_u_hnode 204 if (ht->divisor) { 211 sel = ht->divisor & u32_hash_fold(*data, &n->sel, 275 if (sel > ht->divisor) 487 cls_u32.hnode.divisor = h->divisor; 505 cls_u32.hnode.divisor = h->divisor; 583 for (h = 0; h <= ht->divisor; h++) { 952 unsigned int divisor local 1347 u32 divisor = ht->divisor + 1; local [all...] |
/linux-master/drivers/ssb/ |
H A D | driver_chipcommon.c | 154 int divisor = 1; local 161 divisor = 64; 164 divisor = 32; 176 divisor = (tmp >> 16) + 1; 177 divisor *= 4; 182 divisor = (tmp >> 16) + 1; 183 divisor *= 4; 206 limit /= divisor;
|
/linux-master/drivers/clk/meson/ |
H A D | clk-mpll.c | 35 unsigned long divisor = (SDM_DEN * n2) + sdm; local 40 return DIV_ROUND_UP_ULL((u64)parent_rate * SDM_DEN, divisor);
|
/linux-master/lib/crypto/mpi/ |
H A D | mpi-mod.c | 25 void mpi_mod(MPI rem, MPI dividend, MPI divisor) argument 27 mpi_fdiv_r(rem, dividend, divisor);
|
/linux-master/drivers/soc/fsl/qe/ |
H A D | qe.c | 212 u32 divisor, tempval; local 218 divisor = qe_get_brg_clk() / (rate * multiplier); 220 if (divisor > QE_BRGC_DIVISOR_MAX + 1) { 222 divisor /= 16; 226 that the BRG divisor must be even if you're not using divide-by-16 229 if (!div16 && (divisor & 1) && (divisor > 3)) 230 divisor++; 232 tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
|
/linux-master/drivers/watchdog/ |
H A D | s3c2410_wdt.c | 504 unsigned int divisor = 1; local 522 divisor = DIV_ROUND_UP(count, 0xffff); 524 if (divisor > 0x100) { 530 dev_dbg(wdt->dev, "Heartbeat: timeout=%d, divisor=%d, count=%d (%08x)\n", 531 timeout, divisor, count, DIV_ROUND_UP(count, divisor)); 533 count = DIV_ROUND_UP(count, divisor); 539 wtcon |= S3C2410_WTCON_PRESCALE(divisor-1); 544 wdd->timeout = (count * divisor) / freq;
|
/linux-master/drivers/hsi/controllers/ |
H A D | omap_ssi.h | 33 * @divisor: TX divider 44 u32 divisor; member in struct:omap_ssm_ctx::__anon264::__anon265
|
/linux-master/drivers/tty/serial/8250/ |
H A D | 8250_ingenic.c | 93 unsigned int divisor; local 107 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud); 119 early_out(port, UART_DLL, divisor & 0xff); 120 early_out(port, UART_DLM, (divisor >> 8) & 0xff);
|
/linux-master/drivers/video/fbdev/via/ |
H A D | via_clock.c | 25 | pll.divisor; 30 return ((pll.divisor - 2) << 16) 37 return (pll.divisor << 16)
|
/linux-master/arch/arm/mach-orion5x/ |
H A D | terastation_pro2-setup.c | 269 /* 38400 baud divisor */ 270 const unsigned divisor = ((orion5x_tclk + (8 * 38400)) / (16 * 38400)); local 276 writel(divisor & 0xff, UART1_REG(DLL)); 277 writel((divisor >> 8) & 0xff, UART1_REG(DLM));
|
H A D | kurobox_pro-setup.c | 291 /* 38400 baud divisor */ 292 const unsigned divisor = ((orion5x_tclk + (8 * 38400)) / (16 * 38400)); local 298 writel(divisor & 0xff, UART1_REG(DLL)); 299 writel((divisor >> 8) & 0xff, UART1_REG(DLM));
|
/linux-master/lib/math/ |
H A D | test_div64.c | 163 #define test_div64_one(dividend, divisor, i, j) ({ \ 169 remainder = do_div(quotient, divisor); \ 172 dividend, divisor, quotient, remainder); \ 182 * Run calculation for the same divisor value expressed as a constant
|
/linux-master/include/linux/ |
H A D | mpi.h | 106 void mpi_mod(MPI rem, MPI dividend, MPI divisor); 154 void mpi_fdiv_r(MPI rem, MPI dividend, MPI divisor); 155 void mpi_fdiv_q(MPI quot, MPI dividend, MPI divisor);
|
/linux-master/arch/powerpc/kernel/ |
H A D | udbg_16550.c | 126 unsigned int dll, dlm, divisor, prescaler, speed; local 131 /* select divisor latch registers. */ 134 /* now, read the divisor */ 137 divisor = dlm << 8 | dll; 149 speed = (clock / prescaler) / (divisor * 16);
|
H A D | time.c | 953 * Divide a 128-bit dividend by a 32-bit divisor, leaving a 128 bit 957 unsigned divisor, struct div_result *dr) 968 w = a / divisor; 969 ra = ((u64)(a - (w * divisor)) << 32) + b; 971 rb = ((u64) do_div(ra, divisor) << 32) + c; 974 rc = ((u64) do_div(rb, divisor) << 32) + d; 977 do_div(rc, divisor); 956 div128_by_32(u64 dividend_high, u64 dividend_low, unsigned divisor, struct div_result *dr) argument
|
/linux-master/drivers/tty/serial/ |
H A D | mpc52xx_uart.c | 123 /* setting the prescaler and divisor reg is common for all chips */ 125 u16 prescaler, unsigned int divisor) 129 out_8(&psc->ctur, divisor >> 8); 130 out_8(&psc->ctlr, divisor & 0xff); 293 unsigned int divisor; local 299 divisor = (port->uartclk + 16 * baud) / (32 * baud); 301 /* enable the /32 prescaler and set the divisor */ 302 mpc52xx_set_divisor(PSC(port), 0xdd00, divisor); local 311 unsigned int divisor; local 319 divisor 124 mpc52xx_set_divisor(struct mpc52xx_psc __iomem *psc, u16 prescaler, unsigned int divisor) argument 328 mpc52xx_set_divisor(PSC(port), prescaler, divisor); local 539 unsigned int divisor; local 561 mpc52xx_set_divisor(PSC(port), 0xdd00, divisor); local 872 mpc5125_set_divisor(struct mpc5125_psc __iomem *psc, u8 prescaler, unsigned int divisor) argument 886 unsigned int divisor; local 899 mpc5125_set_divisor(PSC_5125(port), 0xdd, divisor); local [all...] |
H A D | mvebu-uart.c | 468 * > M ("fractional divisor"): allows a better accuracy (from 1 to 63) 476 * with fractional divisor: 488 * default (x16) divisor or fractional divisor with M = 63, so there 492 * When all the M prescalers are zeroed then default (x16) divisor is 493 * used. Default x16 scheme is more stable than M (fractional divisor), 494 * so use M only when D divisor is not enough to derive baudrate. 508 * Use maximal possible M = 63 and calculate D divisor. 560 * Maximal divisor is 1023 and maximal fractional divisor i 1071 u64 divisor; local [all...] |
/linux-master/drivers/iio/gyro/ |
H A D | mpu3050-core.c | 188 freq /= (mpu3050->divisor + 1); 230 ret = regmap_write(mpu3050->map, MPU3050_SMPLRT_DIV, mpu3050->divisor); 247 u8 divisor; local 251 divisor = mpu3050->divisor; 254 mpu3050->divisor = 0; /* Divide by 1 */ 258 mpu3050->divisor = divisor; 420 mpu3050->divisor = DIV_ROUND_CLOSEST(8000, val) - 1; 425 mpu3050->divisor [all...] |
/linux-master/drivers/hwmon/ |
H A D | aspeed-g6-pwm-tach.c | 112 /* divisor = 4 to the nth power, n = register value */ 114 #define DIV_TO_REG(divisor) (ilog2(divisor) >> 1) 193 u64 div_h, div_l, divisor, expect_period; local 204 divisor = (u64)NSEC_PER_SEC * (PWM_ASPEED_FIXED_PERIOD + 1) * 206 div_h = order_base_2(DIV64_U64_ROUND_UP(priv->clk_rate * expect_period, divisor)); 210 divisor = ((u64)NSEC_PER_SEC * (PWM_ASPEED_FIXED_PERIOD + 1)) << div_h; 211 div_l = div64_u64(priv->clk_rate * expect_period, divisor);
|
/linux-master/drivers/gpu/drm/amd/display/dc/basics/ |
H A D | fixpt31_32.c | 44 * result = dividend / divisor 45 * *remainder = dividend % divisor 49 unsigned long long divisor, 54 ASSERT(divisor); 56 result = div64_u64_rem(dividend, divisor, remainder); 47 complete_integer_division_u64( unsigned long long dividend, unsigned long long divisor, unsigned long long *remainder) argument
|
/linux-master/drivers/media/pci/cx88/ |
H A D | cx88-dsp.c | 105 u32 divisor; local 121 divisor = N * N; 122 do_div(tmp, divisor);
|
/linux-master/drivers/usb/serial/ |
H A D | ssu100.c | 222 u16 baud, divisor, remainder; local 243 divisor = MAX_BAUD_RATE / baud; 246 divisor++; 250 result = ssu100_control_msg(dev, QT_GET_SET_UART, divisor, urb_value);
|
/linux-master/fs/ubifs/ |
H A D | budget.c | 623 int divisor, factor, f; local 640 divisor = UBIFS_MAX_DATA_NODE_SZ; 641 divisor += (c->max_idx_node_sz * 3) / (f - 1); 643 return div_u64(free, divisor);
|