Tegra 2 has a bug where PCIE and VDE clamping masks are swapped relatively to the partition ids. Update tegra_powergate_remove_clamping function to workaround this bug Signed-off-by: Mike Rapoport <mike@xxxxxxxxxxxxxx> --- arch/arm/mach-tegra/powergate.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c index 9b27bf7..9fbe727 100644 --- a/arch/arm/mach-tegra/powergate.c +++ b/arch/arm/mach-tegra/powergate.c @@ -102,10 +102,23 @@ bool tegra_powergate_is_powered(int id) int tegra_powergate_remove_clamping(int id) { + u32 mask; + if (id < 0 || id >= TEGRA_NUM_POWERGATE) return -EINVAL; - pmc_write(1 << id, REMOVE_CLAMPING); + /* + * Tegra 2 has a bug where PCIE and VDE clamping masks are + * swapped relatively to the partition ids + */ + if (id == TEGRA_POWERGATE_VDEC) + mask = (1 << TEGRA_POWERGATE_PCIE); + else if (id == TEGRA_POWERGATE_PCIE) + mask = (1 << TEGRA_POWERGATE_VDEC); + else + mask = (1 << id); + + pmc_write(mask, REMOVE_CLAMPING); return 0; } -- 1.6.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html