diff options
-rw-r--r-- | arch/arm/mach-tegra/clock.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/clock.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-tegra/tegra11_emc.c | 7 |
3 files changed, 18 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c index b543241ae2a3..a63be522d645 100644 --- a/arch/arm/mach-tegra/clock.c +++ b/arch/arm/mach-tegra/clock.c @@ -6,7 +6,7 @@ * Author: * Colin Cross <ccross@google.com> * - * Copyright (C) 2010-2012 NVIDIA Corporation + * Copyright (c) 2019-2013, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -786,6 +786,16 @@ void tegra_init_max_rate(struct clk *c, unsigned long max_rate) } } +/* Use boot rate as emc monitor output until actual monitoring starts */ +void __init tegra_clk_preset_emc_monitor(void) +{ + struct clk *c = tegra_get_clock_by_name("mon.emc"); + + if (c) { + clk_set_rate(c, c->boot_rate); + clk_enable(c); + } +} static void __init tegra_clk_vefify_rates(void) { diff --git a/arch/arm/mach-tegra/clock.h b/arch/arm/mach-tegra/clock.h index 272b76329d37..499b32b234d8 100644 --- a/arch/arm/mach-tegra/clock.h +++ b/arch/arm/mach-tegra/clock.h @@ -7,7 +7,7 @@ * Author: * Colin Cross <ccross@google.com> * - * Copyright (C) 2010-2013, NVIDIA Corporation. + * Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -323,6 +323,7 @@ struct tegra_clk_init_table { #ifndef CONFIG_COMMON_CLK void tegra_init_max_rate(struct clk *c, unsigned long max_rate); +void tegra_clk_preset_emc_monitor(void); void tegra_clk_vefify_parents(void); void clk_init(struct clk *clk); unsigned long tegra_clk_measure_input_freq(void); diff --git a/arch/arm/mach-tegra/tegra11_emc.c b/arch/arm/mach-tegra/tegra11_emc.c index 791ed5e3751c..928ceb242436 100644 --- a/arch/arm/mach-tegra/tegra11_emc.c +++ b/arch/arm/mach-tegra/tegra11_emc.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/tegra11_emc.c * - * Copyright (C) 2011-2012 NVIDIA Corporation + * Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -1186,7 +1186,10 @@ static struct platform_driver tegra11_emc_driver = { int __init tegra11_emc_init(void) { - return platform_driver_register(&tegra11_emc_driver); + int ret = platform_driver_register(&tegra11_emc_driver); + if (!ret) + tegra_clk_preset_emc_monitor(); + return ret; } void tegra_emc_timing_invalidate(void) |