summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc
diff options
context:
space:
mode:
authorZhang Yan <b34916@freescale.com>2011-01-06 13:35:49 +0800
committerAlan Tull <alan.tull@freescale.com>2011-01-06 11:24:00 -0600
commit3c5a68021d9424333f7556871414b355575921b6 (patch)
tree995e947d95f776198fdfb333019d6bd2c207ce5c /arch/arm/plat-mxc
parent4c99a945021b4b378634d05f79c18b597de440e7 (diff)
ENGR00137651 USB: Change usb wakeup task wait for completion interruptible
1. Change wait for competion interruptible avoid hung task information. 2. Achieve sched_clock by clocksource_cyc2ns. Signed-off-by: Zhang Yan <b34916@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r--arch/arm/plat-mxc/time.c7
-rw-r--r--arch/arm/plat-mxc/usb_wakeup.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index b5cb23da8862..a3f1c7de27f6 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -127,14 +127,11 @@ static struct clocksource clocksource_mxc = {
unsigned long long sched_clock(void)
{
- unsigned long long ret;
-
if (!timer_base)
return 0;
- ret = (unsigned long long)clocksource_mxc.read(&clocksource_mxc);
- ret = (ret * clocksource_mxc.mult) >> clocksource_mxc.shift;
- return ret;
+ return clocksource_cyc2ns(clocksource_mxc.read(&clocksource_mxc),
+ clocksource_mxc.mult, clocksource_mxc.shift);
}
static int __init mxc_clocksource_init(struct clk *timer_clk)
diff --git a/arch/arm/plat-mxc/usb_wakeup.c b/arch/arm/plat-mxc/usb_wakeup.c
index 8fed330cd51e..69354ebeaf01 100644
--- a/arch/arm/plat-mxc/usb_wakeup.c
+++ b/arch/arm/plat-mxc/usb_wakeup.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2009-2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -75,6 +75,7 @@ static irqreturn_t usb_wakeup_handler(int irq, void *_dev)
{
struct wakeup_ctrl *ctrl = (struct wakeup_ctrl *)_dev;
irqreturn_t ret = IRQ_NONE;
+
if (usb2_is_in_lowpower(ctrl)) {
printk(KERN_INFO "usb wakeup is here\n");
delay_process_wakeup(ctrl);
@@ -131,7 +132,7 @@ static int wakeup_event_thread(void *param)
sched_setscheduler(current, SCHED_RR, &sch_param);
while (1) {
- wait_for_completion(&ctrl->event);
+ wait_for_completion_interruptible(&ctrl->event);
if (kthread_should_stop())
break;
wakeup_event_handler(ctrl);