diff options
author | Olivier Martin <olivier.martin@arm.com> | 2015-05-06 11:15:44 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2015-05-06 11:15:44 +0000 |
commit | eff98cf9daf7353274f958bea570f0da419a09a5 (patch) | |
tree | 2c6bcb4b52c4e7ce56e0fcb39dd7ca27c9738410 /EmbeddedPkg/Universal | |
parent | 2ff41466ef6b5cf05d6c9e2ce7cd0d4ec77a47db (diff) | |
download | edk2-eff98cf9daf7353274f958bea570f0da419a09a5.tar.gz edk2-eff98cf9daf7353274f958bea570f0da419a09a5.tar.bz2 edk2-eff98cf9daf7353274f958bea570f0da419a09a5.zip |
EmbeddedPkg: Remove dependency on TimerLib
UEFI drivers should not depend on TimerLib. They should
use BS.Stall() instead.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17343 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Universal')
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/Mmc.h | 3 | ||||
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c | 5 | ||||
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf | 3 | ||||
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 8 |
4 files changed, 8 insertions, 11 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h index 301561a282..46a156cecf 100644 --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h @@ -1,7 +1,7 @@ /** @file
Main Header file for the MMC DXE driver
- Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+ Copyright (c) 2011-2015, ARM Limited. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -25,6 +25,7 @@ #include <Library/UefiLib.h>
#include <Library/DebugLib.h>
+#include <Library/UefiBootServicesTableLib.h>
#define MMC_TRACE(txt) DEBUG((EFI_D_BLKIO, "MMC: " txt "\n"))
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c index 04c82613d5..0e1ef57263 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2015, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -13,7 +13,6 @@ **/
#include <Library/BaseMemoryLib.h>
-#include <Library/TimerLib.h>
#include "Mmc.h"
@@ -268,7 +267,7 @@ MmcIoBlocks ( break; // Prevents delay once finished
}
}
- NanoSecondDelay (100);
+ gBS->Stall (1);
}
Status = MmcNotifyState (MmcHostInstance, MmcTransferState);
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf b/EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf index f9a2b9c703..a07288c754 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf +++ b/EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf @@ -1,7 +1,7 @@ #/** @file
# Build file for the MMC DXE driver
#
-# Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2015, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -39,7 +39,6 @@ UefiLib
UefiDriverEntryPoint
BaseMemoryLib
- TimerLib
[Protocols]
gEfiDiskIoProtocolGuid
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c index 08cc405ed8..2d8038ffe0 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2015, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -12,8 +12,6 @@ *
**/
-#include <Library/TimerLib.h>
-
#include "Mmc.h"
typedef union {
@@ -322,7 +320,7 @@ MmcIdentificationMode ( if (!EFI_ERROR (Status)) {
if (!MmcHostInstance->CardInfo.OCRData.PowerUp) {
- MicroSecondDelay (1);
+ gBS->Stall (1);
Timeout--;
} else {
if ((MmcHostInstance->CardInfo.CardType == SD_CARD_2) && (MmcHostInstance->CardInfo.OCRData.AccessMode & BIT1)) {
@@ -332,7 +330,7 @@ MmcIdentificationMode ( break; // The MMC/SD card is ready. Continue the Identification Mode
}
} else {
- MicroSecondDelay (1);
+ gBS->Stall (1);
Timeout--;
}
}
|