summaryrefslogtreecommitdiff
path: root/src/mainboard/google/kahlee
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2018-04-12 10:02:54 -0600
committerMartin Roth <martinroth@google.com>2018-04-13 16:50:52 +0000
commit70df5d6e43fd839d3fc7bf8fa672c4b540fc0c10 (patch)
treef58f949150eef4b34d4f8208794b7cdfde042686 /src/mainboard/google/kahlee
parent2c3e3ef654d5935e64e125b0c292313a41b53399 (diff)
src/mainboard/kahlee: Turn on keyboard backlight on grunt
Turn on keyboard backlight in romstage to indicate that the system is booting. BUG=b:77921345 TEST=Boot grunt, keyboard backlight comes on. Change-Id: Ib215b19ebdee2f8c4f431af775905eca42436d1c Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://review.coreboot.org/25636 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/kahlee')
-rw-r--r--src/mainboard/google/kahlee/romstage.c11
-rw-r--r--src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h1
-rw-r--r--src/mainboard/google/kahlee/variants/grunt/Makefile.inc2
-rw-r--r--src/mainboard/google/kahlee/variants/grunt/romstage.c26
4 files changed, 40 insertions, 0 deletions
diff --git a/src/mainboard/google/kahlee/romstage.c b/src/mainboard/google/kahlee/romstage.c
index 8f234a31bf..4cd2d40831 100644
--- a/src/mainboard/google/kahlee/romstage.c
+++ b/src/mainboard/google/kahlee/romstage.c
@@ -15,8 +15,19 @@
#include <amdblocks/dimm_spd.h>
#include <baseboard/variants.h>
+#include <soc/romstage.h>
int mainboard_read_spd(uint8_t spdAddress, char *buf, size_t len)
{
return variant_mainboard_read_spd(spdAddress, buf, len);
}
+
+void __attribute__((weak)) variant_romstage_entry(int s3_resume)
+{
+ /* By default, don't do anything */
+}
+
+void mainboard_romstage_entry(int s3_resume)
+{
+ variant_romstage_entry(s3_resume);
+}
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
index e5a348a35d..bc35ff5a1f 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/variants.h
@@ -31,5 +31,6 @@ int variant_get_xhci_oc_map(uint16_t *usb_oc_map);
int variant_get_ehci_oc_map(uint16_t *usb_oc_map);
const struct soc_amd_stoneyridge_gpio *variant_early_gpio_table(size_t *size);
const struct soc_amd_stoneyridge_gpio *variant_gpio_table(size_t *size);
+void variant_romstage_entry(int s3_resume);
#endif /* __BASEBOARD_VARIANTS_H__ */
diff --git a/src/mainboard/google/kahlee/variants/grunt/Makefile.inc b/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
index 7a4b9940df..3ef10b3731 100644
--- a/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
+++ b/src/mainboard/google/kahlee/variants/grunt/Makefile.inc
@@ -15,4 +15,6 @@
subdirs-y += spd
+romstage-y += romstage.c
+
ramstage-y += mainboard.c
diff --git a/src/mainboard/google/kahlee/variants/grunt/romstage.c b/src/mainboard/google/kahlee/variants/grunt/romstage.c
new file mode 100644
index 0000000000..2b8baf88c8
--- /dev/null
+++ b/src/mainboard/google/kahlee/variants/grunt/romstage.c
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Google, LLC.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <baseboard/variants.h>
+#include <ec/google/chromeec/ec.h>
+
+void variant_romstage_entry(int s3_resume)
+{
+ uint32_t sku = google_chromeec_get_sku_id();
+
+ /* Based on SKU, turn on keyboard backlight to show system is booting */
+ if (sku <= 6 && !s3_resume)
+ google_chromeec_kbbacklight(75);
+}