Home
last modified time | relevance | path

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

/drivers/spi/
Dspi-mpc52xx.c146 int spr, sppr; in mpc52xx_spi_fsmstate_idle() local
175 sppr = ((ms->ipb_freq / ms->message->spi->max_speed_hz) + 1) >> 1; in mpc52xx_spi_fsmstate_idle()
177 if (sppr < 1) in mpc52xx_spi_fsmstate_idle()
178 sppr = 1; in mpc52xx_spi_fsmstate_idle()
179 while (((sppr - 1) & ~0x7) != 0) { in mpc52xx_spi_fsmstate_idle()
180 sppr = (sppr + 1) >> 1; /* add '1' to force rounding up */ in mpc52xx_spi_fsmstate_idle()
183 sppr--; /* sppr quantity in register is offset by 1 */ in mpc52xx_spi_fsmstate_idle()
187 sppr = 7; in mpc52xx_spi_fsmstate_idle()
189 out_8(ms->regs + SPI_BRR, sppr << 4 | spr); /* Set speed */ in mpc52xx_spi_fsmstate_idle()
Dspi-orion.c163 unsigned spr, sppr; in orion_spi_baudrate_set() local
168 sppr = 0; in orion_spi_baudrate_set()
178 sppr = fls(divider) - 4; in orion_spi_baudrate_set()
184 two_pow_sppr = 1 << sppr; in orion_spi_baudrate_set()
194 sppr = fls(divider) - 4; in orion_spi_baudrate_set()
195 spr = divider >> sppr; in orion_spi_baudrate_set()
202 if (sppr > 7) in orion_spi_baudrate_set()
206 prescale = ((sppr & 0x6) << 5) | ((sppr & 0x1) << 4) | spr; in orion_spi_baudrate_set()