Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2277)

Unified Diff: arch/arm/mach-tegra/common.c

Issue 4120008: CHROMIUM: ARM: Tegra: Clean up 3D clock init WAR. (Closed) Base URL: http://git.chromium.org/git/kernel-next.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « arch/arm/mach-tegra/board-ventana.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: arch/arm/mach-tegra/common.c
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 3304e92b5fe15f7301639bc32c3f76a2cd81124d..0e855fd59fda104883e4b12381e2392a26f5f42f 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -25,7 +25,9 @@
#include <asm/hardware/cache-l2x0.h>
#include <mach/iomap.h>
+#include <mach/clk.h>
#include <mach/dma.h>
+#include <mach/powergate.h>
#include <mach/system.h>
#include "board.h"
@@ -66,11 +68,26 @@ void __init tegra_init_cache(void)
}
-void __init tegra_common_init(void)
+void __init tegra_common_init(struct tegra_clk_init_table *board_clk_init_table)
{
+ struct clk *clk;
+
tegra_init_fuse();
tegra_init_clock();
tegra_clk_init_from_table(common_clk_init_table);
+ tegra_clk_init_from_table(board_clk_init_table);
+
+ /* HACK: reset 3d clock */
+ clk = clk_get_sys("3d", NULL);
+ tegra_powergate_power_off(TEGRA_POWERGATE_3D);
+ tegra_periph_reset_assert(clk);
+ tegra_powergate_power_on(TEGRA_POWERGATE_3D);
+ clk_enable(clk);
+ udelay(10);
+ tegra_powergate_remove_clamping(TEGRA_POWERGATE_3D);
+ tegra_periph_reset_deassert(clk);
+ clk_put(clk);
+
tegra_init_cache();
#ifdef CONFIG_TEGRA_SYSTEM_DMA
tegra_dma_init();
« no previous file with comments | « arch/arm/mach-tegra/board-ventana.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698