summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-05-15 14:29:38 -0700
committerRandall Spangler <rspangler@chromium.org>2012-05-15 15:25:09 -0700
commitf738021657caed66cfd98a143732a715440b3c13 (patch)
treef5c211cdc74511380e0e8f4f6016222ae969e219
parent50e0966af8912575d6e55d8b30fde2f2c0135807 (diff)
downloadchrome-ec-f738021657caed66cfd98a143732a715440b3c13.tar.gz
Rearrange task priorities
Charging state machine doesn't need to be able to preempt everybody. Keyboard scanning and power button should preempt, because they need to debounce/scan at a stable rate. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=system still boots Change-Id: Id57c680b9fa4652bc10d19270620d63788a7b269
-rw-r--r--board/link/ec.tasklist10
-rw-r--r--core/cortex-m/task.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/board/link/ec.tasklist b/board/link/ec.tasklist
index 006d69cb2a..2aee1d9be2 100644
--- a/board/link/ec.tasklist
+++ b/board/link/ec.tasklist
@@ -16,14 +16,14 @@
#define CONFIG_TASK_LIST \
TASK(WATCHDOG, watchdog_task, NULL) \
TASK(LIGHTBAR, lightbar_task, NULL) \
+ TASK(POWERSTATE, charge_state_machine_task, NULL) \
TASK(TEMPSENSOR, temp_sensor_task, NULL) \
TASK(THERMAL, thermal_task, NULL) \
TASK(PWM, pwm_task, NULL) \
- TASK(KEYSCAN, keyboard_scan_task, NULL) \
TASK(TYPEMATIC, keyboard_typematic_task, NULL) \
- TASK(POWERBTN, power_button_task, NULL) \
TASK(X86POWER, x86_power_task, NULL) \
- TASK(CONSOLE, console_task, NULL) \
- TASK(HOSTCMD, host_command_task, NULL) \
TASK(I8042CMD, i8042_command_task, NULL) \
- TASK(POWERSTATE, charge_state_machine_task, NULL)
+ TASK(HOSTCMD, host_command_task, NULL) \
+ TASK(CONSOLE, console_task, NULL) \
+ TASK(POWERBTN, power_button_task, NULL) \
+ TASK(KEYSCAN, keyboard_scan_task, NULL)
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c
index b21d2cd59c..d69b607208 100644
--- a/core/cortex-m/task.c
+++ b/core/cortex-m/task.c
@@ -75,9 +75,9 @@ void __idle(void)
cprintf(CC_TASK, "[%T idle task started]\n");
while (1) {
- /* Wait for the irq event */
+ /* Wait for the next irq event. This stops the CPU clock
+ * (sleep / deep sleep, depending on chip config). */
asm("wfi");
- /* TODO: more power management here */
}
}