Lines Matching refs:clkDiv
178 static void Mp1xxSpiConfigClk(const struct Mp1xxSpiCntlr *stm32mp1, uint32_t clkDiv) in Mp1xxSpiConfigClk() argument
183 clkDiv = clkDiv / MP1XX_SPI_MIN_CLK_DIV; in Mp1xxSpiConfigClk()
185 if ((clkDiv >> mbr) == 0) { in Mp1xxSpiConfigClk()
267 uint32_t clkDiv; in Mp1xxSpiConfig() local
288 clkDiv = MP1XX_SPI_MIN_CLK_DIV; in Mp1xxSpiConfig()
290 clkDiv = MP1XX_SPI_MAX_CLK_DIV; in Mp1xxSpiConfig()
293 for (clkDiv = MP1XX_SPI_MIN_CLK_DIV; clkDiv < MP1XX_SPI_MAX_CLK_DIV; clkDiv = clkDiv << 1) { in Mp1xxSpiConfig()
294 if (clkDiv < tmp && (clkDiv << 1) > tmp) { in Mp1xxSpiConfig()
295 clkDiv = (((clkDiv << 1) - tmp) > (tmp - clkDiv)) ? clkDiv : (clkDiv << 1); in Mp1xxSpiConfig()
299 HDF_LOGE("%s:clkDiv=%u", __func__, clkDiv); in Mp1xxSpiConfig()
304 Mp1xxSpiConfigClk(stm32mp1, clkDiv); in Mp1xxSpiConfig()