diff mbox series

[Linaro-uefi,v2,9/9] Platforms/Hisilicon/HiKey: enable Android Fastboot

Message ID 1486649511-4149-10-git-send-email-haojian.zhuang@linaro.org
State New
Headers show
Series enable Android Fastboot App on Hikey | expand

Commit Message

Haojian Zhuang Feb. 9, 2017, 2:11 p.m. UTC
Enable HiKeyGpio, HiKeyUsb and Platform Boot Manager to
launch Android Fastboot App on HiKey platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
---
 Platforms/Hisilicon/HiKey/HiKey.dsc | 17 +++++++++++++++--
 Platforms/Hisilicon/HiKey/HiKey.fdf |  6 +++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

Comments

Leif Lindholm Feb. 10, 2017, 4:01 p.m. UTC | #1
On Thu, Feb 09, 2017 at 10:11:51PM +0800, Haojian Zhuang wrote:
> Enable HiKeyGpio, HiKeyUsb and Platform Boot Manager to
> launch Android Fastboot App on HiKey platform.
> 

I have no objections to this file, but I think it will change some
based on fooedback on other patches.

Regards,

Leif

> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
> ---
>  Platforms/Hisilicon/HiKey/HiKey.dsc | 17 +++++++++++++++--
>  Platforms/Hisilicon/HiKey/HiKey.fdf |  6 +++++-
>  2 files changed, 20 insertions(+), 3 deletions(-)
> 
> diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc
> index 492faaa..6fe1bd5 100644
> --- a/Platforms/Hisilicon/HiKey/HiKey.dsc
> +++ b/Platforms/Hisilicon/HiKey/HiKey.dsc
> @@ -62,7 +62,7 @@
>  
>    FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
>    UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
> -  PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> +  PlatformBootManagerLib|OpenPlatformPkg/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
>    CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>  
>    ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> @@ -162,7 +162,7 @@
>    ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
>  
>  [BuildOptions]
> -  GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/OpenPlatformPkg/Chips/Hisilicon/Hi6220/Include -I$(WORKSPACE)/OpenPlatformPkg/Platforms/Hisilicon/HiKey/Include
> +  GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/OpenPlatformPkg/Chips/Hisilicon/Hi6220/Include -I$(WORKSPACE)/OpenPlatformPkg/Platforms/Hisilicon/HiKey/Include -I$(WORKSPACE)/OpenPlatformPkg/Include
>  
>  [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
>    GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
> @@ -339,11 +339,19 @@
>    gDwEmmcDxeTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|100000000
>  
>    #
> +  # DW USB controller
> +  #
> +  gDwUsbDxeTokenSpaceGuid.PcdDwUsbDxeBaseAddress|0xF72C0000
> +
> +  #
>    #
>    # Fastboot
>    #
>    gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbVendorId|0x18d1
>    gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbProductId|0xd00d
> +  gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L"VenHw(b549f005-4bd4-4020-a0cb-06f42bda68c3)"
> +  # Flash limit 128M/time, for memory concern
> +  gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|"134217728"
>  
>  ################################################################################
>  #
> @@ -395,6 +403,7 @@
>    #
>    # GPIO
>    #
> +  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyGpioDxe/HiKeyGpioDxe.inf
>    ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf
>  
>    #
> @@ -416,6 +425,9 @@
>    #
>    # USB Peripheral Support
>    #
> +  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
> +  OpenPlatformPkg/Drivers/Usb/DwUsbDxe/DwUsbDxe.inf
> +  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
>    EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
>  
>    #
> @@ -451,6 +463,7 @@
>    MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
>    MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
>    MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
> +  FatPkg/EnhancedFatDxe/Fat.inf
>  
>    #
>    # Bds
> diff --git a/Platforms/Hisilicon/HiKey/HiKey.fdf b/Platforms/Hisilicon/HiKey/HiKey.fdf
> index 9c8c54a..693206f 100644
> --- a/Platforms/Hisilicon/HiKey/HiKey.fdf
> +++ b/Platforms/Hisilicon/HiKey/HiKey.fdf
> @@ -117,6 +117,7 @@ READ_LOCK_STATUS   = TRUE
>    #
>    # GPIO
>    #
> +  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyGpioDxe/HiKeyGpioDxe.inf
>    INF ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf
>  
>    #
> @@ -138,6 +139,9 @@ READ_LOCK_STATUS   = TRUE
>    #
>    # USB Peripheral Support
>    #
> +  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
> +  INF OpenPlatformPkg/Drivers/Usb/DwUsbDxe/DwUsbDxe.inf
> +  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
>    INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
>  
>    #
> @@ -168,7 +172,7 @@ READ_LOCK_STATUS   = TRUE
>    #
>    INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
>    INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
> -  INF FatBinPkg/EnhancedFatDxe/Fat.inf
> +  INF FatPkg/EnhancedFatDxe/Fat.inf
>    INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
>  
>    INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
> -- 
> 2.7.4
>
diff mbox series

Patch

diff --git a/Platforms/Hisilicon/HiKey/HiKey.dsc b/Platforms/Hisilicon/HiKey/HiKey.dsc
index 492faaa..6fe1bd5 100644
--- a/Platforms/Hisilicon/HiKey/HiKey.dsc
+++ b/Platforms/Hisilicon/HiKey/HiKey.dsc
@@ -62,7 +62,7 @@ 
 
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
-  PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+  PlatformBootManagerLib|OpenPlatformPkg/Platforms/Hisilicon/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
   CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
 
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
@@ -162,7 +162,7 @@ 
   ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
 
 [BuildOptions]
-  GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/OpenPlatformPkg/Chips/Hisilicon/Hi6220/Include -I$(WORKSPACE)/OpenPlatformPkg/Platforms/Hisilicon/HiKey/Include
+  GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/OpenPlatformPkg/Chips/Hisilicon/Hi6220/Include -I$(WORKSPACE)/OpenPlatformPkg/Platforms/Hisilicon/HiKey/Include -I$(WORKSPACE)/OpenPlatformPkg/Include
 
 [BuildOptions.common.EDKII.DXE_RUNTIME_DRIVER]
   GCC:*_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x10000
@@ -339,11 +339,19 @@ 
   gDwEmmcDxeTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|100000000
 
   #
+  # DW USB controller
+  #
+  gDwUsbDxeTokenSpaceGuid.PcdDwUsbDxeBaseAddress|0xF72C0000
+
+  #
   #
   # Fastboot
   #
   gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbVendorId|0x18d1
   gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbProductId|0xd00d
+  gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L"VenHw(b549f005-4bd4-4020-a0cb-06f42bda68c3)"
+  # Flash limit 128M/time, for memory concern
+  gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|"134217728"
 
 ################################################################################
 #
@@ -395,6 +403,7 @@ 
   #
   # GPIO
   #
+  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyGpioDxe/HiKeyGpioDxe.inf
   ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf
 
   #
@@ -416,6 +425,9 @@ 
   #
   # USB Peripheral Support
   #
+  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
+  OpenPlatformPkg/Drivers/Usb/DwUsbDxe/DwUsbDxe.inf
+  OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
   EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
 
   #
@@ -451,6 +463,7 @@ 
   MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
+  FatPkg/EnhancedFatDxe/Fat.inf
 
   #
   # Bds
diff --git a/Platforms/Hisilicon/HiKey/HiKey.fdf b/Platforms/Hisilicon/HiKey/HiKey.fdf
index 9c8c54a..693206f 100644
--- a/Platforms/Hisilicon/HiKey/HiKey.fdf
+++ b/Platforms/Hisilicon/HiKey/HiKey.fdf
@@ -117,6 +117,7 @@  READ_LOCK_STATUS   = TRUE
   #
   # GPIO
   #
+  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyGpioDxe/HiKeyGpioDxe.inf
   INF ArmPlatformPkg/Drivers/PL061GpioDxe/PL061GpioDxe.inf
 
   #
@@ -138,6 +139,9 @@  READ_LOCK_STATUS   = TRUE
   #
   # USB Peripheral Support
   #
+  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
+  INF OpenPlatformPkg/Drivers/Usb/DwUsbDxe/DwUsbDxe.inf
+  INF OpenPlatformPkg/Platforms/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
   INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
 
   #
@@ -168,7 +172,7 @@  READ_LOCK_STATUS   = TRUE
   #
   INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
   INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-  INF FatBinPkg/EnhancedFatDxe/Fat.inf
+  INF FatPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 
   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf