platform/chrome: cros_ec: Poll EC log on EC panic
authorRob Barnes <robbarnes@google.com>
Wed, 4 Jan 2023 01:15:23 +0000 (01:15 +0000)
committerTzung-Bi Shih <tzungbi@kernel.org>
Fri, 6 Jan 2023 03:48:06 +0000 (11:48 +0800)
commitd90fa2c64d59f5f151beeef5dbc599784b3391ca
tree04aad7a5d0419db2c0ff6bd0db0aaffc1d74c6e6
parentaaab5af4b226dce54cb8675dac1ffa359ec90872
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
drivers/platform/chrome/cros_ec_debugfs.c
drivers/platform/chrome/cros_ec_lpc.c
include/linux/platform_data/cros_ec_proto.h