Lines Matching full:mclk

284 	struct clk_mmc *mclk = to_mmc(hw);  in mmc_clk_determine_rate()  local
286 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate()
323 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_set_timing() local
360 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
361 val &= ~(1 << mclk->clken_bit); in mmc_clk_set_timing()
362 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
364 val = readl_relaxed(mclk->sam_reg); in mmc_clk_set_timing()
365 val = mmc_clk_delay(val, sam, mclk->sam_off, mclk->sam_bits); in mmc_clk_set_timing()
366 writel_relaxed(val, mclk->sam_reg); in mmc_clk_set_timing()
368 val = readl_relaxed(mclk->drv_reg); in mmc_clk_set_timing()
369 val = mmc_clk_delay(val, drv, mclk->drv_off, mclk->drv_bits); in mmc_clk_set_timing()
370 writel_relaxed(val, mclk->drv_reg); in mmc_clk_set_timing()
372 val = readl_relaxed(mclk->div_reg); in mmc_clk_set_timing()
373 val = mmc_clk_delay(val, div, mclk->div_off, mclk->div_bits); in mmc_clk_set_timing()
374 writel_relaxed(val, mclk->div_reg); in mmc_clk_set_timing()
376 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
377 val |= 1 << mclk->clken_bit; in mmc_clk_set_timing()
378 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
387 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_prepare() local
390 if (mclk->id == HI3620_MMC_CIUCLK1) in mmc_clk_prepare()
414 struct clk_mmc *mclk; in hisi_register_clk_mmc() local
418 mclk = kzalloc(sizeof(*mclk), GFP_KERNEL); in hisi_register_clk_mmc()
419 if (!mclk) in hisi_register_clk_mmc()
427 mclk->hw.init = &init; in hisi_register_clk_mmc()
429 mclk->id = mmc_clk->id; in hisi_register_clk_mmc()
430 mclk->clken_reg = base + mmc_clk->clken_reg; in hisi_register_clk_mmc()
431 mclk->clken_bit = mmc_clk->clken_bit; in hisi_register_clk_mmc()
432 mclk->div_reg = base + mmc_clk->div_reg; in hisi_register_clk_mmc()
433 mclk->div_off = mmc_clk->div_off; in hisi_register_clk_mmc()
434 mclk->div_bits = mmc_clk->div_bits; in hisi_register_clk_mmc()
435 mclk->drv_reg = base + mmc_clk->drv_reg; in hisi_register_clk_mmc()
436 mclk->drv_off = mmc_clk->drv_off; in hisi_register_clk_mmc()
437 mclk->drv_bits = mmc_clk->drv_bits; in hisi_register_clk_mmc()
438 mclk->sam_reg = base + mmc_clk->sam_reg; in hisi_register_clk_mmc()
439 mclk->sam_off = mmc_clk->sam_off; in hisi_register_clk_mmc()
440 mclk->sam_bits = mmc_clk->sam_bits; in hisi_register_clk_mmc()
442 clk = clk_register(NULL, &mclk->hw); in hisi_register_clk_mmc()
444 kfree(mclk); in hisi_register_clk_mmc()