diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-07-12 14:07:25 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-17 10:49:48 -0700 |
commit | 672057cb7e242574079b05e3028c0e337aa450e5 (patch) | |
tree | d5d76796ca1ff024fe3aa4bdcffca5d5cc6d2ae8 /board | |
parent | d48828757de2274938cf8ec862689c935adaae33 (diff) | |
download | chrome-ec-672057cb7e242574079b05e3028c0e337aa450e5.tar.gz |
Split x86 power button logic out of switch.c
Power button logic is common across all platforms and is not
LM4-specific, so move it to its own module. Switch.c will eventually
be moving to common/ and will common across all platforms (not just
x86), and splitting out the x86 power button logic is needed before
that too.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=manual
1) power on system with both lid and power button.
2) power+refresh -> reboots
3) power+refresh+esc -> recovery mode
4) power+refresh+downarrow -> reboots, AP stays off
5) toggling recovery GPIO via servo should generate SW debug output
showing bit 0x10 toggling
Change-Id: I07714e2c035dceece66f90407983397d2697e7d5
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61780
Diffstat (limited to 'board')
-rw-r--r-- | board/bds/board.h | 3 | ||||
-rw-r--r-- | board/falco/board.h | 1 | ||||
-rw-r--r-- | board/falco/ec.tasklist | 2 | ||||
-rw-r--r-- | board/link/board.h | 1 | ||||
-rw-r--r-- | board/link/ec.tasklist | 2 | ||||
-rw-r--r-- | board/peppy/board.h | 1 | ||||
-rw-r--r-- | board/peppy/ec.tasklist | 2 | ||||
-rw-r--r-- | board/slippy/board.h | 1 | ||||
-rw-r--r-- | board/slippy/ec.tasklist | 2 | ||||
-rw-r--r-- | board/wolf/board.h | 1 | ||||
-rw-r--r-- | board/wolf/ec.tasklist | 2 |
11 files changed, 13 insertions, 5 deletions
diff --git a/board/bds/board.h b/board/bds/board.h index 0abb267637..00127fd8c0 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -21,6 +21,9 @@ #define CONFIG_EOPTION #define CONFIG_PSTORE +/* LM4 modules we want to exclude */ +#undef CONFIG_SWITCH + /* Write protect is active high */ #define CONFIG_WP_ACTIVE_HIGH diff --git a/board/falco/board.h b/board/falco/board.h index 9cecb1d000..7a9e8ce580 100644 --- a/board/falco/board.h +++ b/board/falco/board.h @@ -35,6 +35,7 @@ #define CONFIG_LPC #define CONFIG_PECI #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_X86 #define CONFIG_PWM_FAN #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_G781 diff --git a/board/falco/ec.tasklist b/board/falco/ec.tasklist index 091e8b340e..40d5ec4f60 100644 --- a/board/falco/ec.tasklist +++ b/board/falco/ec.tasklist @@ -25,5 +25,5 @@ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(SWITCH, switch_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) diff --git a/board/link/board.h b/board/link/board.h index 3c6900c497..abcdf04508 100644 --- a/board/link/board.h +++ b/board/link/board.h @@ -38,6 +38,7 @@ #define CONFIG_ONEWIRE_LED #define CONFIG_PECI #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_X86 #define CONFIG_PWM_FAN #define CONFIG_PWM_KBLIGHT #define CONFIG_TEMP_SENSOR diff --git a/board/link/ec.tasklist b/board/link/ec.tasklist index 07a0eb1d29..2b3233e8e0 100644 --- a/board/link/ec.tasklist +++ b/board/link/ec.tasklist @@ -26,5 +26,5 @@ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(SWITCH, switch_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) diff --git a/board/peppy/board.h b/board/peppy/board.h index d5ce4c54a7..6651aa8961 100644 --- a/board/peppy/board.h +++ b/board/peppy/board.h @@ -34,6 +34,7 @@ #define CONFIG_LPC #define CONFIG_PECI #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_X86 #define CONFIG_PWM_FAN #define CONFIG_TEMP_SENSOR #define CONFIG_TEMP_SENSOR_G781 diff --git a/board/peppy/ec.tasklist b/board/peppy/ec.tasklist index 091e8b340e..40d5ec4f60 100644 --- a/board/peppy/ec.tasklist +++ b/board/peppy/ec.tasklist @@ -25,5 +25,5 @@ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(SWITCH, switch_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) diff --git a/board/slippy/board.h b/board/slippy/board.h index 44913b9e12..d27d3ec54b 100644 --- a/board/slippy/board.h +++ b/board/slippy/board.h @@ -33,6 +33,7 @@ #define CONFIG_LPC #define CONFIG_PECI #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_X86 #define CONFIG_PWM_FAN #define CONFIG_TEMP_SENSOR #define CONFIG_USB_PORT_POWER_DUMB diff --git a/board/slippy/ec.tasklist b/board/slippy/ec.tasklist index 091e8b340e..40d5ec4f60 100644 --- a/board/slippy/ec.tasklist +++ b/board/slippy/ec.tasklist @@ -25,5 +25,5 @@ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(SWITCH, switch_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) diff --git a/board/wolf/board.h b/board/wolf/board.h index 98b036afbb..d015cec803 100644 --- a/board/wolf/board.h +++ b/board/wolf/board.h @@ -28,6 +28,7 @@ #define CONFIG_LPC #define CONFIG_PECI #define CONFIG_POWER_BUTTON +#define CONFIG_POWER_BUTTON_X86 #define CONFIG_PWM_FAN #define CONFIG_TEMP_SENSOR #define CONFIG_USB_PORT_POWER_DUMB diff --git a/board/wolf/ec.tasklist b/board/wolf/ec.tasklist index dc735958f0..848b56830c 100644 --- a/board/wolf/ec.tasklist +++ b/board/wolf/ec.tasklist @@ -25,5 +25,5 @@ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \ TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \ - TASK_ALWAYS(SWITCH, switch_task, NULL, TASK_STACK_SIZE) \ + TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) |