Lines Matching refs:cru
44 static int rkclk_set_pll(struct rk3036_cru *cru, enum rk_clk_id clk_id, in rkclk_set_pll() argument
48 struct rk3036_pll *pll = &cru->pll[pll_id]; in rkclk_set_pll()
78 static void rkclk_init(struct rk3036_cru *cru) in rkclk_init() argument
85 rk_clrsetreg(&cru->cru_mode_con, in rkclk_init()
91 rkclk_set_pll(cru, CLK_ARM, &apll_init_cfg); in rkclk_init()
92 rkclk_set_pll(cru, CLK_GENERAL, &gpll_init_cfg); in rkclk_init()
105 rk_clrsetreg(&cru->cru_clksel_con[0], in rkclk_init()
110 rk_clrsetreg(&cru->cru_clksel_con[1], in rkclk_init()
128 rk_clrsetreg(&cru->cru_clksel_con[0], in rkclk_init()
133 rk_clrsetreg(&cru->cru_clksel_con[1], in rkclk_init()
153 rk_clrsetreg(&cru->cru_clksel_con[10], in rkclk_init()
162 rk_clrsetreg(&cru->cru_mode_con, in rkclk_init()
169 static uint32_t rkclk_pll_get_rate(struct rk3036_cru *cru, in rkclk_pll_get_rate() argument
175 struct rk3036_pll *pll = &cru->pll[pll_id]; in rkclk_pll_get_rate()
187 con = readl(&cru->cru_mode_con); in rkclk_pll_get_rate()
210 static ulong rockchip_mmc_get_clk(struct rk3036_cru *cru, uint clk_general_rate, in rockchip_mmc_get_clk() argument
220 con = readl(&cru->cru_clksel_con[12]); in rockchip_mmc_get_clk()
226 con = readl(&cru->cru_clksel_con[12]); in rockchip_mmc_get_clk()
238 static ulong rockchip_mmc_set_clk(struct rk3036_cru *cru, uint clk_general_rate, in rockchip_mmc_set_clk() argument
260 rk_clrsetreg(&cru->cru_clksel_con[12], in rockchip_mmc_set_clk()
267 rk_clrsetreg(&cru->cru_clksel_con[11], in rockchip_mmc_set_clk()
276 return rockchip_mmc_get_clk(cru, clk_general_rate, periph); in rockchip_mmc_set_clk()
285 return rkclk_pll_get_rate(priv->cru, clk->id); in rk3036_clk_get_rate()
296 gclk_rate = rkclk_pll_get_rate(priv->cru, CLK_GENERAL); in rk3036_clk_set_rate()
302 new_rate = rockchip_mmc_set_clk(priv->cru, gclk_rate, in rk3036_clk_set_rate()
321 priv->cru = dev_read_addr_ptr(dev); in rk3036_clk_ofdata_to_platdata()
330 rkclk_init(priv->cru); in rk3036_clk_probe()