Lines Matching refs:phase
192 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_get_phase() local
198 value = readl(phase->reg); in mmc_get_phase()
199 delay = (value >> phase->offset) & 0x3; in mmc_get_phase()
234 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_set_phase() local
285 spin_lock_irqsave(phase->lock, flags); in mmc_set_phase()
286 value = readl(phase->reg); in mmc_set_phase()
287 value &= ~GENMASK(phase->offset + 3, phase->offset); in mmc_set_phase()
288 value |= delay << phase->offset; in mmc_set_phase()
289 writel(value, phase->reg); in mmc_set_phase()
290 spin_unlock_irqrestore(phase->lock, flags); in mmc_set_phase()
343 struct mmc_phase *phase; in sunxi_mmc_setup() local
345 phase = kmalloc(sizeof(*phase), GFP_KERNEL); in sunxi_mmc_setup()
346 if (!phase) in sunxi_mmc_setup()
349 phase->hw.init = &init; in sunxi_mmc_setup()
350 phase->reg = reg; in sunxi_mmc_setup()
351 phase->lock = lock; in sunxi_mmc_setup()
354 phase->offset = 8; in sunxi_mmc_setup()
356 phase->offset = 20; in sunxi_mmc_setup()
362 clk_data->clks[i] = clk_register(NULL, &phase->hw); in sunxi_mmc_setup()
364 kfree(phase); in sunxi_mmc_setup()