|
@@ -0,0 +1,60 @@
|
|
|
+/**
|
|
|
+*
|
|
|
+* Copyright (C) 2018, Marvell International Ltd. and its affiliates.
|
|
|
+*
|
|
|
+* This program and the accompanying materials are licensed and made available
|
|
|
+* under the terms and conditions of the BSD License which accompanies this
|
|
|
+* distribution. The full text of the license may be found at
|
|
|
+* http://opensource.org/licenses/bsd-license.php
|
|
|
+*
|
|
|
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
+*
|
|
|
+**/
|
|
|
+
|
|
|
+#include <Uefi.h>
|
|
|
+
|
|
|
+#include <Library/ArmadaBoardDescLib.h>
|
|
|
+#include <Library/BaseMemoryLib.h>
|
|
|
+#include <Library/DebugLib.h>
|
|
|
+#include <Library/IoLib.h>
|
|
|
+#include <Library/MemoryAllocationLib.h>
|
|
|
+#include <Library/UefiBootServicesTableLib.h>
|
|
|
+
|
|
|
+//
|
|
|
+// Order of devices in SdMmcDescTemplate has to be in par with ArmadaSoCDescLib
|
|
|
+//
|
|
|
+STATIC
|
|
|
+MV_BOARD_SDMMC_DESC mSdMmcDescTemplate[] = {
|
|
|
+ { /* eMMC 0xF06E0000 */
|
|
|
+ 0, /* SOC will be filled by MvBoardDescDxe */
|
|
|
+ 0, /* SdMmcDevCount will be filled by MvBoardDescDxe */
|
|
|
+ FALSE, /* Xenon1v8Enabled */
|
|
|
+ FALSE, /* Xenon8BitBusEnabled */
|
|
|
+ TRUE, /* XenonSlowModeEnabled */
|
|
|
+ 0x40, /* XenonTuningStepDivisor */
|
|
|
+ EmbeddedSlot /* SlotType */
|
|
|
+ },
|
|
|
+ { /* SD/MMC 0xF2780000 */
|
|
|
+ 0, /* SOC will be filled by MvBoardDescDxe */
|
|
|
+ 0, /* SdMmcDevCount will be filled by MvBoardDescDxe */
|
|
|
+ FALSE, /* Xenon1v8Enabled */
|
|
|
+ FALSE, /* Xenon8BitBusEnabled */
|
|
|
+ FALSE, /* XenonSlowModeEnabled */
|
|
|
+ 0x19, /* XenonTuningStepDivisor */
|
|
|
+ EmbeddedSlot /* SlotType */
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+EFI_STATUS
|
|
|
+EFIAPI
|
|
|
+ArmadaBoardDescSdMmcGet (
|
|
|
+ OUT UINTN *SdMmcDevCount,
|
|
|
+ OUT MV_BOARD_SDMMC_DESC **SdMmcDesc
|
|
|
+ )
|
|
|
+{
|
|
|
+ *SdMmcDesc = mSdMmcDescTemplate;
|
|
|
+ *SdMmcDevCount = ARRAY_SIZE (mSdMmcDescTemplate);
|
|
|
+
|
|
|
+ return EFI_SUCCESS;
|
|
|
+}
|