the following patch was just integrated into master:
commit 71558f5627e566af58f63e2b871868ea0d8a3ed4
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Mon Mar 9 15:50:56 2015 -0700
i2c: add support for ww_ring
This is a copy of the depthcharge ww ring driver implementation ported
into coreboot. The main differences are:
- direct use of the i2c driver instead of using the callback driver
description
- no dynamic memory allocation for the controller structures
BRANCH=storm
BUG=chrome-os-partner:36059
TEST=with the rest of the patches applied the LED ring gets
initialized to the default pattern at coreboot start.
Change-Id: I6902c8b76fc173ad2ec28b8cc94695e892df338a
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: eda24b78f8aff311dd6296d458bdfecf26c3d65a
Original-Change-Id: I5660dc3f255aab8fbe3a87041c72916a645c193b
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/257730
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9858
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/9858 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9863
-gerrit
commit 895c06f645177c60e4b9b78b249b758ffc43c358
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Thu Mar 12 19:47:22 2015 -0700
google/storm: support factory reset (wipeout) request
The recovery switch on storm is overloaded: it needs to be pressed for
a certain duration at startup to signal different requests:
- keeping it pressed for 8 to 16 seconds after startup signals the need for
factory reset (wipeout);
- keeping it pressed for longer than 16 seconds signals the need for Chrome
OS recovery.
This patch adds a function to report the wipeout request status and
enables the new feature on Storm.
BRANCH=storm
BUG=chrome-os-partner:37219
TEST=verified that keeping the recovery button pressed between 8 and
16 seconds at startup results in the wipeout request generated
(crossystem 'wipeout_request' returns 1). Keeping the button
pressed for more than 16 seconds triggers recovery mode.
Change-Id: I17131593e12833866a22837271feb0e6989e6750
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 3c503ec13c2b096d4a21fb299c0dd0396f1d01e9
Original-Change-Id: Ic3678217906e56307d47378fa8a6defeb314084e
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/259844
---
src/mainboard/google/storm/Kconfig | 1 +
src/mainboard/google/storm/chromeos.c | 73 +++++++++++++++++++++++++++++------
2 files changed, 62 insertions(+), 12 deletions(-)
diff --git a/src/mainboard/google/storm/Kconfig b/src/mainboard/google/storm/Kconfig
index ecfb8be..3ca3b27 100644
--- a/src/mainboard/google/storm/Kconfig
+++ b/src/mainboard/google/storm/Kconfig
@@ -32,6 +32,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH
select SPI_FLASH_SPANSION
select SPI_FLASH_STMICRO
+ select WIPEOUT_SUPPORTED
config BOARD_VARIANT_AP148
bool "pick this to build an image for ap148"
diff --git a/src/mainboard/google/storm/chromeos.c b/src/mainboard/google/storm/chromeos.c
index 4a01fa8..d424f30 100644
--- a/src/mainboard/google/storm/chromeos.c
+++ b/src/mainboard/google/storm/chromeos.c
@@ -66,23 +66,45 @@ int get_developer_mode_switch(void)
}
/*
- * Holding recovery button pressed continuously for 5 seconds at reset time
- * is required to trigger recovery mode.
+ * The recovery switch on storm is overloaded: it needs to be pressed for a
+ * certain duration at startup to signal different requests:
+ *
+ * - keeping it pressed for 8 to 16 seconds after startup signals the need for
+ * factory reset (wipeout);
+ * - keeping it pressed for longer than 16 seconds signals the need for Chrome
+ * OS recovery.
+ *
+ * The state is read once and cached for following inquiries. The below enum
+ * lists possible states.
*/
-#define RECOVERY_MODE_DELAY_MS (5 * 1000)
-int get_recovery_mode_switch(void)
+enum switch_state {
+ not_probed = -1,
+ no_req,
+ recovery_req,
+ wipeout_req
+};
+
+#define WIPEOUT_MODE_DELAY_MS (8 * 1000)
+#define RECOVERY_MODE_EXTRA_DELAY_MS (8 * 1000)
+
+static enum switch_state get_switch_state(void)
{
struct stopwatch sw;
- static int sampled_value = -1;
+ int sampled_value;
+ static enum switch_state saved_state = not_probed;
- if (sampled_value == -1)
- sampled_value = read_gpio(REC_SW) ^ !REC_POL;
+ if (saved_state != not_probed)
+ return saved_state;
+
+ sampled_value = read_gpio(REC_SW) ^ !REC_POL;
- if (!sampled_value)
- return 0;
+ if (!sampled_value) {
+ saved_state = no_req;
+ return saved_state;
+ }
printk(BIOS_INFO, "recovery button pressed\n");
- stopwatch_init_msecs_expire(&sw, RECOVERY_MODE_DELAY_MS);
+ stopwatch_init_msecs_expire(&sw, WIPEOUT_MODE_DELAY_MS);
do {
sampled_value = read_gpio(REC_SW) ^ !REC_POL;
@@ -91,11 +113,38 @@ int get_recovery_mode_switch(void)
} while (!stopwatch_expired(&sw));
if (sampled_value) {
- printk(BIOS_INFO, "recovery mode requested\n");
if (board_id() == BOARD_ID_WHIRLWIND_SP5)
ww_ring_display_pattern(GSBI_ID_7, 0);
+
+ printk(BIOS_INFO, "wipeout requested, checking recovery\n");
+ stopwatch_init_msecs_expire(&sw, RECOVERY_MODE_EXTRA_DELAY_MS);
+ do {
+ sampled_value = read_gpio(REC_SW) ^ !REC_POL;
+ if (!sampled_value)
+ break;
+ } while (!stopwatch_expired(&sw));
+
+ if (sampled_value) {
+ saved_state = recovery_req;
+ printk(BIOS_INFO, "recovery requested\n");
+ } else {
+ saved_state = wipeout_req;
+ }
+ } else {
+ saved_state = no_req;
}
- return sampled_value;
+
+ return saved_state;
+}
+
+int get_recovery_mode_switch(void)
+{
+ return get_switch_state() == recovery_req;
+}
+
+int get_wipeout_mode_switch(void)
+{
+ return get_switch_state() == wipeout_req;
}
int get_write_protect_state(void)
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9965
-gerrit
commit 98f66cd60fb1c836d1b6085a548ce0846db63ed2
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 18:25:37 2015 +0200
elog: enable by default for CHROMEOS
elog breaks the build if ELOG_FLASH_BASE isn't configured -
and CHROMEOS isn't enabled, since with Chrome OS builds, it
just uses fmap to find out the base.
So it makes sense to enable it on all Chrome OS builds - if
the code never uses it, the linker will drop it soon enough.
Change-Id: I7ee129fadf75caf15fb9bd32b0acf6f7d9d015d8
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/vendorcode/google/chromeos/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index b3efc6c..9a45efa 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -27,6 +27,7 @@ config CHROMEOS
default n
select TPM
select BOOTMODE_STRAPS
+ select ELOG
help
Enable ChromeOS specific features like the GPIO sub table in
the coreboot table. NOTE: Enabling this option on an unsupported
the following patch was just integrated into master:
commit dd78736d4eb45e95fe1c1b412dc5ba496fb1370d
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 18:38:10 2015 +0200
abuild: add option to build with CHROMEOS enabled
abuild -x (we're running out of letters) builds with CHROMEOS enabled.
Change-Id: Ie9abd8aa999dd339aab113ff28c16671b2a17845
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9966
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/9966 for details.
-gerrit
the following patch was just integrated into master:
commit 8bf5c15f76994bbec45fa8bd329db2ae025eea7d
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 18:24:01 2015 +0200
abuild: mark failed builds as failed
abuild only created compile.status for successful builds,
but sometimes it's helpful to easily identify all failed
builds of a full run:
$ grep -l failed coreboot-builds/*/compile.status
Change-Id: Ic90280fb2e8cff1f8f558a2e67ffad741beddbdf
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9964
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See http://review.coreboot.org/9964 for details.
-gerrit
the following patch was just integrated into master:
commit 392e9b156eeb88ab5543d286d9abe00bfa4fb56d
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 18:11:40 2015 +0200
util/broadcom: specify libraries after object files
Some compilers and linkers require a strict order or fail to find
all symbols.
Change-Id: I3f44bec1f0e21e7313a751fbc99c61c1aa9b7cf1
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9962
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/9962 for details.
-gerrit
the following patch was just integrated into master:
commit a1361d4318bf4f849b846150f7cb725632bb0ea5
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 13:18:22 2015 +0200
mainboards: Add CHROMEOS_VBNV_* where appropriate
For boards with MAINBOARD_HAS_CHROMEOS, we should also
state what kind of storage is available for vboot's
non-volatile data.
The flags are taken from the chromium repository and
have no effect with CHROMEOS disabled.
Change-Id: I1747ad26c8c7f6d4076740ec2800dbd52c5d6b3d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9952
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See http://review.coreboot.org/9952 for details.
-gerrit
the following patch was just integrated into master:
commit 320ad820aa01c6ac4b7b42d155c59709b2e192bc
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Wed Apr 22 13:32:13 2015 +0200
intel/broadwell: guard CHROMEOS support better
Since CHROMEOS_VBNV_* are selected by mainboards, they
may be active without CHROMEOS being selected. In this
case, they should be a no-op.
Change-Id: I3b84e2a919ffaa809d713e72e5e4df7a7575e6b9
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/9954
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/9954 for details.
-gerrit