Lines Matching full:phase
173 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_get_phase() local
179 value = readl(phase->reg); in mmc_get_phase()
180 delay = (value >> phase->offset) & 0x3; in mmc_get_phase()
215 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_set_phase() local
266 spin_lock_irqsave(phase->lock, flags); in mmc_set_phase()
267 value = readl(phase->reg); in mmc_set_phase()
268 value &= ~GENMASK(phase->offset + 3, phase->offset); in mmc_set_phase()
269 value |= delay << phase->offset; in mmc_set_phase()
270 writel(value, phase->reg); in mmc_set_phase()
271 spin_unlock_irqrestore(phase->lock, flags); in mmc_set_phase()
286 * through struct factors_data. The phase clocks parts are identical.
324 struct mmc_phase *phase; in sunxi_mmc_setup() local
326 phase = kmalloc(sizeof(*phase), GFP_KERNEL); in sunxi_mmc_setup()
327 if (!phase) in sunxi_mmc_setup()
330 phase->hw.init = &init; in sunxi_mmc_setup()
331 phase->reg = reg; in sunxi_mmc_setup()
332 phase->lock = lock; in sunxi_mmc_setup()
335 phase->offset = 8; in sunxi_mmc_setup()
337 phase->offset = 20; in sunxi_mmc_setup()
343 clk_data->clks[i] = clk_register(NULL, &phase->hw); in sunxi_mmc_setup()
345 kfree(phase); in sunxi_mmc_setup()