From 30b0c7adf0a5d77a8e902dbbf0ee68954bf28385 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 13 Jul 2016 13:01:13 -0500 Subject: mainboards: align on using ACPI_Sx definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mainboard_smi_sleep() function takes ACPI sleep values of the form S3=3, S4=4, S5=5, etc. All the chipsets ensure that whatever hardware PM1 control register values are used the interface to the mainboard is the same. Move all the SMI handlers in the mainboard directory to not open code the literal values 3 and 5 for ACPI_S3 and ACPI_S5. There were a few notable exceptions where the code was attempting to use the hardware values and not the common translated values. The few users of SLEEP_STATE_X were updated to align with ACPI_SX as those defines are already equal. The removal of SLEEP_STATE_X defines is forthcoming in a subsequent patch. BUG=chrome-os-partner:54977 Change-Id: I76592c9107778cce5995e5af764760453f54dc50 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/15664 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki Reviewed-by: Furquan Shaikh --- src/mainboard/google/tidus/smihandler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mainboard/google/tidus/smihandler.c') diff --git a/src/mainboard/google/tidus/smihandler.c b/src/mainboard/google/tidus/smihandler.c index 92c8a2ebbd..68bc2c2ce3 100644 --- a/src/mainboard/google/tidus/smihandler.c +++ b/src/mainboard/google/tidus/smihandler.c @@ -14,6 +14,7 @@ * GNU General Public License for more details. */ +#include #include #include #include @@ -61,13 +62,13 @@ void mainboard_smi_sleep(u8 slp_typ) { /* Disable USB charging if required */ switch (slp_typ) { - case 3: + case ACPI_S3: set_power_led(SIO_GPIO_BLINK_GPIO10, LED_BLINK); /* Enable DCP mode */ set_gpio(GPIO_USB_CTL_1, 0); break; - case 5: + case ACPI_S5: set_power_led(SIO_GPIO_BLINK_GPIO10, LED_OFF); break; } -- cgit v1.2.3