Debian Codegraph @

src/mainboard/google/brox/bootblock.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 #include <acpi/acpi.h>
4 #include <baseboard/variants.h>
5 #include <bootblock_common.h>
6 #include <bootmode.h>
7 #include <intelblocks/lpc_lib.h>
8 #include <reset.h>
9 #include <security/vboot/vboot_common.h>
10
11 void bootblock_mainboard_early_init(void)
12 {
13 const struct pad_config *pads;
14 size_t num;
15 pads = variant_early_gpio_table(&num);
16 gpio_configure_pads(pads, num);
17 }
18
19 void bootblock_mainboard_init(void)
20 {
21 if (platform_is_resuming()) {
22 printk(BIOS_EMERG, "ACPI S3 resume is not supported on this platform\n");
23 /* Prepare for reboot to clear the sleep state such that the board
24 is not stuck in reboot loop. */
25 vboot_platform_prepare_reboot();
26 board_reset();
27 }
28 variant_update_descriptor();
29
30 if (CONFIG(EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_RANGE))
31 lpc_open_mmio_window(CONFIG_EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_BASE,
32 CONFIG_EC_GOOGLE_CHROMEEC_LPC_GENERIC_MEMORY_SIZE);
33 }
34
35 void __weak variant_update_descriptor(void) {}