#include <linux/rwsem.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
+#ifdef CONFIG_ARCH_RK29
+#include <linux/console.h>
+#endif
#include "../base.h"
#include "power.h"
struct device *dev = dpm_drv_wd_data.dev;
struct task_struct *tsk = dpm_drv_wd_data.tsk;
-#ifdef CONFIG_ARCH_RK29
-#include <linux/console.h>
- resume_console();
-#endif
-
printk(KERN_EMERG "**** DPM device timeout: %s (%s)\n", dev_name(dev),
(dev->driver ? dev->driver->name : "no driver"));
+#ifdef CONFIG_ARCH_RK29
+ resume_console();
+ if (dev->power.status == DPM_RESUMING)
+ printk(KERN_EMERG "dpm resume stack:\n");
+ else
+#endif
printk(KERN_EMERG "dpm suspend stack:\n");
show_stack(tsk, NULL);
dev->power.status = DPM_RESUMING;
mutex_unlock(&dpm_list_mtx);
+#ifdef CONFIG_ARCH_RK29
+ dpm_drv_wdset(dev);
+#endif
error = device_resume(dev, state);
+#ifdef CONFIG_ARCH_RK29
+ dpm_drv_wdclr(dev);
+#endif
mutex_lock(&dpm_list_mtx);
if (error)