aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2017-11-07 12:41:50 -0800
committerJohn Stultz <john.stultz@linaro.org>2017-11-07 12:41:50 -0800
commite6478d47bb7040fd687b2ae9c24db38e84bbf6ab (patch)
tree985caef151bea75ea37e8d36de4ca9df44af528d
parent3f9b4ad2a7fdfdceece6964ac07300c719c40c94 (diff)
parentcbf313400bbb5e82c00159ca2266a7cd18023d81 (diff)
downloaddevice_linaro_bootloader_OpenPlatformPkg-e6478d47bb7040fd687b2ae9c24db38e84bbf6ab.tar.gz
device_linaro_bootloader_OpenPlatformPkg-e6478d47bb7040fd687b2ae9c24db38e84bbf6ab.tar.bz2
device_linaro_bootloader_OpenPlatformPkg-e6478d47bb7040fd687b2ae9c24db38e84bbf6ab.zip
Merge commit 'cbf313400bbb5e82c00159ca2266a7cd18023d81' into bootloader-update
-rw-r--r--Drivers/SdMmc/DwMmcHcDxe/DwMmcHcDxe.c2
-rw-r--r--Drivers/SdMmc/DwMmcHcDxe/DwMmcHci.c6
-rw-r--r--Drivers/SdMmc/DwMmcHcDxe/SdDevice.c13
-rw-r--r--Drivers/Usb/DwUsb3Dxe/DwUsb3Dxe.c2
-rw-r--r--Platforms/Hisilicon/HiKey/HiKey.dsc2
-rw-r--r--Platforms/Hisilicon/HiKey960/Binary/lpm3.imgbin217344 -> 217344 bytes
-rw-r--r--Platforms/Hisilicon/HiKey960/HiKey960.dsc3
-rw-r--r--Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c3
-rw-r--r--Platforms/Hisilicon/HiKey960/Include/Hi3660.h5
9 files changed, 20 insertions, 16 deletions
diff --git a/Drivers/SdMmc/DwMmcHcDxe/DwMmcHcDxe.c b/Drivers/SdMmc/DwMmcHcDxe/DwMmcHcDxe.c
index 833304f..55e2fa4 100644
--- a/Drivers/SdMmc/DwMmcHcDxe/DwMmcHcDxe.c
+++ b/Drivers/SdMmc/DwMmcHcDxe/DwMmcHcDxe.c
@@ -374,6 +374,8 @@ DwMmcHcReset (
return Status;
}
+ Status = DwMmcHcSetBusWidth (PciIo, Slot, FALSE, 1);
+
return Status;
}
diff --git a/Drivers/SdMmc/DwMmcHcDxe/DwMmcHci.c b/Drivers/SdMmc/DwMmcHcDxe/DwMmcHci.c
index 2bd3adb..9ca044b 100644
--- a/Drivers/SdMmc/DwMmcHcDxe/DwMmcHci.c
+++ b/Drivers/SdMmc/DwMmcHcDxe/DwMmcHci.c
@@ -1710,13 +1710,11 @@ DwSdExecTrb (
case SdMmcResponseTypeR3:
Cmd |= BIT_CMD_RESPONSE_EXPECT;
break;
+ case SdMmcResponseTypeR1b:
case SdMmcResponseTypeR4:
case SdMmcResponseTypeR6:
- Cmd |= BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
- break;
- case SdMmcResponseTypeR1b:
case SdMmcResponseTypeR7:
- Cmd |= BIT_CMD_WAIT_PRVDATA_COMPLETE | BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
+ Cmd |= BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
break;
}
Cmd |= BIT_CMD_USE_HOLD_REG | BIT_CMD_START;
diff --git a/Drivers/SdMmc/DwMmcHcDxe/SdDevice.c b/Drivers/SdMmc/DwMmcHcDxe/SdDevice.c
index 20867ef..fdbe383 100644
--- a/Drivers/SdMmc/DwMmcHcDxe/SdDevice.c
+++ b/Drivers/SdMmc/DwMmcHcDxe/SdDevice.c
@@ -1020,15 +1020,15 @@ SdCardIdentification (
return Status;
}
- Status = SdCardSelect (PassThru, Slot, Rca);
+ Status = SdCardGetCsd (PassThru, Slot, Rca, &Csd);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "SdCardIdentification: Selecting card fails with %r\n", Status));
+ DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardGetCsd fails with %r\n", Status));
return Status;
}
- Status = SdCardSwitchBusWidth (PciIo, PassThru, Slot, Rca, FALSE, 1);
+ Status = SdCardSelect (PassThru, Slot, Rca);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardSwitchBusWidth fails with %r\n", Status));
+ DEBUG ((DEBUG_ERROR, "SdCardIdentification: Selecting card fails with %r\n", Status));
return Status;
}
@@ -1049,11 +1049,6 @@ SdCardIdentification (
return Status;
}
- Status = SdCardGetCsd (PassThru, Slot, Rca, &Csd);
- if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "SdCardIdentification: Executing SdCardGetCsd fails with %r\n", Status));
- return Status;
- }
Private->Slot[Slot].Initialized = TRUE;
return Status;
diff --git a/Drivers/Usb/DwUsb3Dxe/DwUsb3Dxe.c b/Drivers/Usb/DwUsb3Dxe/DwUsb3Dxe.c
index 7695112..5ed3dd4 100644
--- a/Drivers/Usb/DwUsb3Dxe/DwUsb3Dxe.c
+++ b/Drivers/Usb/DwUsb3Dxe/DwUsb3Dxe.c
@@ -43,7 +43,7 @@
#define USB_TYPE_LENGTH 16
#define USB_BLOCK_HIGH_SPEED_SIZE 512
-#define DATA_SIZE 512
+#define DATA_SIZE 131072
#define CMD_SIZE 512
#define MATCH_CMD_LITERAL(Cmd, Buf) !AsciiStrnCmp (Cmd, Buf, sizeof (Cmd) - 1)
diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc
index c8704c3..3a6b554 100644
--- a/Platforms/Hisilicon/HiKey/HiKey.dsc
+++ b/Platforms/Hisilicon/HiKey/HiKey.dsc
@@ -360,6 +360,8 @@
gEmbeddedTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00D023F70000000000)/eMMC(0x0)/Ctrl(0x0)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x20000)"
gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F70000000000)/SD(0x0)/HD(1,MBR,0x00000000,0x3F,0x21FC0)"
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|1
+
################################################################################
#
# Components Section - list of all EDK II Modules needed by this Platform
diff --git a/Platforms/Hisilicon/HiKey960/Binary/lpm3.img b/Platforms/Hisilicon/HiKey960/Binary/lpm3.img
index c35a193..bd0243b 100644
--- a/Platforms/Hisilicon/HiKey960/Binary/lpm3.img
+++ b/Platforms/Hisilicon/HiKey960/Binary/lpm3.img
Binary files differ
diff --git a/Platforms/Hisilicon/HiKey960/HiKey960.dsc b/Platforms/Hisilicon/HiKey960/HiKey960.dsc
index d91cdd3..ae979d5 100644
--- a/Platforms/Hisilicon/HiKey960/HiKey960.dsc
+++ b/Platforms/Hisilicon/HiKey960/HiKey960.dsc
@@ -371,8 +371,7 @@
gEmbeddedTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00003BFF0000000000)/UFS(0x0,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)"
gEmbeddedTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00F037FF0000000000)/SD(0x0)/HD(1,MBR,0x00000000,0x3F,0x21FC0)"
-[PcdsDynamicDefault.common]
- gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|10
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|1
################################################################################
#
diff --git a/Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c b/Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c
index d9d23c0..6e4db11 100644
--- a/Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c
+++ b/Platforms/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c
@@ -317,6 +317,9 @@ InitPeripherals (
IN VOID
)
{
+ // Enable FPLL0
+ MmioOr32 (SCTRL_SCFPLLCTRL0, SCTRL_SCFPLLCTRL0_FPLL0_EN);
+
InitSdCard ();
// Enable wifi clock
diff --git a/Platforms/Hisilicon/HiKey960/Include/Hi3660.h b/Platforms/Hisilicon/HiKey960/Include/Hi3660.h
index 8b20c06..939f7f0 100644
--- a/Platforms/Hisilicon/HiKey960/Include/Hi3660.h
+++ b/Platforms/Hisilicon/HiKey960/Include/Hi3660.h
@@ -25,6 +25,11 @@
#define PCTRL_CTRL3_USB_TXCO_EN (1 << 1)
#define PCTRL_CTRL24_USB3PHY_3MUX1_SEL (1 << 25)
+#define SCTRL_REG_BASE 0xFFF0A000
+
+#define SCTRL_SCFPLLCTRL0 (SCTRL_REG_BASE + 0x120)
+#define SCTRL_SCFPLLCTRL0_FPLL0_EN (1 << 0)
+
#define USB3OTG_BC_REG_BASE 0xFF200000
#define USB3OTG_CTRL0 (USB3OTG_BC_REG_BASE + 0x000)