diff options
author | Aaron Durbin <adurbin@chromium.org> | 2016-07-13 13:01:13 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2016-07-15 08:30:31 +0200 |
commit | 30b0c7adf0a5d77a8e902dbbf0ee68954bf28385 (patch) | |
tree | cd13a5a401a9a4698aa3e7601f1fd91567a0269a /src/mainboard/google/rikku/smihandler.c | |
parent | 95c4344a2092bd9fd5eca74d23d0c270628f66d2 (diff) | |
download | coreboot-30b0c7adf0a5d77a8e902dbbf0ee68954bf28385.tar.xz |
mainboards: align on using ACPI_Sx definitions
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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15664
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/rikku/smihandler.c')
-rw-r--r-- | src/mainboard/google/rikku/smihandler.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainboard/google/rikku/smihandler.c b/src/mainboard/google/rikku/smihandler.c index c0b818615e..4331a1fe68 100644 --- a/src/mainboard/google/rikku/smihandler.c +++ b/src/mainboard/google/rikku/smihandler.c @@ -14,6 +14,7 @@ * GNU General Public License for more details. */ +#include <arch/acpi.h> #include <arch/io.h> #include <console/console.h> #include <cpu/x86/smm.h> @@ -58,13 +59,13 @@ void mainboard_smi_sleep(u8 slp_typ) { /* Disable USB charging if required */ switch (slp_typ) { - case 3: + case ACPI_S3: it8772f_gpio_led(IT8772F_GPIO_DEV, 1 /* set */, 0x01 /* select */, 0x01 /* polarity */, 0x01 /* 1=pullup */, 0x01 /* output */, 0x00, /* 0=Alternate function */ SIO_GPIO_BLINK_GPIO10, IT8772F_GPIO_BLINK_FREQUENCY_1_HZ); break; - case 5: + case ACPI_S5: it8772f_gpio_led(IT8772F_GPIO_DEV, 1 /* set */, 0x01 /* select */, 0x00 /* polarity: non-inverting */, 0x00 /* 0=pulldown */, 0x01 /* output */, 0x01 /* 1=Simple IO function */, |