]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
platform: tegra: pmc: add API to do system reset
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 6 Nov 2015 14:17:11 +0000 (19:47 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Tue, 10 Nov 2015 23:32:35 +0000 (15:32 -0800)
Add APIs to do system reset through PMC.

bug 200146310

Change-Id: If89a68f29f85140e1d046c3f8a39da2293a3f0c7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829083

drivers/platform/tegra/pmc.c
include/linux/tegra-pmc.h

index 02d3c48ea05478424fa95cb9e949a17b7ae0bf27..b28c2c17db4db564d564a8dfec5762db18227b3f 100644 (file)
@@ -313,6 +313,16 @@ void tegra_pmc_write_bootrom_command(u32 command_offset, unsigned long val)
 }
 EXPORT_SYMBOL(tegra_pmc_write_bootrom_command);
 
+void tegra_pmc_reset_system(void)
+{
+       u32 val;
+
+       val = readl_relaxed(tegra_pmc_base);
+       val |= 0x10;
+       writel_relaxed(val, tegra_pmc_base);
+}
+EXPORT_SYMBOL(tegra_pmc_reset_system);
+
 void tegra_pmc_pwr_detect_update(unsigned long mask, unsigned long val)
 {
        unsigned long flags;
index ad0ce04bc4bd5771b8b0470a34d8b06f7b381f33..e422d47f5c4b2c8b2d06f20d23ad70867895a807 100644 (file)
@@ -49,6 +49,8 @@ extern void tegra_pmc_iopower_enable(int reg, u32 bit_mask);
 extern void tegra_pmc_iopower_disable(int reg, u32 bit_mask);
 extern int tegra_pmc_iopower_get_status(int reg, u32 bit_mask);
 
+extern void tegra_pmc_reset_system(void);
+
 extern bool tegra_is_dpd_mode;
 
 struct pmc_pm_data {