Lines Matching full:apmu
28 struct clk_apmu *apmu = to_clk_apmu(hw); in clk_apmu_enable() local
32 if (apmu->lock) in clk_apmu_enable()
33 spin_lock_irqsave(apmu->lock, flags); in clk_apmu_enable()
35 data = readl_relaxed(apmu->base) | apmu->enable_mask; in clk_apmu_enable()
36 writel_relaxed(data, apmu->base); in clk_apmu_enable()
38 if (apmu->lock) in clk_apmu_enable()
39 spin_unlock_irqrestore(apmu->lock, flags); in clk_apmu_enable()
46 struct clk_apmu *apmu = to_clk_apmu(hw); in clk_apmu_disable() local
50 if (apmu->lock) in clk_apmu_disable()
51 spin_lock_irqsave(apmu->lock, flags); in clk_apmu_disable()
53 data = readl_relaxed(apmu->base) & ~apmu->enable_mask; in clk_apmu_disable()
54 writel_relaxed(data, apmu->base); in clk_apmu_disable()
56 if (apmu->lock) in clk_apmu_disable()
57 spin_unlock_irqrestore(apmu->lock, flags); in clk_apmu_disable()
68 struct clk_apmu *apmu; in mmp_clk_register_apmu() local
72 apmu = kzalloc(sizeof(*apmu), GFP_KERNEL); in mmp_clk_register_apmu()
73 if (!apmu) in mmp_clk_register_apmu()
82 apmu->base = base; in mmp_clk_register_apmu()
83 apmu->enable_mask = enable_mask; in mmp_clk_register_apmu()
84 apmu->lock = lock; in mmp_clk_register_apmu()
85 apmu->hw.init = &init; in mmp_clk_register_apmu()
87 clk = clk_register(NULL, &apmu->hw); in mmp_clk_register_apmu()
90 kfree(apmu); in mmp_clk_register_apmu()