Lines Matching refs:gclk_rate
258 static ulong rockchip_mmc_get_clk(struct rk3188_cru *cru, uint gclk_rate, in rockchip_mmc_get_clk() argument
284 return DIV_TO_RATE(gclk_rate, div) / 2; in rockchip_mmc_get_clk()
287 static ulong rockchip_mmc_set_clk(struct rk3188_cru *cru, uint gclk_rate, in rockchip_mmc_set_clk() argument
292 debug("%s: gclk_rate=%u\n", __func__, gclk_rate); in rockchip_mmc_set_clk()
294 src_clk_div = DIV_ROUND_UP(gclk_rate / 2, freq) - 1; in rockchip_mmc_set_clk()
320 return rockchip_mmc_get_clk(cru, gclk_rate, periph); in rockchip_mmc_set_clk()
323 static ulong rockchip_spi_get_clk(struct rk3188_cru *cru, uint gclk_rate, in rockchip_spi_get_clk() argument
342 return DIV_TO_RATE(gclk_rate, div); in rockchip_spi_get_clk()
345 static ulong rockchip_spi_set_clk(struct rk3188_cru *cru, uint gclk_rate, in rockchip_spi_set_clk() argument
348 int src_clk_div = DIV_ROUND_UP(gclk_rate, freq) - 1; in rockchip_spi_set_clk()
368 return rockchip_spi_get_clk(cru, gclk_rate, periph); in rockchip_spi_set_clk()
461 ulong new_rate, gclk_rate; in rk3188_clk_get_rate() local
463 gclk_rate = rkclk_pll_get_rate(priv->cru, CLK_GENERAL); in rk3188_clk_get_rate()
487 return gclk_rate; in rk3188_clk_get_rate()