Home
last modified time | relevance | path

Searched refs:spbr (Results 1 – 2 of 2) sorted by relevance

/drivers/spi/
Dspi-rspi.c257 int brdv = 0, spbr; in rspi_set_rate() local
260 spbr = DIV_ROUND_UP(clksrc, 2 * rspi->speed_hz) - 1; in rspi_set_rate()
261 while (spbr > 255 && brdv < 3) { in rspi_set_rate()
263 spbr = DIV_ROUND_UP(spbr + 1, 2) - 1; in rspi_set_rate()
266 rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR); in rspi_set_rate()
268 rspi->speed_hz = DIV_ROUND_UP(clksrc, (2U << brdv) * (spbr + 1)); in rspi_set_rate()
342 int brdv = 0, spbr; in qspi_set_config_register() local
350 spbr = 0; in qspi_set_config_register()
353 spbr = DIV_ROUND_UP(clksrc, 2 * rspi->speed_hz); in qspi_set_config_register()
354 while (spbr > 255 && brdv < 3) { in qspi_set_config_register()
[all …]
Dspi-bcm-qspi.c293 u32 spbr = 0; in bcm_qspi_calc_spbr() local
297 spbr = clk_speed_hz / (xp->speed_hz * 2); in bcm_qspi_calc_spbr()
299 return spbr; in bcm_qspi_calc_spbr()
614 u32 spcr, spbr = 0; in bcm_qspi_hw_set_parms() local
649 spbr = bcm_qspi_calc_spbr(MSPI_BASE_FREQ * 4, xp); in bcm_qspi_hw_set_parms()
650 if (spbr > QSPI_SPBR_MAX) { in bcm_qspi_hw_set_parms()
686 spbr = bcm_qspi_calc_spbr(qspi->base_clk, xp); in bcm_qspi_hw_set_parms()
687 spbr = clamp_val(spbr, bcm_qspi_spbr_min(qspi), QSPI_SPBR_MAX); in bcm_qspi_hw_set_parms()
688 bcm_qspi_write(qspi, MSPI, MSPI_SPCR0_LSB, spbr); in bcm_qspi_hw_set_parms()