From 0598e84782362eb2859fdcc42d4bf64bc4103d5e Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Tue, 9 Nov 2021 21:49:42 -0600 Subject: Revert "system: Add support for emulated sysrq" This reverts commit 871bf8da2cf5fa9bcfe8771b96af4b55c2503616. BUG=b:200823466 TEST=make buildall -j Change-Id: I126176dcf85d4850213308f77eefb554454f50d0 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273469 Reviewed-by: Vadim Sukhomlinov --- common/keyboard_mkbp.c | 18 ------------------ common/system.c | 17 ----------------- include/config.h | 3 --- include/ec_commands.h | 5 ----- include/system.h | 8 -------- 5 files changed, 51 deletions(-) diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index dc903e19b4..cf3d0dcf33 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -110,7 +110,6 @@ static int get_data_size(enum ec_mkbp_event e) case EC_MKBP_EVENT_HOST_EVENT: case EC_MKBP_EVENT_BUTTON: case EC_MKBP_EVENT_SWITCH: - case EC_MKBP_EVENT_SYSRQ: return sizeof(uint32_t); default: /* For unknown types, say it's 0. */ @@ -311,15 +310,6 @@ void keyboard_update_button(enum keyboard_button_type button, int is_pressed) (const uint8_t *)&mkbp_button_state); } -#ifdef CONFIG_EMULATED_SYSRQ -void send_sysrq(uint8_t key) -{ - uint32_t value = key; - - mkbp_fifo_add(EC_MKBP_EVENT_SYSRQ, (const uint8_t *)&value); -} -#endif - #ifdef CONFIG_POWER_BUTTON /** * Handle power button changing state. @@ -387,14 +377,6 @@ static int switch_get_next_event(uint8_t *out) } DECLARE_EVENT_SOURCE(EC_MKBP_EVENT_SWITCH, switch_get_next_event); -#ifdef CONFIG_EMULATED_SYSRQ -static int sysrq_get_next_event(uint8_t *out) -{ - return get_next_event(out, EC_MKBP_EVENT_SYSRQ); -} -DECLARE_EVENT_SOURCE(EC_MKBP_EVENT_SYSRQ, sysrq_get_next_event); -#endif - void keyboard_send_battery_key(void) { uint8_t state[KEYBOARD_COLS_MAX]; diff --git a/common/system.c b/common/system.c index a1d648b7a1..c886fd4e3f 100644 --- a/common/system.c +++ b/common/system.c @@ -1108,23 +1108,6 @@ DECLARE_CONSOLE_COMMAND(jumptags, command_jumptags, "List jump tags"); #endif /* CONFIG_CMD_JUMPTAGS */ -#ifdef CONFIG_EMULATED_SYSRQ -static int command_sysrq(int argc, char **argv) -{ - char key = 'x'; - - if (argc > 1 && argv[1]) - key = argv[1][0]; - - send_sysrq(key); - - return EC_SUCCESS; -} -DECLARE_CONSOLE_COMMAND(sysrq, command_sysrq, - "[key]", - "Simulate sysrq press (default: x)"); -#endif /* CONFIG_EMULATED_SYSRQ */ - /*****************************************************************************/ /* Host commands */ diff --git a/include/config.h b/include/config.h index 7c469438d9..fa9eb793ff 100644 --- a/include/config.h +++ b/include/config.h @@ -1467,9 +1467,6 @@ /* Support EC chip internal data EEPROM */ #undef CONFIG_EEPROM -/* Support for sending emulated sysrq commands to AP */ -#undef CONFIG_EMULATED_SYSRQ - /* Include code for handling external power */ #define CONFIG_EXTPOWER diff --git a/include/ec_commands.h b/include/ec_commands.h index 3d0dc50ad0..e2c114d671 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3431,9 +3431,6 @@ enum ec_mkbp_event { /* New Fingerprint sensor event, the event data is fp_events bitmap. */ EC_MKBP_EVENT_FINGERPRINT = 5, - /* Sysrq event */ - EC_MKBP_EVENT_SYSRQ = 6, - /* * New 64-bit host event. * The event data is 8 bytes of host event flags. @@ -3498,8 +3495,6 @@ union __ec_align_offset1 ec_response_get_next_data_v1 { uint32_t fp_events; - uint32_t sysrq; - /* CEC events from enum mkbp_cec_event */ uint32_t cec_events; diff --git a/include/system.h b/include/system.h index 3033be2736..a08492c7b8 100644 --- a/include/system.h +++ b/include/system.h @@ -504,14 +504,6 @@ uintptr_t system_get_fw_reset_vector(uintptr_t base); */ int system_is_reboot_warm(void); -/* - * Sends an emulated sysrq to the host, used by button-based debug mode. - * Only implemented on top of MKBP protocol. - * - * @param key Key to be sent (e.g. 'x') - */ -void send_sysrq(uint8_t key); - #ifdef CONFIG_EXTENDED_VERSION_INFO void system_print_extended_version_info(void); #else -- cgit v1.2.1