Home
last modified time | relevance | path

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

/device/soc/st/common/platform/spi/
Dstm32mp1_spi.c178 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()
[all …]
/device/soc/hisilicon/common/platform/mmc/himci_v200/
Dhimci.c183 uint32_t clkDiv = 0; in HimciClkDiv() local
221 clkDiv = hostClk / (clock * 2); in HimciClkDiv()
223 clkDiv++; in HimciClkDiv()
225 if (clkDiv > MAX_CLKDIV_VAL) { in HimciClkDiv()
226 clkDiv = MAX_CLKDIV_VAL; in HimciClkDiv()
231 HIMCI_WRITEL(clkDiv, (uintptr_t)host->base + MMC_CLKDIV); in HimciClkDiv()