[coreboot-gerrit] Patch set updated for coreboot: mainboard/google/reef: Add support for RECOVERY_MRC_CACHE
Furquan Shaikh (furquan@google.com)
gerrit at coreboot.org
Mon Nov 7 23:17:09 CET 2016
Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17243
-gerrit
commit 86a841a2f4de6090acbd3233f6c497d386ee09ef
Author: Furquan Shaikh <furquan at chromium.org>
Date: Sun Nov 6 00:07:08 2016 -0700
mainboard/google/reef: Add support for RECOVERY_MRC_CACHE
1. Add RECOVERY_MRC_CACHE region to reef FMAP.
2. Implement helper function for getting event for recovery mode with
memory retraining.
3. Select HAS_RECOVERY_MRC_CACHE.
BUG=chrome-os-partner:59352
BRANCH=None
TEST=Verified recovery mode behavior with and without memory training
request on reef.
Change-Id: I91abc9f8122f1aa3980c6372ab557e56a7a92730
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
src/mainboard/google/reef/Kconfig | 1 +
src/mainboard/google/reef/chromeos.c | 23 +++++++++++++++++++----
src/mainboard/google/reef/chromeos.fmd | 3 ++-
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index 6045f47..bb7a531 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -33,6 +33,7 @@ config DRIVER_TPM_I2C_IRQ
config CHROMEOS
select LID_SWITCH if BASEBOARD_REEF_LAPTOP
+ select HAS_RECOVERY_MRC_CACHE
config DRIVERS_I2C_DA7219
default y
diff --git a/src/mainboard/google/reef/chromeos.c b/src/mainboard/google/reef/chromeos.c
index 58c2cd8..a55e6c8 100644
--- a/src/mainboard/google/reef/chromeos.c
+++ b/src/mainboard/google/reef/chromeos.c
@@ -50,16 +50,31 @@ int get_developer_mode_switch(void)
int get_recovery_mode_switch(void)
{
- /* Check if the EC has posted the keyboard recovery event. */
+ /*
+ * Check if the EC has posted the keyboard recovery event with/without
+ * memory retrain.
+ */
return !!(google_chromeec_get_events_b() &
- EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
+ (EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY) |
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT)));
+}
+
+int get_recovery_mode_retrain_switch(void)
+{
+ /*
+ * Check if the EC has posted the keyboard recovery event with memory
+ * retrain.
+ */
+ return !!(google_chromeec_get_events_b() &
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT));
}
int clear_recovery_mode_switch(void)
{
- /* Clear keyboard recovery event. */
+ /* Clear all host event bits requesting recovery mode. */
return google_chromeec_clear_events_b(
- EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY) |
+ EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY_HW_REINIT));
}
int get_write_protect_state(void)
diff --git a/src/mainboard/google/reef/chromeos.fmd b/src/mainboard/google/reef/chromeos.fmd
index d25a9b2..c6a413d 100644
--- a/src/mainboard/google/reef/chromeos.fmd
+++ b/src/mainboard/google/reef/chromeos.fmd
@@ -13,7 +13,8 @@ FLASH 16M {
}
}
MISC_RW at 0x400000 0x4a000 {
- RW_MRC_CACHE at 0x0 0x40000
+ RECOVERY_MRC_CACHE at 0x0 0x10000
+ RW_MRC_CACHE at 0x10000 0x30000
RW_ELOG at 0x40000 0x4000
RW_SHARED at 0x44000 0x4000 {
SHARED_DATA at 0x0 0x2000
More information about the coreboot-gerrit
mailing list