summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm.c
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2012-03-27 17:28:00 +0530
committerSimone Willett <swillett@nvidia.com>2012-04-05 18:02:34 -0700
commite6d0e0ceec7cd1a7b8085eb31d2e70bc4d15684f (patch)
tree43eed4efc892f6de225959885a1b7e91a08d3f45 /arch/arm/mach-tegra/pm.c
parentbd1e9de741fa7578062e93bda5251b95ac0f9d24 (diff)
ARM: tegra: remove usage of USE_TEGRA_CPU_SUSPEND
Bug 934368 Change-Id: Ic9d75cbb0c324b1858b2e476e33dd4f96349bce3 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/86351 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/pm.c')
-rw-r--r--arch/arm/mach-tegra/pm.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index 2194b6daf710..07025b418298 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -95,9 +95,6 @@ struct suspend_context {
};
#ifdef CONFIG_PM_SLEEP
-#if USE_TEGRA_CPU_SUSPEND
-void *tegra_cpu_context; /* non-cacheable page for CPU context */
-#endif
phys_addr_t tegra_pgd_phys; /* pgd used by hotplug & LP2 bootup */
static pgd_t *tegra_pgd;
static DEFINE_SPINLOCK(tegra_lp2_lock);
@@ -273,52 +270,7 @@ static __init int create_suspend_pgtable(void)
*/
static __init int alloc_suspend_context(void)
{
-#if USE_TEGRA_CPU_SUSPEND
- pgprot_t prot = __pgprot_modify(pgprot_kernel, L_PTE_MT_MASK,
- L_PTE_MT_BUFFERABLE | L_PTE_XN);
- struct page *ctx_page;
- unsigned long ctx_virt = 0;
- pgd_t *pgd;
- pmd_t *pmd;
- pte_t *pte;
-
- ctx_page = alloc_pages(GFP_KERNEL, 0);
- if (IS_ERR_OR_NULL(ctx_page))
- goto fail;
-
- tegra_cpu_context = vm_map_ram(&ctx_page, 1, -1, prot);
- if (IS_ERR_OR_NULL(tegra_cpu_context))
- goto fail;
-
- /* Add the context page to our private pgd. */
- ctx_virt = (unsigned long)tegra_cpu_context;
-
- pgd = tegra_pgd + pgd_index(ctx_virt);
- if (!pgd_present(*pgd))
- goto fail;
- pmd = pmd_offset(pgd, ctx_virt);
- if (!pmd_none(*pmd))
- goto fail;
- pte = pte_alloc_kernel(pmd, ctx_virt);
- if (!pte)
- goto fail;
-
- set_pte_ext(pte, mk_pte(ctx_page, prot), 0);
-
- outer_clean_range(__pa(pmd), __pa(pmd + 1));
-
return 0;
-
-fail:
- if (ctx_page)
- __free_page(ctx_page);
- if (ctx_virt)
- vm_unmap_ram((void*)ctx_virt, 1);
- tegra_cpu_context = NULL;
- return -ENOMEM;
-#else
- return 0;
-#endif
}
/* ensures that sufficient time is passed for a register write to