Clear DPD from PMC pad control driver before setting for platform
specific configuration.
Bug:
1648039,
200107223
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
#include <asm/psci.h>
#include <mach/irqs.h>
+#include <mach/io_dpd.h>
#include "board.h"
#include <linux/platform/tegra/clock.h>
#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);
__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);
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);
}
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;
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 */
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);