Home
last modified time | relevance | path

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

/openbmc/linux/drivers/spi/
H A Dspi-rzv2m-csi.c345 unsigned long csiclk_rate = clk_get_rate(csi->csiclk); in rzv2m_csi_setup_clock() local
354 if (csiclk_rate > csiclk_rate_limit) { in rzv2m_csi_setup_clock()
355 clk_set_rate(csi->csiclk, csiclk_rate >> 1); in rzv2m_csi_setup_clock()
356 csiclk_rate = clk_get_rate(csi->csiclk); in rzv2m_csi_setup_clock()
357 } else if ((csiclk_rate << 1) <= csiclk_rate_limit) { in rzv2m_csi_setup_clock()
358 clk_set_rate(csi->csiclk, csiclk_rate << 1); in rzv2m_csi_setup_clock()
359 csiclk_rate = clk_get_rate(csi->csiclk); in rzv2m_csi_setup_clock()
364 cks = DIV_ROUND_UP(csiclk_rate, spi_hz << 1); in rzv2m_csi_setup_clock()
368 dev_dbg(csi->dev, "SPI clk rate is %ldHz\n", csiclk_rate / (cks << 1)); in rzv2m_csi_setup_clock()