summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-30 09:57:24 -0700
committerGerrit <chrome-bot@google.com>2012-10-30 12:42:41 -0700
commitbda48fc5dbd2d34b6d29b39c151095f661bec63a (patch)
treed8e51e3552d6103b1c193ef5c99f87c0860f6116
parent4a0b4262d395ec2c46809e1584b2109f3a3d872e (diff)
downloadchrome-ec-bda48fc5dbd2d34b6d29b39c151095f661bec63a.tar.gz
Switch LPC to use HOOK_TICK instead of task
BUG=chrome-os-partner:15714 BRANCH=none TEST=taskinfo no longer shows LPC task Change-Id: I693cc8695d89d0207076f12d82bdc1f30d5df7b7 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36910 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--board/link/ec.tasklist1
-rw-r--r--chip/lm4/lpc.c18
2 files changed, 8 insertions, 11 deletions
diff --git a/board/link/ec.tasklist b/board/link/ec.tasklist
index 3b32e22540..e74140d93d 100644
--- a/board/link/ec.tasklist
+++ b/board/link/ec.tasklist
@@ -17,7 +17,6 @@
#define CONFIG_TASK_LIST \
TASK(TICK, hook_task, NULL, TASK_STACK_SIZE) \
TASK(WATCHDOG, watchdog_task, NULL, WATCHDOG_TASK_STACK_SIZE) \
- TASK(LPC, lpc_task, NULL, TASK_STACK_SIZE) \
TASK(VBOOTHASH, vboot_hash_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK(LIGHTBAR, lightbar_task, NULL, TASK_STACK_SIZE) \
TASK(CHARGER, charge_state_machine_task, NULL, TASK_STACK_SIZE) \
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index 7563fe1875..633edc8166 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -798,15 +798,13 @@ static void lpc_resume(void)
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, lpc_resume, HOOK_PRIO_DEFAULT);
-void lpc_task(void)
+static void lpc_tick(void)
{
- while (1) {
- msleep(250);
- /*
- * Make sure pending LPC interrupts have been processed.
- * This works around a LM4 bug where host writes sometimes
- * don't trigger interrupts. See crosbug.com/p/13965.
- */
- task_trigger_irq(LM4_IRQ_LPC);
- }
+ /*
+ * Make sure pending LPC interrupts have been processed.
+ * This works around a LM4 bug where host writes sometimes
+ * don't trigger interrupts. See crosbug.com/p/13965.
+ */
+ task_trigger_irq(LM4_IRQ_LPC);
}
+DECLARE_HOOK(HOOK_TICK, lpc_tick, HOOK_PRIO_DEFAULT);