• Home
  • Raw
  • Download

Lines Matching refs:mclk

298 	struct clk_mmc *mclk = to_mmc(hw);  in mmc_clk_determine_rate()  local
300 if ((req->rate <= 13000000) && (mclk->id == HI3620_MMC_CIUCLK1)) { in mmc_clk_determine_rate()
337 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_set_timing() local
374 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
375 val &= ~(1 << mclk->clken_bit); in mmc_clk_set_timing()
376 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
378 val = readl_relaxed(mclk->sam_reg); in mmc_clk_set_timing()
379 val = mmc_clk_delay(val, sam, mclk->sam_off, mclk->sam_bits); in mmc_clk_set_timing()
380 writel_relaxed(val, mclk->sam_reg); in mmc_clk_set_timing()
382 val = readl_relaxed(mclk->drv_reg); in mmc_clk_set_timing()
383 val = mmc_clk_delay(val, drv, mclk->drv_off, mclk->drv_bits); in mmc_clk_set_timing()
384 writel_relaxed(val, mclk->drv_reg); in mmc_clk_set_timing()
386 val = readl_relaxed(mclk->div_reg); in mmc_clk_set_timing()
387 val = mmc_clk_delay(val, div, mclk->div_off, mclk->div_bits); in mmc_clk_set_timing()
388 writel_relaxed(val, mclk->div_reg); in mmc_clk_set_timing()
390 val = readl_relaxed(mclk->clken_reg); in mmc_clk_set_timing()
391 val |= 1 << mclk->clken_bit; in mmc_clk_set_timing()
392 writel_relaxed(val, mclk->clken_reg); in mmc_clk_set_timing()
401 struct clk_mmc *mclk = to_mmc(hw); in mmc_clk_prepare() local
404 if (mclk->id == HI3620_MMC_CIUCLK1) in mmc_clk_prepare()
428 struct clk_mmc *mclk; in hisi_register_clk_mmc() local
432 mclk = kzalloc(sizeof(*mclk), GFP_KERNEL); in hisi_register_clk_mmc()
433 if (!mclk) { in hisi_register_clk_mmc()
443 mclk->hw.init = &init; in hisi_register_clk_mmc()
445 mclk->id = mmc_clk->id; in hisi_register_clk_mmc()
446 mclk->clken_reg = base + mmc_clk->clken_reg; in hisi_register_clk_mmc()
447 mclk->clken_bit = mmc_clk->clken_bit; in hisi_register_clk_mmc()
448 mclk->div_reg = base + mmc_clk->div_reg; in hisi_register_clk_mmc()
449 mclk->div_off = mmc_clk->div_off; in hisi_register_clk_mmc()
450 mclk->div_bits = mmc_clk->div_bits; in hisi_register_clk_mmc()
451 mclk->drv_reg = base + mmc_clk->drv_reg; in hisi_register_clk_mmc()
452 mclk->drv_off = mmc_clk->drv_off; in hisi_register_clk_mmc()
453 mclk->drv_bits = mmc_clk->drv_bits; in hisi_register_clk_mmc()
454 mclk->sam_reg = base + mmc_clk->sam_reg; in hisi_register_clk_mmc()
455 mclk->sam_off = mmc_clk->sam_off; in hisi_register_clk_mmc()
456 mclk->sam_bits = mmc_clk->sam_bits; in hisi_register_clk_mmc()
458 clk = clk_register(NULL, &mclk->hw); in hisi_register_clk_mmc()
460 kfree(mclk); in hisi_register_clk_mmc()