drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / src / ec / lenovo / h8 / panic.c
blob1bd8d1b162412bb6a754c4d37433062a48a76caa
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #include <console/console.h>
3 #include <ec/acpi/ec.h>
5 #include "h8.h"
7 static void h8_panic(void)
9 if (CONFIG(H8_FLASH_LEDS_ON_DEATH)) {
10 static const u8 leds[] = {
11 H8_LED_CONTROL_POWER_LED,
12 H8_LED_CONTROL_BAT0_LED,
13 H8_LED_CONTROL_BAT1_LED,
14 H8_LED_CONTROL_UBAY_LED,
15 H8_LED_CONTROL_SUSPEND_LED,
16 H8_LED_CONTROL_DOCK_LED1,
17 H8_LED_CONTROL_DOCK_LED2,
18 H8_LED_CONTROL_ACDC_LED,
19 H8_LED_CONTROL_MUTE_LED
22 /* Flash all LEDs */
23 for (size_t i = 0; i < ARRAY_SIZE(leds); i++)
24 ec_write(H8_LED_CONTROL,
25 H8_LED_CONTROL_BLINK | leds[i]);
27 if (CONFIG(H8_BEEP_ON_DEATH)) {
28 /* Beep 4 Sec. 1250 Hz */
29 ec_write(H8_SOUND_ENABLE1, 4);
30 ec_write(H8_SOUND_REPEAT, 1);
31 ec_write(H8_SOUND_REG, 10);
35 void die_notify(void)
37 h8_panic();