Debian Codegraph @

src/ec/clevo/it5570e/early_init.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <console/console.h>
4 #include <option.h>
5
6 #include "early_init.h"
7 #include "i2ec.h"
8
9 #define XRAM_BOOTEFFECT_DISABLE 0x47a
10 #define XRAM_BOOTEFFECT_SUPPORT 0x1e9
11
12 void ec_configure_kbled_booteffect(void)
13 {
14 if (!ec_d2i2ec_read(XRAM_BOOTEFFECT_SUPPORT)) {
15 printk(BIOS_INFO, "EC: boot effect override not supported by ec firmware\n");
16 return;
17 }
18
19 bool enable = get_uint_option("kbled_booteffect",
20 CONFIG(EC_CLEVO_IT5570E_KBLED_BOOTEFFECT));
21
22 printk(BIOS_DEBUG, "EC: set booteffect enable=%i\n", enable);
23 ec_d2i2ec_write(XRAM_BOOTEFFECT_DISABLE, !enable);
24 }