summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-11-09 20:21:35 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-18 04:54:16 +0000
commit45e380e4fba66a9d00acfcce2a744e5528924326 (patch)
tree8bd8dea8fc82450daed8afa21b1350b7c5537291
parentca9ae8f2c05716498c0f8371aa3a8b069e641337 (diff)
downloadchrome-ec-45e380e4fba66a9d00acfcce2a744e5528924326.tar.gz
Revert "system: Fixups in emulated sysrq code"
This reverts commit e3f5e6bf6ad2d1e2c283a75cf08e17155633e0a5. BUG=b:200823466 TEST=make buildall -j Change-Id: I60dbc01a5345a28fe759975f62a8d9216dcef7fe Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3273468 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
-rw-r--r--common/keyboard_mkbp.c2
-rw-r--r--common/system.c2
-rw-r--r--include/config.h5
-rw-r--r--include/ec_commands.h5
-rw-r--r--include/host_command.h8
-rw-r--r--include/system.h9
6 files changed, 13 insertions, 18 deletions
diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c
index ff7ddc4d5c..dc903e19b4 100644
--- a/common/keyboard_mkbp.c
+++ b/common/keyboard_mkbp.c
@@ -312,7 +312,7 @@ void keyboard_update_button(enum keyboard_button_type button, int is_pressed)
}
#ifdef CONFIG_EMULATED_SYSRQ
-void host_send_sysrq(uint8_t key)
+void send_sysrq(uint8_t key)
{
uint32_t value = key;
diff --git a/common/system.c b/common/system.c
index 7a382c0c01..a1d648b7a1 100644
--- a/common/system.c
+++ b/common/system.c
@@ -1116,7 +1116,7 @@ static int command_sysrq(int argc, char **argv)
if (argc > 1 && argv[1])
key = argv[1][0];
- host_send_sysrq(key);
+ send_sysrq(key);
return EC_SUCCESS;
}
diff --git a/include/config.h b/include/config.h
index ad8e60cc69..7c469438d9 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1467,10 +1467,7 @@
/* Support EC chip internal data EEPROM */
#undef CONFIG_EEPROM
-/*
- * Support for sending emulated sysrq events to AP (on designs with a keyboard,
- * sysrq is passed as normal key presses).
- */
+/* Support for sending emulated sysrq commands to AP */
#undef CONFIG_EMULATED_SYSRQ
/* Include code for handling external power */
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 8b50508bad..3d0dc50ad0 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -3431,10 +3431,7 @@ enum ec_mkbp_event {
/* New Fingerprint sensor event, the event data is fp_events bitmap. */
EC_MKBP_EVENT_FINGERPRINT = 5,
- /*
- * Sysrq event: send emulated sysrq. The event data is sysrq,
- * corresponding to the key to be pressed.
- */
+ /* Sysrq event */
EC_MKBP_EVENT_SYSRQ = 6,
/*
diff --git a/include/host_command.h b/include/host_command.h
index 256a5617ca..4744690875 100644
--- a/include/host_command.h
+++ b/include/host_command.h
@@ -331,14 +331,6 @@ int pd_host_command(int command, int version,
*/
int host_get_vboot_mode(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 host_send_sysrq(uint8_t key);
-
/* Return the lower/higher part of the feature flags bitmap */
uint32_t get_feature_flags0(void);
uint32_t get_feature_flags1(void);
diff --git a/include/system.h b/include/system.h
index 4cad8499a6..3033be2736 100644
--- a/include/system.h
+++ b/include/system.h
@@ -504,6 +504,14 @@ 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
@@ -511,4 +519,5 @@ static inline void system_print_extended_version_info(void)
{
}
#endif
+
#endif /* __CROS_EC_SYSTEM_H */