diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2010-11-22 13:06:20 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2010-11-22 15:02:32 -0800 |
commit | 164d4221875009fe179dda6679709ed8f7f9537e (patch) | |
tree | 9e7e2c3ee4017ec63a3a1955dfb38ebaf60cba35 | |
parent | dfb2da188766e0c3bc194020daadad98f10ca34b (diff) |
[arm/tegra] nvrm: open handle at postcore initialization.
The rm handle is getting open in clock_init() which got called
as arch_init time. Before this init, postcore init got called
and it setup most of modules data and result as call of rm api
without opening the rm handle.
Adding code such that rm should be open at postcore init time and
so all rm call should have proper rm handle.
bug 759147
Change-Id: I0ce93c807c64eaef48f73007ff0f64a52c89590a
Reviewed-on: http://git-master/r/11316
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
-rwxr-xr-x | arch/arm/mach-tegra/board-nvodm.c | 4 | ||||
-rwxr-xr-x | arch/arm/mach-tegra/clock_nvrm.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c index ff4c5bd08c3c..a2a273053557 100755 --- a/arch/arm/mach-tegra/board-nvodm.c +++ b/arch/arm/mach-tegra/board-nvodm.c @@ -1700,6 +1700,10 @@ static void __init tegra_setup_reboot(void) static int __init tegra_setup_data(void) { + NvError e = NvSuccess; + if (!s_hRmGlobal) + e = NvRmOpenNew(&s_hRmGlobal); + BUG_ON(e!=NvSuccess); platform_add_devices(nvodm_devices, ARRAY_SIZE(nvodm_devices)); return 0; } diff --git a/arch/arm/mach-tegra/clock_nvrm.c b/arch/arm/mach-tegra/clock_nvrm.c index e250a18f7a03..c26a08ee14a2 100755 --- a/arch/arm/mach-tegra/clock_nvrm.c +++ b/arch/arm/mach-tegra/clock_nvrm.c @@ -446,11 +446,12 @@ EXPORT_SYMBOL(clk_round_rate); void __init tegra_init_clock(void) { - NvError e; + NvError e = NvSuccess; struct clk *cpu_clk = NULL; unsigned long rate = 0; - e = NvRmOpenNew(&s_hRmGlobal); + if (!s_hRmGlobal) + e = NvRmOpenNew(&s_hRmGlobal); BUG_ON(e!=NvSuccess); NvRmPrivPostRegulatorInit(s_hRmGlobal); |