summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2023-01-04 04:15:23 +0300
committerTzung-Bi Shih <tzungbi@kernel.org>2023-01-06 06:48:06 +0300
commitd90fa2c64d59f5f151beeef5dbc599784b3391ca (patch)
tree04aad7a5d0419db2c0ff6bd0db0aaffc1d74c6e6 /include/linux
parentaaab5af4b226dce54cb8675dac1ffa359ec90872 (diff)
downloadlinux-d90fa2c64d59f5f151beeef5dbc599784b3391ca.tar.xz
platform/chrome: cros_ec: Poll EC log on EC panic
Add handler for CrOS EC panic events. When a panic is reported, immediately poll for EC log. This should result in the log leading to the EC panic being preserved. ACPI_NOTIFY_CROS_EC_PANIC is defined in coreboot at https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/src/ec/google/chromeec/acpi/ec.asl Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Prashant Malani <pmalani@chromium.org> Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20230104011524.369764-2-robbarnes@google.com
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/cros_ec_proto.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/platform_data/cros_ec_proto.h
index e43107e0bee1..7fb2196f99b0 100644
--- a/include/linux/platform_data/cros_ec_proto.h
+++ b/include/linux/platform_data/cros_ec_proto.h
@@ -42,6 +42,13 @@
#define EC_MAX_RESPONSE_OVERHEAD 32
/*
+ * EC panic is not covered by the standard (0-F) ACPI notify values.
+ * Arbitrarily choosing B0 to notify ec panic, which is in the 84-BF
+ * device specific ACPI notify range.
+ */
+#define ACPI_NOTIFY_CROS_EC_PANIC 0xB0
+
+/*
* Command interface between EC and AP, for LPC, I2C and SPI interfaces.
*/
enum {
@@ -176,6 +183,8 @@ struct cros_ec_device {
/* The platform devices used by the mfd driver */
struct platform_device *ec;
struct platform_device *pd;
+
+ struct blocking_notifier_head panic_notifier;
};
/**