]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
padctrl: tegra210-pmc: clear DPD before setting platform specific
authorLaxman Dewangan <ldewangan@nvidia.com>
Sun, 24 May 2015 05:51:06 +0000 (11:21 +0530)
committerLaxman Dewangan <ldewangan@nvidia.com>
Tue, 2 Jun 2015 06:25:21 +0000 (23:25 -0700)
Clear DPD from PMC pad control driver before setting for platform
specific configuration.

Bug: 1648039200107223

Change-Id: I3dffe031926c68dbf80165351651feb93cf8b321
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Cyril Raju <craju@nvidia.com>
(cherry picked from commit 0c4909323a1f5b3d491f87f3ca88f7bb70d99499)
Reviewed-on: http://git-master/r/750843

arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pm.h
arch/arm64/mach-tegra/pm.c
drivers/padctrl/padctrl-tegra210-pmc.c
drivers/platform/tegra/pmc.c
include/linux/platform/tegra/io-dpd.h
include/linux/tegra-pmc.h

index 39903151c02b434b3e9803ad075a4c323fdf153a..5f4d2c8ea7fe82d2f70ea1d92b5c04b377894853 100644 (file)
@@ -74,6 +74,7 @@
 #include <asm/psci.h>
 
 #include <mach/irqs.h>
+#include <mach/io_dpd.h>
 
 #include "board.h"
 #include <linux/platform/tegra/clock.h>
index 63f04fa4371c1b403c8f1b9b30b2227cfc25ef0f..2f6b93f8a53e32d8ddc498dc2202eacac2ebf371 100644 (file)
@@ -40,9 +40,6 @@
 #define PMC_SCRATCH1           0x54
 #define PMC_SCRATCH4           0x60
 
-/* clears io dpd settings before kernel code */
-void tegra_bl_io_dpd_cleanup(void);
-
 unsigned long tegra_cpu_power_good_time(void);
 unsigned long tegra_cpu_power_off_time(void);
 unsigned int tegra_cpu_suspend_freq(void);
index c2748c9812f56c63497abbaf2d61ee6f9446aace..b14dbb8e914756dd3ba0d889ae53d909d2d0ae20 100644 (file)
@@ -1260,9 +1260,6 @@ out:
                                                                __func__);
        }
 
-       /* clear io dpd settings before kernel */
-       tegra_bl_io_dpd_cleanup();
-
 #endif
        if (plat->suspend_mode == TEGRA_SUSPEND_NONE)
                tegra_pd_in_idle(false);
index 83043d454a400f7b0bf898125702dd1ca58911e4..aa2a99135bd75dbe1b21cebf2e5deb88c700a37d 100644 (file)
@@ -399,6 +399,10 @@ int tegra210_pmc_padctrl_init(struct device *dev, struct device_node *np)
        padctrl_set_drvdata(pmc_padctrl->pad_dev, pmc_padctrl);
        tegra210_pmc_parse_io_pad_voltage(config.of_node,
                                pmc_padctrl->pad_dev);
+
+       /* Clear all DPD */
+       tegra_pmc_io_dpd_clear();
+
        tegra210_pmc_parse_io_pad_power(config.of_node,
                                pmc_padctrl->pad_dev);
 
index d57afd294cf9a5548a0a4268a6b976f2c72d9b96..e543b09bb51d027639f93f6795d4ef1bfd63c65e 100644 (file)
@@ -330,6 +330,12 @@ unsigned long tegra_pmc_pwr_detect_get(unsigned long mask)
 }
 EXPORT_SYMBOL(tegra_pmc_pwr_detect_get);
 
+void tegra_pmc_io_dpd_clear(void)
+{
+       tegra_bl_io_dpd_cleanup();
+}
+EXPORT_SYMBOL(tegra_pmc_io_dpd_clear);
+
 int tegra_pmc_io_dpd_enable(int reg, int bit_pos)
 {
         struct tegra_io_dpd io_dpd;
index 3764de546c618f864a448111a5cea62974322ffb..48bbb3767db60030706f26995f3f811a15056c08 100644 (file)
@@ -34,5 +34,6 @@ struct tegra_io_dpd *tegra_io_dpd_get(struct device *dev); /* get handle */
 void tegra_io_dpd_enable(struct tegra_io_dpd *hnd); /* enable dpd */
 void tegra_io_dpd_disable(struct tegra_io_dpd *hnd); /* disable dpd */
 int tegra_io_dpd_init(void);
+void tegra_bl_io_dpd_cleanup(void);
 
 #endif /* end __PLATFORM_TEGRA_IO_DPD_H */
index 5da4249110ca50963034fceeffe698426e6b8bda..f9b0d91edfae636eb8cc990acc35cc685df3528f 100644 (file)
@@ -40,6 +40,7 @@ extern void tegra_pmc_write_bootrom_command(u32 command_offset,
 extern void tegra_pmc_pwr_detect_update(unsigned long mask, unsigned long val);
 extern unsigned long tegra_pmc_pwr_detect_get(unsigned long mask);
 
+extern void tegra_pmc_io_dpd_clear(void);
 extern int tegra_pmc_io_dpd_enable(int reg, int bit_pos);
 extern int tegra_pmc_io_dpd_disable(int reg, int bit_pos);
 extern int tegra_pmc_io_dpd_get_status(int reg, int bit_pos);