summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc
diff options
context:
space:
mode:
authorBora Guvendik <bora.guvendik@intel.com>2018-03-30 16:03:32 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-05-23 09:04:41 +0000
commitddf2bc5081e0eafc33af40a06f4217c5c851fa3f (patch)
tree3a0dec85d5c60ada99c08fdbce00cb7dd2634572 /payloads/libpayload/libc
parentb7fe7a1a8e033706f39c0fded5901f0f1dce7cfb (diff)
coreboot_tables: pass the early_mmc_wake_hw status to payload
Pass the return value from early_mmc_wake_hw() to the payload so that payload can skip sending CMD0 and resetting the card in case of success or in case of a failure in firmware, payload can recover by sending CMD0 and resetting the card. BUG=b:78106689 TEST=Boot to OS Change-Id: Ia4c57d05433c3966118c3642913d7017958cce55 Signed-off-by: Bora Guvendik <bora.guvendik@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/25464 Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'payloads/libpayload/libc')
-rw-r--r--payloads/libpayload/libc/coreboot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 3982e47ec2..26a3a48c23 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -102,6 +102,13 @@ static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
info->vbnv_size = vbnv->range_size;
}
+static void cb_parse_mmc_info(unsigned char *ptr, struct sysinfo_t *info)
+{
+ struct cb_mmc_info *mmc_info = (struct cb_mmc_info *)ptr;
+
+ info->mmc_early_wake_status = mmc_info->early_cmd1_status;
+}
+
static void cb_parse_gpios(unsigned char *ptr, struct sysinfo_t *info)
{
int i;
@@ -399,6 +406,9 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_SPI_FLASH:
cb_parse_spi_flash(ptr, info);
break;
+ case CB_TAG_MMC_INFO:
+ cb_parse_mmc_info(ptr, info);
+ break;
case CB_TAG_MTC:
cb_parse_mtc(ptr, info);
break;