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@chromium.org>
Reviewed-on: https://review.coreboot.org/17243
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Furquan Shaikh 2016-11-06 00:07:08 -07:00 committed by Furquan Shaikh
parent cab1c01885
commit 1220589b4f
3 changed files with 18 additions and 3 deletions

View file

@ -34,6 +34,7 @@ config DRIVER_TPM_I2C_IRQ
config CHROMEOS config CHROMEOS
select LID_SWITCH if BASEBOARD_REEF_LAPTOP select LID_SWITCH if BASEBOARD_REEF_LAPTOP
select HAS_RECOVERY_MRC_CACHE
config DRIVERS_I2C_DA7219 config DRIVERS_I2C_DA7219
default y default y

View file

@ -55,11 +55,22 @@ int get_recovery_mode_switch(void)
EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY)); EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
} }
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) int clear_recovery_mode_switch(void)
{ {
/* Clear keyboard recovery event. */ /* Clear all host event bits requesting recovery mode. */
return google_chromeec_clear_events_b( 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) int get_write_protect_state(void)

View file

@ -13,7 +13,10 @@ FLASH 16M {
} }
} }
MISC_RW@0x400000 0x4a000 { MISC_RW@0x400000 0x4a000 {
RW_MRC_CACHE@0x0 0x40000 UNIFIED_MRC_CACHE@0x0 0x40000 {
RECOVERY_MRC_CACHE@0x0 0x10000
RW_MRC_CACHE@0x10000 0x30000
}
RW_ELOG@0x40000 0x4000 RW_ELOG@0x40000 0x4000
RW_SHARED@0x44000 0x4000 { RW_SHARED@0x44000 0x4000 {
SHARED_DATA@0x0 0x2000 SHARED_DATA@0x0 0x2000