mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
[ARM] tegra: Disable clocks left on by bootloader
Change-Id: I6651ab59b738787ec94f358d5789d950c3d1a563 Signed-off-by: Colin Cross <ccross@android.com>
This commit is contained in:
@@ -511,6 +511,30 @@ int __init tegra_init_dvfs(void)
|
||||
|
||||
late_initcall(tegra_init_dvfs);
|
||||
|
||||
int __init tegra_disable_boot_clocks(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
struct clk *c;
|
||||
|
||||
spin_lock_irqsave(&clock_lock, flags);
|
||||
|
||||
list_for_each_entry(c, &clocks, node) {
|
||||
if (c->refcnt == 0 && c->state == ON &&
|
||||
c->ops && c->ops->disable) {
|
||||
pr_warning("Disabling clock %s left on by bootloader\n",
|
||||
c->name);
|
||||
c->ops->disable(c);
|
||||
c->state = OFF;
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&clock_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(tegra_disable_boot_clocks);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static struct dentry *clk_debugfs_root;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user