summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mx5/system.c2
-rw-r--r--arch/arm/plat-mxc/dvfs_core.c3
-rw-r--r--arch/arm/plat-mxc/system.c8
3 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c
index ddc52cd49eeb..f12b2b3304b7 100644
--- a/arch/arm/mach-mx5/system.c
+++ b/arch/arm/mach-mx5/system.c
@@ -34,11 +34,13 @@
extern int mxc_jtag_enabled;
extern int iram_ready;
+extern int dvfs_core_is_active;
extern void __iomem *ccm_base;
extern void __iomem *databahn_base;
extern void (*wait_in_iram)(void *ccm_addr, void *databahn_addr);
extern void *wait_in_iram_base;
extern void mx50_wait(u32 ccm_base, u32 databahn_addr);
+extern void stop_dvfs(void);
static struct clk *gpc_dvfs_clk;
diff --git a/arch/arm/plat-mxc/dvfs_core.c b/arch/arm/plat-mxc/dvfs_core.c
index ec2e7225e035..9c0223e4e576 100644
--- a/arch/arm/plat-mxc/dvfs_core.c
+++ b/arch/arm/plat-mxc/dvfs_core.c
@@ -89,6 +89,7 @@ extern int cpufreq_trig_needed;
struct timeval core_prev_intr;
void dump_dvfs_core_regs(void);
+void stop_dvfs(void);
static struct delayed_work dvfs_core_handler;
/*
@@ -551,7 +552,7 @@ END: /* Set MAXF, MINF */
/*!
* This function disables the DVFS module.
*/
-static void stop_dvfs(void)
+void stop_dvfs(void)
{
u32 reg = 0;
unsigned long flags;
diff --git a/arch/arm/plat-mxc/system.c b/arch/arm/plat-mxc/system.c
index 65e945a87e85..398b4e1e2e06 100644
--- a/arch/arm/plat-mxc/system.c
+++ b/arch/arm/plat-mxc/system.c
@@ -32,6 +32,8 @@
#include <asm/system.h>
static void __iomem *wdog_base;
+extern int dvfs_core_is_active;
+extern void stop_dvfs(void);
/*
* Reset the system. It is called by machine_restart().
@@ -55,6 +57,12 @@ void arch_reset(char mode, const char *cmd)
__raw_writel(0x20600, IO_ADDRESS(NFC_BASE_ADDR) + 0x28);
#endif
+#ifdef CONFIG_ARCH_MX5
+ /* Stop DVFS-CORE before reboot. */
+ if (dvfs_core_is_active)
+ stop_dvfs();
+#endif
+
if (cpu_is_mx1()) {
wcr_enable = (1 << 0);
} else {