| /drivers/clk/tegra/ |
| A D | clk-periph-gate.c | 20 readl_relaxed(gate->clk_base + (gate->regs->enb_reg)) 27 readl_relaxed(gate->clk_base + (gate->regs->rst_reg)) 41 if (!(read_enb(gate) & periph_clk_to_bit(gate))) in clk_periph_is_enabled() 45 if (read_rst(gate) & periph_clk_to_bit(gate)) in clk_periph_is_enabled() 55 write_enb_set(periph_clk_to_bit(gate), gate); in clk_periph_enable_locked() 78 write_enb_clr(periph_clk_to_bit(gate), gate); in clk_periph_disable_locked() 88 if (!gate->enable_refcnt[gate->clk_num]++) in clk_periph_enable() 103 WARN_ON(!gate->enable_refcnt[gate->clk_num]); in clk_periph_disable() 105 if (--gate->enable_refcnt[gate->clk_num] == 0) in clk_periph_disable() 123 if (!gate->enable_refcnt[gate->clk_num]) in clk_periph_disable_unused() [all …]
|
| /drivers/clk/imx/ |
| A D | clk-gate-93.c | 58 val &= ~(gate->mask << gate->bit_idx); in imx93_clk_gate_do_hardware() 60 val |= (gate->val & gate->mask) << gate->bit_idx; in imx93_clk_gate_do_hardware() 72 if (gate->share_count && (*gate->share_count)++ > 0) in imx93_clk_gate_enable() 111 if (((val >> gate->bit_idx) & gate->mask) == gate->val) in imx93_clk_gate_reg_is_enabled() 140 if (!gate->share_count || *gate->share_count == 0) in imx93_clk_gate_disable_unused() 168 if (!gate) in imx93_clk_gate() 171 gate->reg = reg; in imx93_clk_gate() 174 gate->val = val; in imx93_clk_gate() 175 gate->mask = mask; in imx93_clk_gate() 185 hw = &gate->hw; in imx93_clk_gate() [all …]
|
| A D | clk-gate2.c | 47 reg &= ~(gate->cgr_mask << gate->bit_idx); in clk_gate2_do_shared_clks() 49 reg |= (gate->cgr_val & gate->cgr_mask) << gate->bit_idx; in clk_gate2_do_shared_clks() 60 if (gate->share_count && (*gate->share_count)++ > 0) in clk_gate2_enable() 108 ret = clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx, in clk_gate2_is_enabled() 109 gate->cgr_val, gate->cgr_mask); in clk_gate2_is_enabled() 123 if (!gate->share_count || *gate->share_count == 0) in clk_gate2_disable_unused() 148 if (!gate) in clk_hw_register_gate2() 152 gate->reg = reg; in clk_hw_register_gate2() 157 gate->lock = lock; in clk_hw_register_gate2() 167 hw = &gate->hw; in clk_hw_register_gate2() [all …]
|
| A D | clk-gate-exclusive.c | 25 struct clk_gate gate; member 33 struct clk_gate_exclusive, gate); in clk_gate_exclusive_enable() 34 u32 val = readl(gate->reg); in clk_gate_exclusive_enable() 62 struct clk_gate *gate; in imx_clk_hw_gate_exclusive() local 73 gate = &exgate->gate; in imx_clk_hw_gate_exclusive() 81 gate->reg = reg; in imx_clk_hw_gate_exclusive() 82 gate->bit_idx = shift; in imx_clk_hw_gate_exclusive() 83 gate->lock = &imx_ccm_lock; in imx_clk_hw_gate_exclusive() 84 gate->hw.init = &init; in imx_clk_hw_gate_exclusive() 87 hw = &gate->hw; in imx_clk_hw_gate_exclusive() [all …]
|
| A D | clk-composite-93.c | 52 if (gate->lock) in imx93_clk_composite_gate_endisable() 55 reg = readl(gate->reg); in imx93_clk_composite_gate_endisable() 58 reg &= ~BIT(gate->bit_idx); in imx93_clk_composite_gate_endisable() 60 reg |= BIT(gate->bit_idx); in imx93_clk_composite_gate_endisable() 62 writel(reg, gate->reg); in imx93_clk_composite_gate_endisable() 66 if (gate->lock) in imx93_clk_composite_gate_endisable() 226 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in imx93_clk_composite_flags() 227 if (!gate) in imx93_clk_composite_flags() 230 gate_hw = &gate->hw; in imx93_clk_composite_flags() 231 gate->reg = reg; in imx93_clk_composite_flags() [all …]
|
| /drivers/clk/mmp/ |
| A D | clk-gate.c | 31 if (gate->lock) in mmp_clk_gate_enable() 39 if (gate->lock) in mmp_clk_gate_enable() 57 if (gate->lock) in mmp_clk_gate_disable() 65 if (gate->lock) in mmp_clk_gate_disable() 75 if (gate->lock) in mmp_clk_gate_is_enabled() 80 if (gate->lock) in mmp_clk_gate_is_enabled() 83 return (tmp & gate->mask) == gate->val_enable; in mmp_clk_gate_is_enabled() 102 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in mmp_clk_register_gate() 103 if (!gate) in mmp_clk_register_gate() 113 gate->reg = reg; in mmp_clk_register_gate() [all …]
|
| /drivers/clk/ |
| A D | clk-gate.c | 32 return readl(gate->reg); in clk_gate_readl() 65 if (gate->lock) in clk_gate_endisable() 85 if (gate->lock) in clk_gate_endisable() 148 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in __clk_hw_register_gate() 149 if (!gate) in __clk_hw_register_gate() 164 gate->reg = reg; in __clk_hw_register_gate() 167 gate->lock = lock; in __clk_hw_register_gate() 170 hw = &gate->hw; in __clk_hw_register_gate() 176 kfree(gate); in __clk_hw_register_gate() 212 kfree(gate); in clk_unregister_gate() [all …]
|
| A D | clk-ast2600.c | 302 regmap_read(gate->map, get_reset_reg(gate), ®); in aspeed_g6_clk_is_enabled() 308 regmap_read(gate->map, get_clock_reg(gate), ®); in aspeed_g6_clk_is_enabled() 331 regmap_write(gate->map, get_reset_reg(gate), rst); in aspeed_g6_clk_enable() 339 regmap_write(gate->map, get_clock_reg(gate) + 0x04, clk); in aspeed_g6_clk_enable() 342 regmap_write(gate->map, get_clock_reg(gate), clk); in aspeed_g6_clk_enable() 349 regmap_write(gate->map, get_reset_reg(gate) + 0x4, rst); in aspeed_g6_clk_enable() 366 regmap_write(gate->map, get_clock_reg(gate), clk); in aspeed_g6_clk_disable() 369 regmap_write(gate->map, get_clock_reg(gate) + 0x4, clk); in aspeed_g6_clk_disable() 434 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in aspeed_g6_clk_hw_register_gate() 435 if (!gate) in aspeed_g6_clk_hw_register_gate() [all …]
|
| A D | clk-aspeed.c | 198 if (gate->reset_idx >= 0) { in aspeed_clk_is_enabled() 224 if (gate->reset_idx >= 0) { in aspeed_clk_enable() 236 if (gate->reset_idx >= 0) { in aspeed_clk_enable() 355 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in aspeed_clk_hw_register_gate() 356 if (!gate) in aspeed_clk_hw_register_gate() 365 gate->map = map; in aspeed_clk_hw_register_gate() 366 gate->clock_idx = clock_idx; in aspeed_clk_hw_register_gate() 369 gate->lock = lock; in aspeed_clk_hw_register_gate() 370 gate->hw.init = &init; in aspeed_clk_hw_register_gate() 372 hw = &gate->hw; in aspeed_clk_hw_register_gate() [all …]
|
| /drivers/clk/rockchip/ |
| A D | clk-gate-grf.c | 30 u32 val = !(gate->flags & CLK_GATE_SET_TO_DISABLE) ? BIT(gate->shift) : 0; in rockchip_gate_grf_enable() 34 ret = regmap_update_bits(gate->regmap, gate->reg, in rockchip_gate_grf_enable() 43 u32 val = !(gate->flags & CLK_GATE_SET_TO_DISABLE) ? 0 : BIT(gate->shift); in rockchip_gate_grf_disable() 46 regmap_update_bits(gate->regmap, gate->reg, in rockchip_gate_grf_disable() 56 ret = regmap_test_bits(gate->regmap, gate->reg, BIT(gate->shift)); in rockchip_gate_grf_is_enabled() 84 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in rockchip_clk_register_gate_grf() 85 if (!gate) in rockchip_clk_register_gate_grf() 94 gate->hw.init = &init; in rockchip_clk_register_gate_grf() 96 gate->reg = reg; in rockchip_clk_register_gate_grf() 97 gate->shift = shift; in rockchip_clk_register_gate_grf() [all …]
|
| /drivers/staging/sm750fb/ |
| A D | ddk750_power.c | 78 poke32(MODE1_GATE, gate); in sm750_set_current_gate() 80 poke32(MODE0_GATE, gate); in sm750_set_current_gate() 88 u32 gate; in sm750_enable_2d_engine() local 101 u32 gate; in sm750_enable_dma() local 106 gate |= CURRENT_GATE_DMA; in sm750_enable_dma() 108 gate &= ~CURRENT_GATE_DMA; in sm750_enable_dma() 118 u32 gate; in sm750_enable_gpio() local 123 gate |= CURRENT_GATE_GPIO; in sm750_enable_gpio() 135 u32 gate; in sm750_enable_i2c() local 140 gate |= CURRENT_GATE_I2C; in sm750_enable_i2c() [all …]
|
| /drivers/clk/visconti/ |
| A D | clkc.c | 31 u32 clk = BIT(gate->ck_idx); in visconti_gate_clk_is_enabled() 34 regmap_read(gate->regmap, gate->ckon_offset, &val); in visconti_gate_clk_is_enabled() 51 regmap_update_bits(gate->regmap, gate->ckoff_offset, clk, clk); in visconti_gate_clk_disable() 62 regmap_update_bits(gate->regmap, gate->ckon_offset, clk, clk); in visconti_gate_clk_enable() 96 gate = devm_kzalloc(dev, sizeof(*gate), GFP_KERNEL); in visconti_clk_register_gate() 97 if (!gate) in visconti_clk_register_gate() 106 gate->regmap = regmap; in visconti_clk_register_gate() 112 gate->rs_idx = rs_idx; in visconti_clk_register_gate() 113 gate->lock = lock; in visconti_clk_register_gate() 114 gate->hw.init = &init; in visconti_clk_register_gate() [all …]
|
| /drivers/clk/ingenic/ |
| A D | jz4770-cgu.c | 178 .gate = { CGU_REG_CLKGR1, 7 }, 234 .gate = { CGU_REG_CLKGR0, 26 }, 248 .gate = { CGU_REG_CLKGR1, 9 }, 255 .gate = { CGU_REG_CLKGR0, 1 }, 302 .gate = { CGU_REG_CLKGR0, 2 }, 310 .gate = { CGU_REG_CLKGR0, 4 }, 325 .gate = { CGU_REG_CLKGR1, 8 }, 340 .gate = { CGU_REG_CLKGR1, 0 }, 345 .gate = { CGU_REG_CLKGR0, 5 }, 350 .gate = { CGU_REG_CLKGR0, 6 }, [all …]
|
| A D | jz4755-cgu.c | 144 .gate = { CGU_REG_CLKGR, 10 }, 151 .gate = { CGU_REG_CLKGR, 9 }, 171 .gate = { CGU_REG_CLKGR, 4 }, 185 .gate = { CGU_REG_CLKGR, 2 }, 192 .gate = { CGU_REG_CLKGR, 8 }, 200 .gate = { CGU_REG_CLKGR, 0 }, 218 .gate = { CGU_REG_CLKGR, 7 }, 224 .gate = { CGU_REG_CLKGR, 5 }, 230 .gate = { CGU_REG_CLKGR, 3 }, 242 .gate = { CGU_REG_CLKGR, 1 }, [all …]
|
| A D | jz4780-cgu.c | 409 .gate = { CGU_REG_CLKGR1, 2 }, 451 .gate = { CGU_REG_CLKGR0, 3 }, 509 .gate = { CGU_REG_CLKGR1, 3 }, 518 .gate = { CGU_REG_CLKGR1, 4 }, 527 .gate = { CGU_REG_CLKGR1, 9 }, 536 .gate = { CGU_REG_CLKGR0, 1 }, 556 .gate = { CGU_REG_CLKGR0, 0 }, 562 .gate = { CGU_REG_CLKGR0, 2 }, 568 .gate = { CGU_REG_CLKGR0, 4 }, 574 .gate = { CGU_REG_CLKGR0, 5 }, [all …]
|
| A D | jz4760-cgu.c | 219 .gate = { CGU_REG_CLKGR0, 24 }, 226 .gate = { CGU_REG_CLKGR1, 9 }, 262 .gate = { CGU_REG_CLKGR1, 8 }, 277 .gate = { CGU_REG_CLKGR0, 2 }, 307 .gate = { CGU_REG_CLKGR0, 4 }, 332 .gate = { CGU_REG_CLKGR1, 0 }, 337 .gate = { CGU_REG_CLKGR0, 5 }, 342 .gate = { CGU_REG_CLKGR0, 6 }, 377 .gate = { CGU_REG_CLKGR0, 8 }, 387 .gate = { CGU_REG_CLKGR0, 3 }, [all …]
|
| A D | x1830-cgu.c | 231 .gate = { CGU_REG_CLKGR1, 15 }, 290 .gate = { CGU_REG_CLKGR1, 4 }, 299 .gate = { CGU_REG_CLKGR1, 9 }, 313 .gate = { CGU_REG_CLKGR0, 4 }, 320 .gate = { CGU_REG_CLKGR0, 5 }, 361 .gate = { CGU_REG_CLKGR0, 0 }, 367 .gate = { CGU_REG_CLKGR0, 1 }, 373 .gate = { CGU_REG_CLKGR0, 3 }, 379 .gate = { CGU_REG_CLKGR0, 6 }, 385 .gate = { CGU_REG_CLKGR0, 7 }, [all …]
|
| A D | jz4740-cgu.c | 156 .gate = { CGU_REG_CLKGR, 10 }, 170 .gate = { CGU_REG_CLKGR, 6 }, 178 .gate = { CGU_REG_CLKGR, 4 }, 185 .gate = { CGU_REG_CLKGR, 7 }, 192 .gate = { CGU_REG_CLKGR, 14 }, 208 .gate = { CGU_REG_CLKGR, 0 }, 214 .gate = { CGU_REG_CLKGR, 15 }, 232 .gate = { CGU_REG_CLKGR, 8 }, 238 .gate = { CGU_REG_CLKGR, 3 }, 244 .gate = { CGU_REG_CLKGR, 5 }, [all …]
|
| /drivers/clk/uniphier/ |
| A D | clk-uniphier-gate.c | 27 return regmap_write_bits(gate->regmap, gate->reg, BIT(gate->bit), in uniphier_clk_gate_endisable() 28 enable ? BIT(gate->bit) : 0); in uniphier_clk_gate_endisable() 47 if (regmap_read(gate->regmap, gate->reg, &val) < 0) in uniphier_clk_gate_is_enabled() 64 struct uniphier_clk_gate *gate; in uniphier_clk_register_gate() local 68 gate = devm_kzalloc(dev, sizeof(*gate), GFP_KERNEL); in uniphier_clk_register_gate() 69 if (!gate) in uniphier_clk_register_gate() 78 gate->regmap = regmap; in uniphier_clk_register_gate() 79 gate->reg = data->reg; in uniphier_clk_register_gate() 80 gate->bit = data->bit; in uniphier_clk_register_gate() 81 gate->hw.init = &init; in uniphier_clk_register_gate() [all …]
|
| /drivers/clk/bcm/ |
| A D | clk-kona.c | 339 if (!gate_exists(gate)) in __is_clk_gate_enabled() 356 if (!gate_exists(gate)) in is_clk_gate_enabled() 400 if (gate_is_sw_managed(gate) && (enabled = gate_is_enabled(gate)) && in __gate_commit() 413 return __ccu_wait_bit(ccu, gate->offset, gate->status_bit, enabled); in __gate_commit() 424 if (!gate_exists(gate)) in gate_init() 440 if (!gate_exists(gate) || !gate_is_sw_managed(gate)) in __clk_gate() 452 gate_flip_enabled(gate); in __clk_gate() 471 if (!gate_exists(gate) || !gate_is_sw_managed(gate)) in clk_gate() 952 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_enable() local 960 struct bcm_clk_gate *gate = &bcm_clk->u.peri->gate; in kona_peri_clk_disable() local [all …]
|
| A D | clk-bcm281xx.c | 16 .gate = HW_SW_GATE(0x214, 16, 0, 1), 34 .gate = HW_SW_GATE(0x0414, 16, 0, 1), 43 .gate = HW_SW_GATE(0x0418, 16, 0, 1), 76 .gate = HW_SW_GATE(0x04a4, 18, 2, 3), 95 .gate = HW_SW_GATE(0x0358, 18, 2, 3), 107 .gate = HW_SW_GATE(0x035c, 18, 2, 3), 119 .gate = HW_SW_GATE(0x0364, 18, 2, 3), 131 .gate = HW_SW_GATE(0x0360, 18, 2, 3), 143 .gate = HW_SW_GATE(0x0354, 18, 2, 3), 154 .gate = HW_SW_GATE(0x0370, 18, 2, 3), [all …]
|
| A D | clk-bcm21664.c | 16 .gate = HW_SW_GATE(0x214, 16, 0, 1), 33 .gate = HW_SW_GATE(0x0414, 16, 0, 1), 58 .gate = HW_SW_GATE(0x0358, 18, 2, 3), 70 .gate = HW_SW_GATE(0x035c, 18, 2, 3), 82 .gate = HW_SW_GATE(0x0364, 18, 2, 3), 94 .gate = HW_SW_GATE(0x0360, 18, 2, 3), 107 .gate = HW_SW_GATE(0x0358, 18, 2, 3), 112 .gate = HW_SW_GATE(0x035c, 18, 2, 3), 117 .gate = HW_SW_GATE(0x0364, 18, 2, 3), 122 .gate = HW_SW_GATE(0x0360, 18, 2, 3), [all …]
|
| /drivers/clk/zynqmp/ |
| A D | clk-gate-zynqmp.c | 38 u32 clk_id = gate->clk_id; in zynqmp_clk_gate_enable() 58 u32 clk_id = gate->clk_id; in zynqmp_clk_gate_disable() 78 u32 clk_id = gate->clk_id; in zynqmp_clk_gate_is_enabled() 112 struct zynqmp_clk_gate *gate; in zynqmp_clk_register_gate() local 118 gate = kzalloc(sizeof(*gate), GFP_KERNEL); in zynqmp_clk_register_gate() 119 if (!gate) in zynqmp_clk_register_gate() 131 gate->flags = nodes->type_flag; in zynqmp_clk_register_gate() 132 gate->hw.init = &init; in zynqmp_clk_register_gate() 133 gate->clk_id = clk_id; in zynqmp_clk_register_gate() 135 hw = &gate->hw; in zynqmp_clk_register_gate() [all …]
|
| /drivers/clk/mediatek/ |
| A D | clk-gate.c | 223 const struct mtk_gate *gate = &clks[i]; in mtk_clk_register_gates() local 227 node, gate->id); in mtk_clk_register_gates() 231 hw = mtk_clk_register_gate(dev, gate->name, gate->parent_name, in mtk_clk_register_gates() 233 gate->regs->set_ofs, in mtk_clk_register_gates() 234 gate->regs->clr_ofs, in mtk_clk_register_gates() 235 gate->regs->sta_ofs, in mtk_clk_register_gates() 236 gate->shift, gate->ops, in mtk_clk_register_gates() 237 gate->flags); in mtk_clk_register_gates() 245 clk_data->hws[gate->id] = hw; in mtk_clk_register_gates() 252 const struct mtk_gate *gate = &clks[i]; in mtk_clk_register_gates() local [all …]
|
| /drivers/clk/stm32/ |
| A D | clk-stm32-core.c | 144 if (gate->set_clr != 0) in stm32_gate_endisable() 152 if (gate->set_clr != 0) in stm32_gate_endisable() 153 writel(BIT(gate->bit_idx), addr + gate->set_clr); in stm32_gate_endisable() 169 if (gate->set_clr != 0) in stm32_gate_disable_unused() 170 writel(BIT(gate->bit_idx), addr + gate->set_clr); in stm32_gate_disable_unused() 181 return (readl(base + gate->offset) & BIT(gate->bit_idx)) != 0; in stm32_gate_is_enabled() 292 stm32_gate_endisable(gate->base, gate->clock_data, gate->gate_id, enable); in clk_stm32_gate_endisable() 313 return stm32_gate_is_enabled(gate->base, gate->clock_data, gate->gate_id); in clk_stm32_gate_is_enabled() 323 stm32_gate_disable_unused(gate->base, gate->clock_data, gate->gate_id); in clk_stm32_gate_disable_unused() 657 gate->base = base; in clk_stm32_gate_register() [all …]
|