Lines Matching full:phase
183 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_get_phase() local
189 value = readl(phase->reg); in mmc_get_phase()
190 delay = (value >> phase->offset) & 0x3; in mmc_get_phase()
225 struct mmc_phase *phase = to_mmc_phase(hw); in mmc_set_phase() local
276 spin_lock_irqsave(phase->lock, flags); in mmc_set_phase()
277 value = readl(phase->reg); in mmc_set_phase()
278 value &= ~GENMASK(phase->offset + 3, phase->offset); in mmc_set_phase()
279 value |= delay << phase->offset; in mmc_set_phase()
280 writel(value, phase->reg); in mmc_set_phase()
281 spin_unlock_irqrestore(phase->lock, flags); in mmc_set_phase()
296 * through struct factors_data. The phase clocks parts are identical.
334 struct mmc_phase *phase; in sunxi_mmc_setup() local
336 phase = kmalloc(sizeof(*phase), GFP_KERNEL); in sunxi_mmc_setup()
337 if (!phase) in sunxi_mmc_setup()
340 phase->hw.init = &init; in sunxi_mmc_setup()
341 phase->reg = reg; in sunxi_mmc_setup()
342 phase->lock = lock; in sunxi_mmc_setup()
345 phase->offset = 8; in sunxi_mmc_setup()
347 phase->offset = 20; in sunxi_mmc_setup()
353 clk_data->clks[i] = clk_register(NULL, &phase->hw); in sunxi_mmc_setup()
355 kfree(phase); in sunxi_mmc_setup()