* at given voltage. To guarantee h/w switch to the new setting
* enable clock while setting rate.
*/
- if ((c->refcnt == 0) && (c->flags & (DIV_U71 | DIV_U16)) &&
- clk_is_auto_dvfs(c)) {
+ if ((c->refcnt == 0) && (c->flags & PERIPH_DIV) &&
+ clk_is_auto_dvfs(c) && !clk_can_set_disabled_div(c)) {
pr_debug("Setting rate of clock %s with refcnt 0\n", c->name);
ret = clk_enable_locked(c);
if (ret)
mutex_unlock(&clock_list_lock);
}
+void __init tegra_clk_set_disabled_div_all(void)
+{
+ struct clk *c;
+
+ mutex_lock(&clock_list_lock);
+
+ list_for_each_entry(c, &clocks, node) {
+ if (c->flags & PERIPH_DIV)
+ c->set_disabled_div = true;
+ }
+ mutex_unlock(&clock_list_lock);
+}
+
static bool tegra_keep_boot_clocks = false;
static int __init tegra_keep_boot_clocks_setup(char *__unused)
{
unsigned long min_rate;
bool auto_dvfs;
bool cansleep;
+ bool set_disabled_div;
u32 flags;
const char *name;
void tegra_clk_preset_emc_monitor(unsigned long rate);
void tegra_periph_clk_safe_rate_init(struct clk *c);
void tegra_clk_verify_parents(void);
+void tegra_clk_set_disabled_div_all(void);
void clk_init(struct clk *clk);
unsigned long tegra_clk_measure_input_freq(void);
unsigned long clk_get_rate_locked(struct clk *c);
return c->cansleep;
}
+static inline bool clk_can_set_disabled_div(struct clk *c)
+{
+ return c->set_disabled_div;
+}
+
static inline void clk_lock_save(struct clk *c, unsigned long *flags)
{
if (clk_cansleep(c)) {