-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When executing clk_disable_unprepare() in __fclk_set_enable(), the warning “pl0_ref already disabled” occurs. #3
Comments
fclkcfg stops the clock once when changing the clock frequency. static int __fclk_set_enable(struct fclk_device_data* this, bool enable)
{
int status = 0;
if (enable == true) {
if (__clk_is_enabled(this->clk) == false) {
status = clk_prepare_enable(this->clk);
if (status)
dev_err(this->device, "enable failed.");
else
DEV_DBG(this->device, "enable success.");
}
} else {
if (__clk_is_enabled(this->clk) == true) {
clk_disable_unprepare(this->clk);
DEV_DBG(this->device, "disable done.");
}
}
return status;
} Then, static void clk_core_disable(struct clk_core *core)
{
lockdep_assert_held(&enable_lock);
if (!core)
return;
if (WARN(core->enable_count == 0, "%s already disabled\n", core->name))
return;
if (WARN(core->enable_count == 1 && core->flags & CLK_IS_CRITICAL,
"Disabling critical %s\n", core->name))
return;
if (--core->enable_count > 0)
return;
trace_clk_disable(core);
if (core->ops->disable)
core->ops->disable(core->hw);
trace_clk_disable_complete(core);
clk_core_disable(core->parent);
} On the other hand, static int zynqmp_clk_gate_is_enabled(struct clk_hw *hw)
{
struct zynqmp_clk_gate *gate = to_zynqmp_clk_gate(hw);
const char *clk_name = clk_hw_get_name(hw);
u32 clk_id = gate->clk_id;
int state, ret;
ret = zynqmp_pm_clock_getstate(clk_id, &state);
if (ret) {
pr_debug("%s() clock get state failed for %s, ret = %d\n",
__func__, clk_name, ret);
return -EIO;
}
return state ? 1 : 0;
} These things lead to a situation where |
In such a case, an inconsistency with the clock driver may occur, resulting in warning such as issue #3 when the clock is stopped. The
|
The following warning appears when loading fclkcfg.
The text was updated successfully, but these errors were encountered: