Lines Matching +full:clock +full:- +full:rate +full:- +full:control
4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/dt-bindings/clock/ast10x0_clock.h>
22 * - Each bit in these registers controls a clock gate
23 * - Write '1' to a bit: turn OFF the corresponding clock
24 * - Write '0' to a bit: no effect
26 * - Write '1' to a bit: clear the corresponding bit in CLK_STOP_CTRL0/1.
27 * (turn ON the corresponding clock)
50 #define DEV_CFG(dev) ((const struct clock_aspeed_config *const)(dev)->config)
54 const struct device *syscon = DEV_CFG(dev)->syscon; in aspeed_clock_control_on()
58 /* there is no on/off control for group2 clocks */ in aspeed_clock_control_on()
64 clk_gate -= ASPEED_CLK_GRP_1_OFFSET; in aspeed_clock_control_on()
75 const struct device *syscon = DEV_CFG(dev)->syscon; in aspeed_clock_control_off()
79 /* there is no on/off control for group2 clocks */ in aspeed_clock_control_off()
85 clk_gate -= ASPEED_CLK_GRP_1_OFFSET; in aspeed_clock_control_off()
95 clock_control_subsys_t sub_system, uint32_t *rate) in aspeed_clock_control_get_rate() argument
97 const struct device *syscon = DEV_CFG(dev)->syscon; in aspeed_clock_control_get_rate()
113 *rate = src / clk_div; in aspeed_clock_control_get_rate()
119 *rate = src / clk_div; in aspeed_clock_control_get_rate()
125 *rate = src / clk_div; in aspeed_clock_control_get_rate()
140 *rate = MHZ(24) / 13; in aspeed_clock_control_get_rate()
143 return -EINVAL; in aspeed_clock_control_get_rate()