summaryrefslogtreecommitdiff
path: root/ArmPkg/Universal
diff options
context:
space:
mode:
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-03 01:49:07 +0000
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-03 01:49:07 +0000
commit507ebc1a35a395e173a7871ec7de2aeda71d6ead (patch)
tree93bcb18ae472f22702585a4134a8d9470448f9f8 /ArmPkg/Universal
parent2ac288f9199196dfc4ab05bee0a7815ca361174a (diff)
Fixes to get CodeSourcery GCC and RVCT 3.1 compiling.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11298 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Universal')
-rw-r--r--ArmPkg/Universal/MmcDxe/MmcBlockIo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ArmPkg/Universal/MmcDxe/MmcBlockIo.c b/ArmPkg/Universal/MmcDxe/MmcBlockIo.c
index d8bd2d18b..16af1d466 100644
--- a/ArmPkg/Universal/MmcDxe/MmcBlockIo.c
+++ b/ArmPkg/Universal/MmcDxe/MmcBlockIo.c
@@ -34,24 +34,24 @@ MmcNotifyState (
}
VOID PrintOCR(UINT32 ocr) {
- float minv, maxv, volts;
- int loop;
+ UINTN minv, maxv, volts;
+ UINTN loop;
- minv = 3.6;
- maxv = 2.0;
- volts = 2.0;
+ minv = 36; // 3.6
+ maxv = 20; // 2.0
+ volts = 20; // 2.0
// The MMC register bits [23:8] indicate the working range of the card
for (loop = 8; loop < 24; loop++) {
if (ocr & (1 << loop)) {
if (minv > volts) minv = volts;
- if (maxv < volts) maxv = volts + 0.1;
+ if (maxv < volts) maxv = volts + 1;
}
- volts = volts + 0.1;
+ volts = volts + 1;
}
DEBUG((EFI_D_ERROR, "- PrintOCR ocr (0x%X)\n",ocr));
- //DEBUG((EFI_D_ERROR, "\t- Card operating voltage: %fV to %fV\n", minv, maxv));
+ DEBUG((EFI_D_ERROR, "\t- Card operating voltage: %d.%d to %d.%d\n", minv/10, minv % 10, maxv/10, maxv % 10));
if (((ocr >> 29) & 3) == 0)
DEBUG((EFI_D_ERROR, "\t- AccessMode: Byte Mode\n"));
else