Home
last modified time | relevance | path

Searched refs:cdiv (Results 1 – 10 of 10) sorted by relevance

/openbmc/linux/drivers/clk/qcom/
H A Dgcc-ipq4019.c94 regmap_read(pll_div->cdiv.clkr.regmap, pll_vco->reg, &cdiv); in clk_fepll_vco_calc_rate()
161 mask = (BIT(pll->cdiv.width) - 1) << pll->cdiv.shift; in clk_cpu_div_set_rate()
188 regmap_read(pll->cdiv.clkr.regmap, pll->cdiv.reg, &cdiv); in clk_cpu_div_recalc_rate()
189 cdiv = (cdiv >> pll->cdiv.shift) & (BIT(pll->cdiv.width) - 1); in clk_cpu_div_recalc_rate()
196 if (cdiv > 10) in clk_cpu_div_recalc_rate()
235 .cdiv.clkr = {
269 regmap_read(pll->cdiv.clkr.regmap, pll->cdiv.reg, &cdiv); in clk_regmap_clk_div_recalc_rate()
270 cdiv = (cdiv >> pll->cdiv.shift) & (BIT(pll->cdiv.width) - 1); in clk_regmap_clk_div_recalc_rate()
290 .cdiv.clkr = {
306 .cdiv.clkr = {
[all …]
/openbmc/linux/drivers/gpu/drm/mcde/
H A Dmcde_clk_div.c19 struct mcde_clk_div *cdiv = container_of(hw, struct mcde_clk_div, hw); in mcde_clk_div_enable() local
20 struct mcde *mcde = cdiv->mcde; in mcde_clk_div_enable()
24 val = readl(mcde->regs + cdiv->cr); in mcde_clk_div_enable()
36 val |= cdiv->cr_div; in mcde_clk_div_enable()
38 writel(val, mcde->regs + cdiv->cr); in mcde_clk_div_enable()
85 struct mcde_clk_div *cdiv = container_of(hw, struct mcde_clk_div, hw); in mcde_clk_div_recalc_rate() local
86 struct mcde *mcde = cdiv->mcde; in mcde_clk_div_recalc_rate()
98 cr = readl(mcde->regs + cdiv->cr); in mcde_clk_div_recalc_rate()
112 struct mcde_clk_div *cdiv = container_of(hw, struct mcde_clk_div, hw); in mcde_clk_div_set_rate() local
127 cdiv->cr_div = cr; in mcde_clk_div_set_rate()
/openbmc/u-boot/drivers/i2c/
H A Dat91_i2c.c157 int ckdiv, cdiv, div; in at91_calc_i2c_clock() local
164 cdiv = div >> ckdiv; in at91_calc_i2c_clock()
168 cdiv = 255; in at91_calc_i2c_clock()
172 (cdiv * (1 << ckdiv) + offset) * 2); in at91_calc_i2c_clock()
174 bus->cwgr_val = (ckdiv << 16) | (cdiv << 8) | cdiv; in at91_calc_i2c_clock()
/openbmc/linux/drivers/clk/at91/
H A Dclk-sam9x60-pll.c361 unsigned int val, cdiv; in sam9x60_div_pll_set() local
367 cdiv = (val & core->layout->div_mask) >> core->layout->div_shift; in sam9x60_div_pll_set()
370 if (!!(val & core->layout->endiv_mask) && cdiv == div->div) in sam9x60_div_pll_set()
505 unsigned int val, cdiv; in sam9x60_div_pll_set_rate_chg() local
513 cdiv = (val & core->layout->div_mask) >> core->layout->div_shift; in sam9x60_div_pll_set_rate_chg()
516 if (cdiv == div->div) in sam9x60_div_pll_set_rate_chg()
553 u32 val, cdiv; in sam9x60_div_pll_notifier_fn() local
569 cdiv = (val & core.layout->div_mask) >> core.layout->div_shift; in sam9x60_div_pll_notifier_fn()
572 if (cdiv == div->safe_div) in sam9x60_div_pll_notifier_fn()
/openbmc/linux/drivers/spi/
H A Dspi-bcm2835.c1054 unsigned long spi_hz, cdiv; in bcm2835_spi_transfer_one() local
1062 cdiv = 2; /* clk_hz/2 is the fastest we can go */ in bcm2835_spi_transfer_one()
1065 cdiv = DIV_ROUND_UP(bs->clk_hz, spi_hz); in bcm2835_spi_transfer_one()
1066 cdiv += (cdiv % 2); in bcm2835_spi_transfer_one()
1068 if (cdiv >= 65536) in bcm2835_spi_transfer_one()
1069 cdiv = 0; /* 0 is the slowest we can go */ in bcm2835_spi_transfer_one()
1071 cdiv = 0; /* 0 is the slowest we can go */ in bcm2835_spi_transfer_one()
1073 tfr->effective_speed_hz = cdiv ? (bs->clk_hz / cdiv) : (bs->clk_hz / 65536); in bcm2835_spi_transfer_one()
1074 bcm2835_wr(bs, BCM2835_SPI_CLK, cdiv); in bcm2835_spi_transfer_one()
H A Dspi-ingenic.c104 u32 cdiv, speed_hz = xfer->speed_hz ?: spi->max_speed_hz, in spi_ingenic_prepare_transfer() local
107 cdiv = clk_hz / (speed_hz * 2); in spi_ingenic_prepare_transfer()
108 cdiv = clamp(cdiv, 1u, 0x100u) - 1; in spi_ingenic_prepare_transfer()
110 regmap_write(priv->map, REG_SSIGR, cdiv); in spi_ingenic_prepare_transfer()
/openbmc/u-boot/drivers/mmc/
H A Dbcm2835_sdhost.c171 u32 cdiv; member
232 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_reset_internal()
621 host->cdiv = SDCDIV_MAX_CDIV; in bcm2835_set_clock()
622 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_set_clock()
644 host->cdiv = div; in bcm2835_set_clock()
645 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_set_clock()
/openbmc/linux/drivers/i2c/busses/
H A Di2c-at91-master.c68 int ckdiv, cdiv, div, hold = 0, filter_width = 0; in at91_calc_twi_clock() local
79 cdiv = div >> ckdiv; in at91_calc_twi_clock()
85 cdiv = 255; in at91_calc_twi_clock()
122 dev->twi_cwgr_reg = (ckdiv << 16) | (cdiv << 8) | cdiv in at91_calc_twi_clock()
128 cdiv, ckdiv, hold, t->sda_hold_ns, filter_width, in at91_calc_twi_clock()
/openbmc/u-boot/arch/arm/mach-omap2/omap3/
H A Dclock.c29 u32 start, cstart, cend, cdiff, cdiv, val; in get_osc_clk_speed() local
38 cdiv = 2; in get_osc_clk_speed()
40 cdiv = 1; in get_osc_clk_speed()
73 cdiff *= cdiv; in get_osc_clk_speed()
/openbmc/linux/drivers/mmc/host/
H A Dbcm2835.c165 u32 cdiv; member
268 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_reset_internal()
1122 host->cdiv = SDCDIV_MAX_CDIV; in bcm2835_set_clock()
1123 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_set_clock()
1145 host->cdiv = div; in bcm2835_set_clock()
1146 writel(host->cdiv, host->ioaddr + SDCDIV); in bcm2835_set_clock()