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

Commit 029b3d5

Browse files
xihua-chenbuildslave
authored andcommitted
Merge android/o/mr1/master into merge_branch
git log --pretty=format:"%h %ad | %s%d [%an]" merge_branch..android/o/mr1/master: b586b9a Wed Jun 20 09:14:00 2018 +0800 | To correct IOC CBC setting (origin/cactus/o_mr1-r0/candidates/mergerequest, origin/android/o/mr1/master, android/o/mr1/master) [Haoyu Tang] 06f5817 Fri Jun 29 10:41:45 2018 -0700 | drivers/abl: support recovery and dnx reboot target [Jeremy Compostella] c82fd9a Tue Jul 10 08:06:37 2018 +0800 | Add enumeration type for virtual devices [Yang, Kai] git diff --stat merge_branch..android/o/mr1/master: Android.mk | 3 +++ drivers/abl/abl_reboot_target.c | 2 ++ drivers/ioc_uart/ioc_uart.c | 16 ++++++++++------ drivers/sdhci_mmc/mmc.c | 4 ++-- drivers/sdhci_mmc/sdhci-internal.h | 2 +- drivers/virtual_media/VirtioRpmb.c | 2 +- drivers/virtual_media/virtual_media.c | 16 +++++++++++----- host/Android.mk | 3 ++- include/hardware/hw_broxton.h | 3 --- libefiwrapper/Android.mk | 1 + libefiwrapper/version.h | 4 ++-- 11 files changed, 35 insertions(+), 21 deletions(-) Change-Id: Id12492e8a264fe183d0839086023f88126cc9b6c Tracked-On: https://jira01.devtools.intel.com/browse/OAM-66686 Signed-off-by: Xihua Chen <[email protected]> Reviewed-on: https://android.intel.com:443/638592
2 parents c4d229f + b586b9a commit 029b3d5

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

drivers/abl/abl_reboot_target.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ static const struct name2id NAME2ID[] = {
8383
{ L"boot", 0x00 },
8484
{ L"bootloader", 0x01 },
8585
{ L"fastboot", 0x01 },
86+
{ L"recovery", 0x03 },
87+
{ L"dnx", 0x05 },
8688
};
8789

8890
static size_t offset; /* memorize offset between each call */

drivers/ioc_uart/ioc_uart.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ static char CBC_NUMBER_SUS_STAT_TOGGLES_2_HALT[] = {0x05,0x00,0x0E,0x02,0x00,0x0
6464
static char CBC_NUMBER_SUS_STAT_TOGGLES_1_HALT[] = {0x05,0x00,0x0E,0x02,0x00,0x03,0x00,0xE8};
6565
static char CBC_NUMBER_SUS_STAT_TOGGLES_2_REBOOT[] = {0x05,0x00,0x0E,0x02,0x00,0x06,0x00,0xE5};
6666
static char CBC_NUMBER_SUS_STAT_TOGGLES_1_REBOOT[] = {0x05,0x00,0x0E,0x02,0x00,0x04,0x00,0xE7};
67-
//static char CBC_CONFIG_RESTART_SYSTEM[] = {0x05,0x00,0x0E,0x02,0x00,0x02,0x00,0xE9};
68-
//static char CBC_CONFIG_SHUTDOWN_SYSTEM[] = {0x05,0x00,0x0E,0x02,0x00,0x01,0x00,0xEA};
67+
static char CBC_CONFIG_RESTART_SYSTEM[] = {0x05,0x00,0x0E,0x02,0x00,0x02,0x00,0xE9};
68+
static char CBC_CONFIG_SHUTDOWN_SYSTEM[] = {0x05,0x00,0x0E,0x02,0x00,0x01,0x00,0xEA};
6969
static char CBC_ENTER_IOC_BOOTLOADER[] = {0x05,0x00,0x20,0x01,0x30,0x10,0x80,0x1a,
7070
0x05,0x00,0x20,0x01,0x30,0x10,0x80,0x11,
7171
0x05,0x00,0x20,0x01,0x30,0x10,0x80,0x1a,
@@ -452,17 +452,21 @@ set_ignore_sus_stat_toggles_shutdown_behaviour(EFI_IGNORE_SUS_STAT_TOGGLES num_i
452452
init_uart_ioc(old_state);
453453
switch (shutdown) {
454454
case RESTART_SYSTEM:
455-
if(IGNORE_SUS_STAT_2==num_ignore_sus_stat)
455+
if(IGNORE_SUS_STAT_3 == num_ignore_sus_stat)
456456
cbc_message_buf = CBC_NUMBER_SUS_STAT_TOGGLES_2_REBOOT;
457-
else
457+
else if(IGNORE_SUS_STAT_2 == num_ignore_sus_stat)
458458
cbc_message_buf = CBC_NUMBER_SUS_STAT_TOGGLES_1_REBOOT;
459+
else
460+
cbc_message_buf = CBC_CONFIG_RESTART_SYSTEM;
459461
break;
460462
case SHUTDOWN_SYSTEM:
461463
default:
462-
if(IGNORE_SUS_STAT_2==num_ignore_sus_stat)
464+
if(IGNORE_SUS_STAT_3 == num_ignore_sus_stat)
463465
cbc_message_buf = CBC_NUMBER_SUS_STAT_TOGGLES_2_HALT;
464-
else
466+
else if(IGNORE_SUS_STAT_2 == num_ignore_sus_stat)
465467
cbc_message_buf = CBC_NUMBER_SUS_STAT_TOGGLES_1_HALT;
468+
else
469+
cbc_message_buf = CBC_CONFIG_SHUTDOWN_SYSTEM;
466470
break;
467471
}
468472

drivers/virtual_media/virtual_media.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,16 @@ static struct supported_device {
3737
{ .vid = 0x8086, .did = 0x8601},
3838
};
3939

40+
enum VIRTUAL_DEVICE {
41+
VirtualMedia,
42+
VirtualRpmb,
43+
VirtualDeviceMax
44+
};
45+
4046
static EFI_STATUS _init(storage_t *s)
4147
{
4248
EFI_STATUS ret;
43-
pcidev_t pci_dev[2] = {0};
49+
pcidev_t pci_dev[VirtualDeviceMax] = {0};
4450
size_t i;
4551
DEVICE_BLOCK_INFO BlockInfo ={0};
4652

@@ -49,15 +55,15 @@ static EFI_STATUS _init(storage_t *s)
4955
SUPPORTED_DEVICES[i].did,
5056
&pci_dev[i]);
5157

52-
if (!pci_dev[0])
58+
if (!pci_dev[VirtualMedia])
5359
return EFI_UNSUPPORTED;
5460

55-
ret = VirtioMediaInitialize((UINTN)pci_dev[0]);
61+
ret = VirtioMediaInitialize((UINTN)pci_dev[VirtualMedia]);
5662
if (ret)
5763
return EFI_DEVICE_ERROR;
5864

59-
if (pci_dev[1])
60-
ret = VirtioRpmbInitialize((UINTN)pci_dev[1]);
65+
if (pci_dev[VirtualRpmb])
66+
ret = VirtioRpmbInitialize((UINTN)pci_dev[VirtualRpmb]);
6167

6268
ret = VirtioGetMediaInfo(DEVICE_INDEX_DEFAULT, &BlockInfo);
6369
if (EFI_ERROR(ret)) {

0 commit comments

Comments
 (0)