Home
last modified time | relevance | path

Searched refs:prescale (Results 1 – 25 of 29) sorted by relevance

12

/drivers/video/backlight/
Datmel-pwm-bl.c89 unsigned long prescale = DIV_ROUND_UP(pwm_rate, in atmel_pwm_bl_init_pwm() local
98 prescale = fls(prescale); in atmel_pwm_bl_init_pwm()
99 if (prescale > 0xf) in atmel_pwm_bl_init_pwm()
100 prescale = 0xf; in atmel_pwm_bl_init_pwm()
102 pwm_channel_writel(&pwmbl->pwmc, PWM_CMR, prescale); in atmel_pwm_bl_init_pwm()
111 (1 << prescale)); in atmel_pwm_bl_init_pwm()
/drivers/pwm/
Dpwm-puv3.c44 unsigned long period_cycles, prescale, pv, dc; in puv3_pwm_config() local
56 prescale = (period_cycles - 1) / 1024; in puv3_pwm_config()
57 pv = period_cycles / (prescale + 1) - 1; in puv3_pwm_config()
59 if (prescale > 63) in puv3_pwm_config()
73 writel(prescale, puv3->base + OST_PWM_PWCR); in puv3_pwm_config()
Dpwm-pxa.c67 unsigned long period_cycles, prescale, pv, dc; in pxa_pwm_config() local
80 prescale = (period_cycles - 1) / 1024; in pxa_pwm_config()
81 pv = period_cycles / (prescale + 1) - 1; in pxa_pwm_config()
83 if (prescale > 63) in pxa_pwm_config()
98 writel(prescale, pc->mmio_base + offset + PWMCR); in pxa_pwm_config()
Dpwm-vt8500.c85 unsigned long period_cycles, prescale, pv, dc; in vt8500_pwm_config() local
102 prescale = (period_cycles - 1) / 4096; in vt8500_pwm_config()
103 pv = period_cycles / (prescale + 1) - 1; in vt8500_pwm_config()
107 if (prescale > 1023) { in vt8500_pwm_config()
116 writel(prescale, vt8500->base + REG_SCALAR(pwm->hwpwm)); in vt8500_pwm_config()
Dpwm-spear.c82 unsigned long prescale = PWMCR_MIN_PRESCALE, pv, dc; in spear_pwm_config() local
98 div *= 1 + prescale; in spear_pwm_config()
113 if (++prescale > PWMCR_MAX_PRESCALE) in spear_pwm_config()
129 prescale << PWMCR_PRESCALE_SHIFT); in spear_pwm_config()
Dpwm-imx.c106 unsigned long period_cycles, duty_cycles, prescale; in imx_pwm_config_v2() local
114 prescale = period_cycles / 0x10000 + 1; in imx_pwm_config_v2()
116 period_cycles /= prescale; in imx_pwm_config_v2()
133 cr = MX3_PWMCR_PRESCALER(prescale) | in imx_pwm_config_v2()
/drivers/media/i2c/
Dsaa717x.c820 int task, int prescale) in set_h_prescale() argument
846 if (vals[i].xpsc == prescale) in set_h_prescale()
1008 int prescale, h_scale, v_scale; in saa717x_s_mbus_fmt() local
1026 prescale = SAA717X_NTSC_WIDTH / fmt->width; in saa717x_s_mbus_fmt()
1027 if (prescale == 0) in saa717x_s_mbus_fmt()
1028 prescale = 1; in saa717x_s_mbus_fmt()
1029 h_scale = 1024 * SAA717X_NTSC_WIDTH / prescale / fmt->width; in saa717x_s_mbus_fmt()
1034 set_h_prescale(sd, 0, prescale); in saa717x_s_mbus_fmt()
1035 set_h_prescale(sd, 1, prescale); in saa717x_s_mbus_fmt()
/drivers/gpu/drm/radeon/
Dradeon_i2c.c236 u32 prescale = 0; in radeon_get_i2c_prescale() local
262 prescale = m | (n << 8); in radeon_get_i2c_prescale()
270 prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; in radeon_get_i2c_prescale()
285 prescale = (127 << 8) + ((sclk * 10) / (4 * 127 * i2c_clock)); in radeon_get_i2c_prescale()
287 prescale = (((sclk * 10)/(4 * 128 * 100) + 1) << 8) + 128; in radeon_get_i2c_prescale()
316 return prescale; in radeon_get_i2c_prescale()
331 u32 prescale; in r100_hw_i2c_xfer() local
339 prescale = radeon_get_i2c_prescale(rdev); in r100_hw_i2c_xfer()
341 reg = ((prescale << RADEON_I2C_PRESCALE_SHIFT) | in r100_hw_i2c_xfer()
584 u32 prescale; in r500_hw_i2c_xfer() local
[all …]
/drivers/staging/comedi/drivers/
Ddt3000.c412 int divider, base, prescale; in dt3k_ns_to_timer() local
417 for (prescale = 0; prescale < 16; prescale++) { in dt3k_ns_to_timer()
418 base = timer_base * (prescale + 1); in dt3k_ns_to_timer()
433 return (prescale << 16) | (divider); in dt3k_ns_to_timer()
437 prescale = 15; in dt3k_ns_to_timer()
438 base = timer_base * (1 << prescale); in dt3k_ns_to_timer()
441 return (prescale << 16) | (divider); in dt3k_ns_to_timer()
Ddt282x.c748 int prescale, base, divider; in dt282x_ns_to_timer() local
750 for (prescale = 0; prescale < 16; prescale++) { in dt282x_ns_to_timer()
751 if (prescale == 1) in dt282x_ns_to_timer()
753 base = 250 * (1 << prescale); in dt282x_ns_to_timer()
768 return (prescale << 8) | (255 - divider); in dt282x_ns_to_timer()
/drivers/watchdog/
Dmpc8xxx_wdt.c74 static int prescale = 1; variable
124 if (prescale) in mpc8xxx_wdt_open()
220 if (prescale) in mpc8xxx_wdt_probe()
Dar7_wdt.c70 u32 prescale; member
106 WRITE_REG(ar7_wdt->prescale, value); in ar7_wdt_prescale()
/drivers/video/
Datafb.c931 int prescale; in falcon_decode_var() local
1241 prescale = hxx_prescale(&par->hw.falcon); in falcon_decode_var()
1251 hdb_off = (base_off + 16 * plen) + prescale; in falcon_decode_var()
1256 hdb_off = (64 + base_off + (128 / bpp + 2) * plen) + prescale; in falcon_decode_var()
1258 hdb_off = (base_off + (128 / bpp + 18) * plen) + prescale; in falcon_decode_var()
1261 gstart = (prescale / 2 + plen * left_margin) / prescale; in falcon_decode_var()
1263 gend1 = gstart + roundup(xres, align) * plen / prescale; in falcon_decode_var()
1265 gend2 = gstart + xres * plen / prescale; in falcon_decode_var()
1267 (2 * prescale) - 2; in falcon_decode_var()
1270 par->HDB = gstart - hdb_off / prescale; in falcon_decode_var()
[all …]
/drivers/media/pci/cx88/
Dcx88-core.c773 static int set_pll(struct cx88_core *core, int prescale, u32 ofreq) in set_pll() argument
780 if (prescale < 2) in set_pll()
781 prescale = 2; in set_pll()
782 if (prescale > 5) in set_pll()
783 prescale = 5; in set_pll()
785 pll = ofreq * 8 * prescale * (u64)(1 << 20); in set_pll()
787 reg = (pll & 0x3ffffff) | (pre[prescale] << 26); in set_pll()
800 prescale,ofreq); in set_pll()
806 dprintk(1,"pll NOT locked [pre=%d,ofreq=%d]\n",prescale,ofreq); in set_pll()
/drivers/i2c/busses/
Di2c-ocores.c222 int prescale; in ocores_init() local
228 prescale = (i2c->clock_khz / (5*100)) - 1; in ocores_init()
229 oc_setreg(i2c, OCI2C_PRELOW, prescale & 0xff); in ocores_init()
230 oc_setreg(i2c, OCI2C_PREHIGH, prescale >> 8); in ocores_init()
/drivers/misc/
Datmel_pwm.c200 int pwm_clk_alloc(unsigned prescale, unsigned div) in pwm_clk_alloc() argument
204 u32 val = (prescale << 8) | div; in pwm_clk_alloc()
207 if (prescale >= 10 || div == 0 || div > 255) in pwm_clk_alloc()
/drivers/net/ethernet/ti/
Ddavinci_emac.c553 u32 prescale = 0, addnl_dvdr = 1, coal_intvl = 0; in emac_set_coalesce() local
563 prescale = priv->bus_freq_mhz * 4; in emac_set_coalesce()
573 addnl_dvdr = EMAC_DM646X_INTPRESCALE_MASK / prescale; in emac_set_coalesce()
576 prescale *= addnl_dvdr; in emac_set_coalesce()
591 int_ctrl |= (prescale & EMAC_DM646X_INTPRESCALE_MASK); in emac_set_coalesce()
601 prescale = coal_intvl * priv->bus_freq_mhz; in emac_set_coalesce()
602 if (prescale > EMAC_DM644X_EWINTCNT_MASK) { in emac_set_coalesce()
603 prescale = EMAC_DM644X_EWINTCNT_MASK; in emac_set_coalesce()
604 coal_intvl = prescale / priv->bus_freq_mhz; in emac_set_coalesce()
606 emac_ctrl_write(EMAC_CTRL_EWINTTCNT, (int_ctrl | prescale)); in emac_set_coalesce()
/drivers/spi/
Dspi-orion.c98 u32 prescale; in orion_spi_baudrate_set() local
121 prescale = 0x10 + rate/2; in orion_spi_baudrate_set()
124 reg = ((reg & ~ORION_SPI_CLK_PRESCALE_MASK) | prescale); in orion_spi_baudrate_set()
Dspi-davinci.c282 u32 hz = 0, spifmt = 0, prescale = 0; in davinci_spi_setup_transfer() local
318 prescale = davinci_spi_get_prescale(dspi, hz); in davinci_spi_setup_transfer()
319 if (prescale < 0) in davinci_spi_setup_transfer()
320 return prescale; in davinci_spi_setup_transfer()
322 spifmt = (prescale << SPIFMT_PRESCALE_SHIFT) | (bits_per_word & 0x1f); in davinci_spi_setup_transfer()
/drivers/input/keyboard/
Dtwl4030_keypad.c112 #define KEYP_PERIOD_US(t, prescale) ((t) / (31 << (prescale + 1)) - 1) argument
Dw90p910_keypad.c104 config = pdata->prescale | (pdata->debounce << DEBOUNCE_BIT); in w90p910_keypad_open()
/drivers/clocksource/
Dsamsung_pwm_timer.c73 static void samsung_timer_set_prescale(unsigned int channel, u16 prescale) in samsung_timer_set_prescale() argument
86 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale()
/drivers/media/pci/saa7134/
Dsaa7134-video.c634 static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) in set_h_prescale() argument
659 if (vals[i].xpsc == prescale) in set_h_prescale()
700 int prescale,xscale,yscale,y_even,y_odd; in set_size() local
719 prescale = dev->crop_current.width / width; in set_size()
720 if (0 == prescale) in set_size()
721 prescale = 1; in set_size()
722 xscale = 1024 * dev->crop_current.width / prescale / width; in set_size()
724 dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale); in set_size()
725 set_h_prescale(dev,task,prescale); in set_size()
/drivers/mtd/devices/
Dspear_smi.c327 u32 prescale = 0; in spear_smi_hw_init() local
333 prescale = DIV_ROUND_UP(rate, dev->clk_rate); in spear_smi_hw_init()
339 val = HOLD1 | BANK_EN | DSEL_TIME | (prescale << 8); in spear_smi_hw_init()
/drivers/tty/serial/
D68328serial.c451 int divisor, prescale; member
523 PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale); in change_speed()
1248 PUT_FIELD(UBAUD_PRESCALER, hw_baud_table[i].prescale);

12