Lines Matching full:mclk

283 	struct clk_mmc *mclk = to_mmc(hw);  in mmc_clk_determine_rate()  local
285 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate()
322 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_set_timing() local
359 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
360 val &= ~(1 << mclk->clken_bit); in mmc_clk_set_timing()
361 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
363 val = readl_relaxed(mclk->sam_reg); in mmc_clk_set_timing()
364 val = mmc_clk_delay(val, sam, mclk->sam_off, mclk->sam_bits); in mmc_clk_set_timing()
365 writel_relaxed(val, mclk->sam_reg); in mmc_clk_set_timing()
367 val = readl_relaxed(mclk->drv_reg); in mmc_clk_set_timing()
368 val = mmc_clk_delay(val, drv, mclk->drv_off, mclk->drv_bits); in mmc_clk_set_timing()
369 writel_relaxed(val, mclk->drv_reg); in mmc_clk_set_timing()
371 val = readl_relaxed(mclk->div_reg); in mmc_clk_set_timing()
372 val = mmc_clk_delay(val, div, mclk->div_off, mclk->div_bits); in mmc_clk_set_timing()
373 writel_relaxed(val, mclk->div_reg); in mmc_clk_set_timing()
375 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
376 val |= 1 << mclk->clken_bit; in mmc_clk_set_timing()
377 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
386 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_prepare() local
389 if (mclk->id == HI3620_MMC_CIUCLK1) in mmc_clk_prepare()
413 struct clk_mmc *mclk; in hisi_register_clk_mmc() local
417 mclk = kzalloc(sizeof(*mclk), GFP_KERNEL); in hisi_register_clk_mmc()
418 if (!mclk) in hisi_register_clk_mmc()
426 mclk->hw.init = &init; in hisi_register_clk_mmc()
428 mclk->id = mmc_clk->id; in hisi_register_clk_mmc()
429 mclk->clken_reg = base + mmc_clk->clken_reg; in hisi_register_clk_mmc()
430 mclk->clken_bit = mmc_clk->clken_bit; in hisi_register_clk_mmc()
431 mclk->div_reg = base + mmc_clk->div_reg; in hisi_register_clk_mmc()
432 mclk->div_off = mmc_clk->div_off; in hisi_register_clk_mmc()
433 mclk->div_bits = mmc_clk->div_bits; in hisi_register_clk_mmc()
434 mclk->drv_reg = base + mmc_clk->drv_reg; in hisi_register_clk_mmc()
435 mclk->drv_off = mmc_clk->drv_off; in hisi_register_clk_mmc()
436 mclk->drv_bits = mmc_clk->drv_bits; in hisi_register_clk_mmc()
437 mclk->sam_reg = base + mmc_clk->sam_reg; in hisi_register_clk_mmc()
438 mclk->sam_off = mmc_clk->sam_off; in hisi_register_clk_mmc()
439 mclk->sam_bits = mmc_clk->sam_bits; in hisi_register_clk_mmc()
441 clk = clk_register(NULL, &mclk->hw); in hisi_register_clk_mmc()
443 kfree(mclk); in hisi_register_clk_mmc()