summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0032-Disable-eSPI-initialization-in-u-boot-for-normal-boo.patch
blob: 018ab07cf8580746c32f9fb47fa8c093a27ae2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 08f2b4f0464ef8abcf32511f8549233359d16eed Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Wed, 2 Jun 2021 13:03:47 -0700
Subject: [PATCH] Disable eSPI initialization in u-boot for normal booting
 cases

Initializing eSPI in u-boot introduces a small blind window of
handshaking when BMC jumps from boot loader to kernel and it causes
an infinite PCH waiting issue in ME recovery mode. During the power
on handshaking, PCH keeps waiting for OOB_FREE to continue its
booting so the OOB_FREE actually means that BMC is fully ready for
the power on handshake. To prevent the small blind window, this
commit removes eSPI initialization in u-boot for normal booting
cases and makes the kernel eSPI driver responsible for full
eSPI initialization.

eSPI will be initialized in u-boot only in these specific cases:
1. When FFUJ (Force Firmware Update Jumper) is populated.
2. When BMC booting is stopped at u-boot by typing a key.
3. When BMC goes to u-boot due to the boot failure condition.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
 board/aspeed/ast2600_intel/intel.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c
index 54f53d77c476..f3f1d8114616 100644
--- a/board/aspeed/ast2600_intel/intel.c
+++ b/board/aspeed/ast2600_intel/intel.c
@@ -201,6 +201,10 @@ static void gpio_passthru_init(void)
 
 void board_pre_abort_autoboot(void)
 {
+	if (!read_ffuj()) {
+		espi_init();
+		kcs_init();
+	}
 }
 
 #define AST_LPC_BASE 0x1e789000
@@ -625,7 +629,6 @@ int board_late_init(void)
 #endif
 
 	pwm_init();
-	espi_init();
 
 	/* Add reset reason to bootargs */
 	snprintf(value, sizeof(value), "0x%x", gd->reset_reason);
@@ -645,6 +648,7 @@ int board_late_init(void)
 	gpio_passthru_init();
 
 	if (read_ffuj()) {
+		espi_init();
 		kcs_init();
 	}
 
-- 
2.17.1