diff options
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/wilco/chip.c | 22 | ||||
-rw-r--r-- | src/ec/google/wilco/commands.h | 9 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c index cc9f030957..9a200bd720 100644 --- a/src/ec/google/wilco/chip.c +++ b/src/ec/google/wilco/chip.c @@ -13,6 +13,7 @@ * GNU General Public License for more details. */ +#include <bootstate.h> #include <device/pnp.h> #include <pc80/keyboard.h> #include <stdint.h> @@ -22,6 +23,27 @@ #include "ec.h" #include "chip.h" +static void wilco_ec_post_complete(void *unused) +{ + wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_POST_COMPLETE); +} +BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, + wilco_ec_post_complete, NULL); + +static void wilco_ec_post_memory_init(void *unused) +{ + wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_MEMORY_INIT); +} +BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_EXIT, + wilco_ec_post_memory_init, NULL); + +static void wilco_ec_post_video_init(void *unused) +{ + wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_VIDEO_INIT); +} +BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT, + wilco_ec_post_video_init, NULL); + static void wilco_ec_init(struct device *dev) { if (!dev->enabled) diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h index 492900d557..61eb460bfa 100644 --- a/src/ec/google/wilco/commands.h +++ b/src/ec/google/wilco/commands.h @@ -34,6 +34,8 @@ enum { KB_POWER_BUTTON_TO_HOST = 0x3e, /* Inform the EC that the host is about to enter S3 */ KB_SLP_EN = 0x64, + /* Inform the EC about BIOS boot progress */ + KB_BIOS_PROGRESS = 0xc2, }; enum set_acpi_mode_cmd { @@ -41,6 +43,13 @@ enum set_acpi_mode_cmd { ACPI_ON }; +enum bios_progress_code { + BIOS_PROGRESS_MEMORY_INIT = 0x01, + BIOS_PROGRESS_VIDEO_INIT = 0x02, + BIOS_PROGRESS_LOGO_DISPLAYED = 0x03, + BIOS_PROGRESS_POST_COMPLETE = 0x04, +}; + /* * EC Information */ |