Lines Matching defs:gate
646 static bool gate_is_non_secure(const struct stm32mp1_clk_gate *gate)
648 return gate->secure == N_S;
1052 static void __clk_enable(struct stm32mp1_clk_gate const *gate)
1056 VERBOSE("Enable clock %u\n", gate->index);
1058 if (gate->set_clr != 0U) {
1059 mmio_write_32(rcc_base + gate->offset, BIT(gate->bit));
1061 mmio_setbits_32(rcc_base + gate->offset, BIT(gate->bit));
1065 static void __clk_disable(struct stm32mp1_clk_gate const *gate)
1069 VERBOSE("Disable clock %u\n", gate->index);
1071 if (gate->set_clr != 0U) {
1072 mmio_write_32(rcc_base + gate->offset + RCC_MP_ENCLRR_OFFSET,
1073 BIT(gate->bit));
1075 mmio_clrbits_32(rcc_base + gate->offset, BIT(gate->bit));
1079 static bool __clk_is_enabled(struct stm32mp1_clk_gate const *gate)
1083 return mmio_read_32(rcc_base + gate->offset) & BIT(gate->bit);
1116 const struct stm32mp1_clk_gate *gate;
1129 gate = gate_ref(i);
1132 __clk_enable(gate);
1137 if (gate_is_non_secure(gate)) {
1139 __clk_enable(gate);
1147 __clk_enable(gate);
1161 const struct stm32mp1_clk_gate *gate;
1174 gate = gate_ref(i);
1177 __clk_disable(gate);
1182 if (gate_is_non_secure(gate)) {
1197 __clk_disable(gate);