HACK: ARM: tegra: xusb powergate update
Bitan Biswas [Tue, 6 Nov 2012 18:56:51 +0000 (23:56 +0530)]
Tegra11x has xusb functionality disabled. This change powergates
all XUSB partition by default. We need to revisit once xusb is
enabled.

bug 1054317

Change-Id: Ia84f1fe5f495cb5bc54314dc02a2cbb67e13efe5
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/161744
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/powergate.c

index 7ab9720..2702c80 100644 (file)
@@ -421,6 +421,12 @@ static void __init tegra_init_power(void)
 #ifdef CONFIG_ARCH_TEGRA_HAS_PCIE
        tegra_powergate_partition_with_clk_off(TEGRA_POWERGATE_PCIE);
 #endif
+#if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC)
+       /* some partitions need to be powergated by default for t11x */
+       tegra_powergate_partition_with_clk_off(TEGRA_POWERGATE_XUSBA);
+       tegra_powergate_partition_with_clk_off(TEGRA_POWERGATE_XUSBB);
+       tegra_powergate_partition_with_clk_off(TEGRA_POWERGATE_XUSBC);
+#endif
 }
 
 static inline unsigned long gizmo_readl(unsigned long offset)
index aff6dc2..d383e81 100644 (file)
@@ -1093,10 +1093,7 @@ static bool skip_pg_check(int id, bool is_unpowergate)
                 * is managed by respective modules
                 */
                TEGRA_POWERGATE_DISA,
-               TEGRA_POWERGATE_DISB,
-               TEGRA_POWERGATE_XUSBA,
-               TEGRA_POWERGATE_XUSBB,
-               TEGRA_POWERGATE_XUSBC,
+               TEGRA_POWERGATE_DISB
        };
        int i;
 
@@ -1119,7 +1116,7 @@ static bool skip_pg_check(int id, bool is_unpowergate)
        if (!tegra_powergate_is_powered(id) &&
                is_unpowergate)
                return false;
-       for (i = 0; i < tegra_num_powerdomains; i++) {
+       for (i = 0; i < ARRAY_SIZE(skip_pg_t11x_list); i++) {
                if (id == skip_pg_t11x_list[i]) {
                        pr_err("Partition %s %spowergate skipped\n",
                                tegra_powergate_get_name(id),