diff options
author | Tom Warren <twarren@nvidia.com> | 2011-11-10 14:50:56 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-11-15 03:06:57 -0800 |
commit | 47d81fa441edaf8d142e0ac1e4c858f619b9a31d (patch) | |
tree | 80918364636beb6ccefce8d24ad2e71e0340619f /arch/arm/cpu/armv7/tegra2 | |
parent | 86e1bf03e7cc73a544ba114e4a589b4c2dc6eb87 (diff) |
arm: Tegra: power: make power.c/.h common for future Tegra3 LCD use
Signed-off-by: Tom Warren <twarren@nvidia.com>
BUG=none
TEST=built Seaboard and Waluigi OK. Booted Waluigi OK.
Change-Id: I1bfbe03945d7dae44e0840349b9698fc08cef07d
Reviewed-on: https://gerrit.chromium.org/gerrit/11504
Tested-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Che-Liang Chiou <clchiou@chromium.org>
Diffstat (limited to 'arch/arm/cpu/armv7/tegra2')
-rw-r--r-- | arch/arm/cpu/armv7/tegra2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra2/power.c | 55 |
2 files changed, 1 insertions, 56 deletions
diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile index 4e0b22f4a68..ff2168483d4 100644 --- a/arch/arm/cpu/armv7/tegra2/Makefile +++ b/arch/arm/cpu/armv7/tegra2/Makefile @@ -33,7 +33,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS-y := -COBJS-y := board.o display.o pinmux.o power.o pwfm.o sys_info.o +COBJS-y := board.o display.o pinmux.o pwfm.o sys_info.o COBJS-$(CONFIG_TEGRA2_LP0) += warmboot.o COBJS-$(CONFIG_TEGRA2_LP0) += warmboot_avp.o diff --git a/arch/arm/cpu/armv7/tegra2/power.c b/arch/arm/cpu/armv7/tegra2/power.c deleted file mode 100644 index 1ae53c7fff7..00000000000 --- a/arch/arm/cpu/armv7/tegra2/power.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2011 The Chromium OS Authors. - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -/* Tegra2 power control functions */ - -#include <asm/io.h> -#include <asm/arch-tegra/bitfield.h> -#include <asm/arch/clock.h> -#include <asm/arch-tegra/pmc.h> -#include <asm/arch/power.h> -#include <asm/arch/tegra.h> -#include <common.h> - -void power_enable_partition(enum power_partition_id id) -{ - struct pmc_ctlr *const pmc = (struct pmc_ctlr *)NV_PA_PMC_BASE; - enum power_partition_id clamp_id = id; - - /* The order of these operations is important */ - reset_set_enable(PERIPH_ID_3D, 1); - - /* Turn the power gate on if it's not on already */ - if (!(readl(&pmc->pmc_pwrgate_status) & (1 << id))) - writel(PWRGATE_ENABLE | id, &pmc->pmc_pwrgate_toggle); - - clock_enable(PERIPH_ID_3D); - udelay(10); - - /* The SOC switches these IDs for clamping */ - if (clamp_id == POWERP_PCI) - clamp_id = POWERP_VIDEO_DEC; - else if (clamp_id == POWERP_VIDEO_DEC) - clamp_id = POWERP_PCI; - writel(1 << clamp_id, &pmc->pmc_remove_clamping); - - reset_set_enable(PERIPH_ID_3D, 0); -} |