diff options
Diffstat (limited to 'src/mainboard/google/butterfly')
-rw-r--r-- | src/mainboard/google/butterfly/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/butterfly/acpi_tables.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/butterfly/smihandler.c | 7 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/mainboard/google/butterfly/Kconfig b/src/mainboard/google/butterfly/Kconfig index 49ac7d2ae1..1eb81eee81 100644 --- a/src/mainboard/google/butterfly/Kconfig +++ b/src/mainboard/google/butterfly/Kconfig @@ -2,6 +2,7 @@ if BOARD_GOOGLE_BUTTERFLY config BOARD_SPECIFIC_OPTIONS def_bool y + select ACPI_GNVS_USB_CHARGECTL select BOARD_ROMSIZE_KB_8192 select EC_QUANTA_ENE_KB3940Q select GFX_GMA_PANEL_1_ON_LVDS diff --git a/src/mainboard/google/butterfly/acpi_tables.c b/src/mainboard/google/butterfly/acpi_tables.c index aa02f67be5..5973ffb8ff 100644 --- a/src/mainboard/google/butterfly/acpi_tables.c +++ b/src/mainboard/google/butterfly/acpi_tables.c @@ -6,14 +6,6 @@ void mainboard_fill_gnvs(struct global_nvs *gnvs) { - /* Disable USB ports in S3 by default */ - gnvs->s3u0 = 0; - gnvs->s3u1 = 0; - - /* Disable USB ports in S5 by default */ - gnvs->s5u0 = 0; - gnvs->s5u1 = 0; - // the lid is open by default. gnvs->lids = 1; diff --git a/src/mainboard/google/butterfly/smihandler.c b/src/mainboard/google/butterfly/smihandler.c index 23bd683f2d..7963dac313 100644 --- a/src/mainboard/google/butterfly/smihandler.c +++ b/src/mainboard/google/butterfly/smihandler.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <acpi/acpi_gnvs.h> #include <console/console.h> #include <cpu/x86/smm.h> -#include <soc/nvs.h> #include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/me.h> #include <northbridge/intel/sandybridge/sandybridge.h> @@ -13,8 +13,11 @@ void mainboard_smi_sleep(u8 slp_typ) { + bool usb0_disable = 0, usb1_disable = 0; + /* Tell the EC to Enable USB power for S3 if requested */ - if (gnvs->s3u0 != 0 || gnvs->s3u1 != 0) + usb_charge_mode_from_gnvs(3, &usb0_disable, &usb1_disable); + if (!usb0_disable || !usb1_disable) ec_mem_write(EC_EC_PSW, ec_mem_read(EC_EC_PSW) | EC_PSW_USB); /* Disable wake on USB, LAN & RTC */ |