Home
last modified time | relevance | path

Searched refs:divs (Results 1 - 25 of 67) sorted by relevance

123

/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
H A Dfanpwm.c44 u32 divs, duty; in nvkm_fanpwm_get() local
47 ret = therm->func->pwm_get(therm, fan->func.line, &divs, &duty); in nvkm_fanpwm_get()
48 if (ret == 0 && divs) { in nvkm_fanpwm_get()
49 divs = max(divs, duty); in nvkm_fanpwm_get()
51 duty = divs - duty; in nvkm_fanpwm_get()
52 return (duty * 100) / divs; in nvkm_fanpwm_get()
63 u32 divs, duty; in nvkm_fanpwm_set() local
66 divs = fan->base.perf.pwm_divisor; in nvkm_fanpwm_set()
68 divs in nvkm_fanpwm_set()
91 u32 divs, duty; nvkm_fanpwm_create() local
[all...]
H A Dgf119.c67 gf119_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gf119_fan_pwm_get() argument
75 *divs = nvkm_rd32(device, 0x00e114 + (indx * 8)); in gf119_fan_pwm_get()
80 *divs = nvkm_rd32(device, 0x0200d8) & 0x1fff; in gf119_fan_pwm_get()
89 gf119_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gf119_fan_pwm_set() argument
96 nvkm_wr32(device, 0x00e114 + (indx * 8), divs); in gf119_fan_pwm_set()
99 nvkm_mask(device, 0x0200d8, 0x1fff, divs); /* keep the high bits */ in gf119_fan_pwm_set()
H A Dgm107.c34 gm107_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gm107_fan_pwm_get() argument
37 *divs = nvkm_rd32(device, 0x10eb20) & 0x1fff; in gm107_fan_pwm_get()
43 gm107_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gm107_fan_pwm_set() argument
46 nvkm_mask(device, 0x10eb10, 0x1fff, divs); /* keep the high bits */ in gm107_fan_pwm_set()
H A Dnv40.c121 nv40_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv40_fan_pwm_get() argument
129 *divs = (reg & 0x00007fff); in nv40_fan_pwm_get()
136 *divs = nvkm_rd32(device, 0x0015f8); in nv40_fan_pwm_get()
149 nv40_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv40_fan_pwm_set() argument
154 nvkm_mask(device, 0x0010f0, 0x7fff7fff, (duty << 16) | divs); in nv40_fan_pwm_set()
157 nvkm_wr32(device, 0x0015f8, divs); in nv40_fan_pwm_set()
H A Dnv50.c66 nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv50_fan_pwm_get() argument
74 *divs = nvkm_rd32(device, 0x00e114 + (id * 8)); in nv50_fan_pwm_get()
83 nv50_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv50_fan_pwm_set() argument
90 nvkm_wr32(device, 0x00e114 + (id * 8), divs); in nv50_fan_pwm_set()
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
H A Dfanpwm.c44 u32 divs, duty; in nvkm_fanpwm_get() local
47 ret = therm->func->pwm_get(therm, fan->func.line, &divs, &duty); in nvkm_fanpwm_get()
48 if (ret == 0 && divs) { in nvkm_fanpwm_get()
49 divs = max(divs, duty); in nvkm_fanpwm_get()
51 duty = divs - duty; in nvkm_fanpwm_get()
52 return (duty * 100) / divs; in nvkm_fanpwm_get()
63 u32 divs, duty; in nvkm_fanpwm_set() local
66 divs = fan->base.perf.pwm_divisor; in nvkm_fanpwm_set()
68 divs in nvkm_fanpwm_set()
91 u32 divs, duty; nvkm_fanpwm_create() local
[all...]
H A Dgf119.c68 gf119_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gf119_fan_pwm_get() argument
76 *divs = nvkm_rd32(device, 0x00e114 + (indx * 8)); in gf119_fan_pwm_get()
81 *divs = nvkm_rd32(device, 0x0200d8) & 0x1fff; in gf119_fan_pwm_get()
90 gf119_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gf119_fan_pwm_set() argument
97 nvkm_wr32(device, 0x00e114 + (indx * 8), divs); in gf119_fan_pwm_set()
100 nvkm_mask(device, 0x0200d8, 0x1fff, divs); /* keep the high bits */ in gf119_fan_pwm_set()
H A Dgm107.c34 gm107_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in gm107_fan_pwm_get() argument
37 *divs = nvkm_rd32(device, 0x10eb20) & 0x1fff; in gm107_fan_pwm_get()
43 gm107_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in gm107_fan_pwm_set() argument
46 nvkm_mask(device, 0x10eb10, 0x1fff, divs); /* keep the high bits */ in gm107_fan_pwm_set()
H A Dnv40.c121 nv40_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv40_fan_pwm_get() argument
129 *divs = (reg & 0x00007fff); in nv40_fan_pwm_get()
136 *divs = nvkm_rd32(device, 0x0015f8); in nv40_fan_pwm_get()
149 nv40_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv40_fan_pwm_set() argument
154 nvkm_mask(device, 0x0010f0, 0x7fff7fff, (duty << 16) | divs); in nv40_fan_pwm_set()
157 nvkm_wr32(device, 0x0015f8, divs); in nv40_fan_pwm_set()
H A Dnv50.c66 nv50_fan_pwm_get(struct nvkm_therm *therm, int line, u32 *divs, u32 *duty) in nv50_fan_pwm_get() argument
74 *divs = nvkm_rd32(device, 0x00e114 + (id * 8)); in nv50_fan_pwm_get()
83 nv50_fan_pwm_set(struct nvkm_therm *therm, int line, u32 divs, u32 duty) in nv50_fan_pwm_set() argument
90 nvkm_wr32(device, 0x00e114 + (id * 8), divs); in nv50_fan_pwm_set()
/kernel/linux/linux-5.10/drivers/cpufreq/
H A Ds3c2440-cpufreq.c124 cfg->divs.dvs = 1; in s3c2440_cpufreq_calcdivs()
127 cfg->divs.dvs = 0; in s3c2440_cpufreq_calcdivs()
133 cfg->divs.h_divisor = hdiv; in s3c2440_cpufreq_calcdivs()
134 cfg->divs.p_divisor = pdiv; in s3c2440_cpufreq_calcdivs()
157 cfg->divs.h_divisor, cfg->divs.p_divisor); in s3c2440_cpufreq_setdivs()
165 switch (cfg->divs.h_divisor) { in s3c2440_cpufreq_setdivs()
190 if (cfg->divs.p_divisor != cfg->divs.h_divisor) in s3c2440_cpufreq_setdivs()
206 clk_set_parent(armclk, cfg->divs in s3c2440_cpufreq_setdivs()
209 run_freq_for(unsigned long max_hclk, unsigned long fclk, int *divs, struct cpufreq_frequency_table *table, size_t table_size) run_freq_for() argument
[all...]
H A Ds3c2412-cpufreq.c78 cfg->divs.arm_divisor = armdiv; in s3c2412_cpufreq_calcdivs()
88 cfg->divs.dvs = dvs = armclk < armdiv_clk; in s3c2412_cpufreq_calcdivs()
94 __func__, armclk, hclk, armdiv, hdiv, cfg->divs.dvs); in s3c2412_cpufreq_calcdivs()
115 cfg->divs.h_divisor = hdiv * armdiv; in s3c2412_cpufreq_calcdivs()
116 cfg->divs.p_divisor = pdiv * armdiv; in s3c2412_cpufreq_calcdivs()
137 if (cfg->divs.arm_divisor == 2) in s3c2412_cpufreq_setdivs()
140 clkdiv |= ((cfg->divs.h_divisor / cfg->divs.arm_divisor) - 1); in s3c2412_cpufreq_setdivs()
142 if (cfg->divs.p_divisor != cfg->divs in s3c2412_cpufreq_setdivs()
[all...]
H A Ds3c2410-cpufreq.c34 if (cfg->divs.h_divisor == 2) in s3c2410_cpufreq_setdivs()
37 if (cfg->divs.p_divisor != cfg->divs.h_divisor) in s3c2410_cpufreq_setdivs()
76 cfg->divs.p_divisor = pdiv; in s3c2410_cpufreq_calcdivs()
77 cfg->divs.h_divisor = hdiv; in s3c2410_cpufreq_calcdivs()
H A Ds3c24xx-cpufreq-debugfs.c85 cfg->divs.h_divisor, cfg->divs.p_divisor, in info_show()
86 cfg->divs.arm_divisor, cfg->divs.dvs ? "on" : "off"); in info_show()
H A Ds3c24xx-cpufreq.c72 cfg->divs.h_divisor = fclk / hclk; in s3c_cpufreq_getcur()
73 cfg->divs.p_divisor = fclk / pclk; in s3c_cpufreq_getcur()
81 cfg->freq.hclk = pll / cfg->divs.h_divisor; in s3c_cpufreq_calc()
82 cfg->freq.pclk = pll / cfg->divs.p_divisor; in s3c_cpufreq_calc()
101 cfg->freq.hclk, cfg->divs.h_divisor, in s3c_cpufreq_show()
102 cfg->freq.pclk, cfg->divs.p_divisor); in s3c_cpufreq_show()
177 s3c_freq_dbg("%s: got divs\n", __func__); in s3c_cpufreq_settarget()
/kernel/linux/linux-6.6/drivers/clk/baikal-t1/
H A Dclk-ccu-div.c118 struct ccu_div **divs; member
263 return data->divs[idx]; in ccu_div_find_desc()
292 data->divs = kcalloc(data->divs_num, sizeof(*data->divs), GFP_KERNEL); in ccu_div_create_data()
293 if (!data->divs) { in ccu_div_create_data()
308 kfree(data->divs); in ccu_div_free_data()
353 if (!data->divs[idx]) in ccu_div_clk_register()
354 data->divs[idx] = ERR_PTR(-EPROBE_DEFER); in ccu_div_clk_register()
382 data->divs[idx] = ccu_div_hw_register(&init); in ccu_div_clk_register()
383 if (IS_ERR(data->divs[id in ccu_div_clk_register()
[all...]
/kernel/linux/linux-6.6/drivers/clk/
H A Dclk-fsl-flexspi.c56 const struct clk_div_table *divs; in fsl_flexspi_clk_probe() local
58 divs = device_get_match_data(dev); in fsl_flexspi_clk_probe()
59 if (!divs) in fsl_flexspi_clk_probe()
81 reg, 0, 5, 0, divs, NULL); in fsl_flexspi_clk_probe()
/kernel/linux/linux-5.10/drivers/clk/baikal-t1/
H A Dclk-ccu-div.c129 struct ccu_div **divs; member
269 div = data->divs[idx]; in ccu_div_find_desc()
340 data->divs = kcalloc(data->divs_num, sizeof(*data->divs), GFP_KERNEL); in ccu_div_create_data()
341 if (!data->divs) { in ccu_div_create_data()
356 kfree(data->divs); in ccu_div_free_data()
421 data->divs[idx] = ccu_div_hw_register(&init); in ccu_div_clk_register()
422 if (IS_ERR(data->divs[idx])) { in ccu_div_clk_register()
423 ret = PTR_ERR(data->divs[idx]); in ccu_div_clk_register()
441 ccu_div_hw_unregister(data->divs[id in ccu_div_clk_register()
[all...]
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dmcp77.c212 int divs = 0; in mcp77_clk_calc() local
216 out = calc_P(nvkm_clk_read(&clk->base, nv_clk_src_hclkm4), core, &divs); in mcp77_clk_calc()
223 clk->cctrl = divs << 16; in mcp77_clk_calc()
247 out = calc_P((core << 1), shader, &divs); in mcp77_clk_calc()
251 (divs + P2) <= 7) { in mcp77_clk_calc()
253 clk->sctrl = (divs + P2) << 16; in mcp77_clk_calc()
262 out = calc_P(core, vdec, &divs); in mcp77_clk_calc()
266 clk->vdiv = divs << 16; in mcp77_clk_calc()
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dmcp77.c209 int divs = 0; in mcp77_clk_calc() local
213 out = calc_P(nvkm_clk_read(&clk->base, nv_clk_src_hclkm4), core, &divs); in mcp77_clk_calc()
220 clk->cctrl = divs << 16; in mcp77_clk_calc()
244 out = calc_P((core << 1), shader, &divs); in mcp77_clk_calc()
248 (divs + P2) <= 7) { in mcp77_clk_calc()
250 clk->sctrl = (divs + P2) << 16; in mcp77_clk_calc()
259 out = calc_P(core, vdec, &divs); in mcp77_clk_calc()
263 clk->vdiv = divs << 16; in mcp77_clk_calc()
/kernel/linux/linux-5.10/crypto/
H A Dtestmgr.c441 static unsigned int count_test_sg_divisions(const struct test_sg_division *divs) in count_test_sg_divisions() argument
447 remaining -= divs[ndivs++].proportion_of_total; in count_test_sg_divisions()
456 static bool valid_sg_divisions(const struct test_sg_division *divs, in valid_sg_divisions() argument
463 if (divs[i].proportion_of_total <= 0 || in valid_sg_divisions()
464 divs[i].proportion_of_total > TEST_SG_TOTAL - total) in valid_sg_divisions()
466 total += divs[i].proportion_of_total; in valid_sg_divisions()
467 if (divs[i].flush_type != FLUSH_TYPE_NONE) in valid_sg_divisions()
469 if (divs[i].nosimd) in valid_sg_divisions()
473 memchr_inv(&divs[i], 0, (count - i) * sizeof(divs[ in valid_sg_divisions()
554 build_test_sglist(struct test_sglist *tsgl, const struct test_sg_division *divs, const unsigned int alignmask, const unsigned int total_len, struct iov_iter *data, const struct test_sg_division *out_divs[XBUFSIZE]) build_test_sglist() argument
911 generate_random_sgl_divisions(struct test_sg_division *divs, size_t max_divs, char *p, char *end, bool gen_flushes, u32 req_flags) generate_random_sgl_divisions() argument
1122 build_hash_sglist(struct test_sglist *tsgl, const struct hash_testvec *vec, const struct testvec_config *cfg, unsigned int alignmask, const struct test_sg_division *divs[XBUFSIZE]) build_hash_sglist() argument
1186 const struct test_sg_division *divs[XBUFSIZE]; test_shash_vec_cfg() local
1371 const struct test_sg_division *divs[XBUFSIZE]; test_ahash_vec_cfg() local
[all...]
/kernel/linux/linux-6.6/crypto/
H A Dtestmgr.c468 static unsigned int count_test_sg_divisions(const struct test_sg_division *divs) in count_test_sg_divisions() argument
474 remaining -= divs[ndivs++].proportion_of_total; in count_test_sg_divisions()
483 static bool valid_sg_divisions(const struct test_sg_division *divs, in valid_sg_divisions() argument
490 if (divs[i].proportion_of_total <= 0 || in valid_sg_divisions()
491 divs[i].proportion_of_total > TEST_SG_TOTAL - total) in valid_sg_divisions()
493 total += divs[i].proportion_of_total; in valid_sg_divisions()
494 if (divs[i].flush_type != FLUSH_TYPE_NONE) in valid_sg_divisions()
496 if (divs[i].nosimd) in valid_sg_divisions()
500 memchr_inv(&divs[i], 0, (count - i) * sizeof(divs[ in valid_sg_divisions()
581 build_test_sglist(struct test_sglist *tsgl, const struct test_sg_division *divs, const unsigned int alignmask, const unsigned int total_len, struct iov_iter *data, const struct test_sg_division *out_divs[XBUFSIZE]) build_test_sglist() argument
997 generate_random_sgl_divisions(struct rnd_state *rng, struct test_sg_division *divs, size_t max_divs, char *p, char *end, bool gen_flushes, u32 req_flags) generate_random_sgl_divisions() argument
1223 build_hash_sglist(struct test_sglist *tsgl, const struct hash_testvec *vec, const struct testvec_config *cfg, unsigned int alignmask, const struct test_sg_division *divs[XBUFSIZE]) build_hash_sglist() argument
1282 const struct test_sg_division *divs[XBUFSIZE]; test_shash_vec_cfg() local
1467 const struct test_sg_division *divs[XBUFSIZE]; test_ahash_vec_cfg() local
[all...]
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/edp/
H A Dedp_ctrl.c1347 const struct edp_pixel_clk_div *divs; in msm_edp_ctrl_pixel_clock_valid() local
1353 divs = clk_divs[0]; in msm_edp_ctrl_pixel_clock_valid()
1355 divs = clk_divs[1]; in msm_edp_ctrl_pixel_clock_valid()
1362 clk_err = abs(divs[i].rate - pixel_rate); in msm_edp_ctrl_pixel_clock_valid()
1363 if ((divs[i].rate * err / 100) >= clk_err) { in msm_edp_ctrl_pixel_clock_valid()
1365 *pm = divs[i].m; in msm_edp_ctrl_pixel_clock_valid()
1367 *pn = divs[i].n; in msm_edp_ctrl_pixel_clock_valid()
/kernel/linux/linux-5.10/drivers/i2c/busses/
H A Di2c-s3c2410.c803 unsigned int *div1, unsigned int *divs) in s3c24xx_i2c_calcdivisor()
821 *divs = calc_divs; in s3c24xx_i2c_calcdivisor()
836 unsigned int divs, div1; in s3c24xx_i2c_clockrate() local
850 freq = s3c24xx_i2c_calcdivisor(clkin, target_frequency, &div1, &divs); in s3c24xx_i2c_clockrate()
863 iiccon |= (divs-1); in s3c24xx_i2c_clockrate()
802 s3c24xx_i2c_calcdivisor(unsigned long clkin, unsigned int wanted, unsigned int *div1, unsigned int *divs) s3c24xx_i2c_calcdivisor() argument
/kernel/linux/linux-6.6/drivers/i2c/busses/
H A Di2c-s3c2410.c796 unsigned int *div1, unsigned int *divs) in s3c24xx_i2c_calcdivisor()
814 *divs = calc_divs; in s3c24xx_i2c_calcdivisor()
829 unsigned int divs, div1; in s3c24xx_i2c_clockrate() local
843 freq = s3c24xx_i2c_calcdivisor(clkin, target_frequency, &div1, &divs); in s3c24xx_i2c_clockrate()
856 iiccon |= (divs-1); in s3c24xx_i2c_clockrate()
795 s3c24xx_i2c_calcdivisor(unsigned long clkin, unsigned int wanted, unsigned int *div1, unsigned int *divs) s3c24xx_i2c_calcdivisor() argument

Completed in 19 milliseconds

123