Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 990ccd9

Browse files
GraspEmptybuildslave
authored andcommitted
Fix trigger fw update fail through fastboot binary in SPI
Change-Id: I2a792c87ea4d1f38f6fb2b698082252c48f39952 Tracked-On: https://jira01.devtools.intel.com/browse/OAM-67513 Signed-off-by: sunxunou <[email protected]> Reviewed-on: https://android.intel.com:443/635430
1 parent 95c430b commit 990ccd9

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

drivers/abl/capsule_msg.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,6 @@ static unsigned heci_send_user_command(uint8_t *data, uint8_t length)
168168
}
169169

170170
#ifdef CAPSULE4SBL
171-
typedef enum {
172-
OsBootDeviceSata,
173-
OsBootDeviceSd,
174-
OsBootDeviceEmmc,
175-
OsBootDeviceUfs,
176-
OsBootDeviceSpi,
177-
OsBootDeviceUsb,
178-
OsBootDeviceNvme,
179-
OsBootDeviceMax
180-
} SBL_OS_BOOT_MEDIUM_TYPE;
181-
182171
typedef enum {
183172
EnumFileSystemTypeFat,
184173
EnumFileSystemTypeExt2,

include/libefiwrapper/storage.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ enum storage_type {
5858
STORAGE_ALL
5959
};
6060

61+
typedef enum {
62+
OsBootDeviceSata,
63+
OsBootDeviceSd,
64+
OsBootDeviceEmmc,
65+
OsBootDeviceUfs,
66+
OsBootDeviceSpi,
67+
OsBootDeviceUsb,
68+
OsBootDeviceNvme,
69+
OsBootDeviceMemory,
70+
OsBootDeviceMax
71+
} SBL_OS_BOOT_MEDIUM_TYPE;
72+
6173
typedef struct boot_dev {
6274
enum storage_type type;
6375
UINT32 diskbus;

libefiwrapper/storage.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,6 @@ typedef struct {
9292
OS_BOOT_DEVICE BootDevice[0];
9393
}__attribute__((__packed__)) OS_BOOT_DEVICE_LIST;
9494

95-
typedef enum {
96-
OsBootDeviceSata,
97-
OsBootDeviceSd,
98-
OsBootDeviceEmmc,
99-
OsBootDeviceUfs,
100-
OsBootDeviceSpi,
101-
OsBootDeviceUsb,
102-
OsBootDeviceNvme,
103-
OsBootDeviceMax
104-
} SBL_OS_BOOT_MEDIUM_TYPE;
105-
10695
static EFI_STATUS dp_init(EFI_SYSTEM_TABLE *st, media_t *media,
10796
EFI_HANDLE *handle)
10897
{
@@ -257,7 +246,7 @@ EFI_STATUS identify_flash_media(boot_dev_t* pdev)
257246

258247
type = (SBL_OS_BOOT_MEDIUM_TYPE)(plist->BootDevice[0].DevType);
259248

260-
if (type != OsBootDeviceSpi) {
249+
if ((type != OsBootDeviceSpi) && (type != OsBootDeviceMemory)) {
261250
ewdbg("Select 1st boot dev");
262251
pdev->type = convert_sbl_dev_type(type);
263252
pdev->diskbus = plist->BootDevice[0].DevAddr;
@@ -297,7 +286,7 @@ EFI_STATUS identify_boot_media()
297286
boot_dev.type = STORAGE_NVME;
298287
else if (!strncmp(val, "VIRTUAL", len))
299288
boot_dev.type = STORAGE_VIRTUAL;
300-
else if (!strncmp(val, "SPI", len)) //Fastboot case
289+
else if ((!strncmp(val, "SPI", len)) || (!strncmp(val, "MEM", len))) //Fastboot case
301290
identify_flash_media(&boot_dev);
302291

303292
//if diskbus is already get from boot option list

0 commit comments

Comments
 (0)