12 "100kbit/s",
"1Mbit/s",
"10Mbit/s",
"100MBit/s",
13 "Unknown",
"Unknown",
"Unknown",
"Unknown"
16 "1.0",
"1.2",
"1.3",
"1.5",
"2.0",
"2.5",
"3.0",
"3.5",
"4.0",
"4.5",
"5.0",
17 "Unknown",
"Unknown",
"Unknown",
"Unknown"
25 DEBUG ((DEBUG_ERROR,
"- PrintCID\n"));
26 DEBUG ((DEBUG_ERROR,
"\t- Manufacturing date: %d/%d\n", (Cid[0] >> 8) & 0xF, (Cid[0] >> 12) & 0xFF));
27 DEBUG ((DEBUG_ERROR,
"\t- Product serial number: 0x%X%X\n", Cid[1] & 0xFFFFFF, (Cid[0] >> 24) & 0xFF));
28 DEBUG ((DEBUG_ERROR,
"\t- Product revision: %d\n", Cid[1] >> 24));
30 DEBUG ((DEBUG_ERROR,
"\t- OEM ID: %c%c\n", (Cid[3] >> 8) & 0xFF, (Cid[3] >> 16) & 0xFF));
40 if (((Csd[2] >> 30) & 0x3) == 0) {
41 DEBUG ((DEBUG_ERROR,
"- PrintCSD Version 1.01-1.10/Version 2.00/Standard Capacity\n"));
42 }
else if (((Csd[2] >> 30) & 0x3) == 1) {
43 DEBUG ((DEBUG_ERROR,
"- PrintCSD Version 2.00/High Capacity\n"));
45 DEBUG ((DEBUG_ERROR,
"- PrintCSD Version Higher than v3.3\n"));
48 DEBUG ((DEBUG_ERROR,
"\t- Supported card command class: 0x%X\n", MMC_CSD_GET_CCC (Csd)));
49 DEBUG ((DEBUG_ERROR,
"\t- Speed: %a %a\n", mStrValue[(MMC_CSD_GET_TRANSPEED (Csd) >> 3) & 0xF], mStrUnit[MMC_CSD_GET_TRANSPEED (Csd) & 7]));
50 DEBUG ((DEBUG_ERROR,
"\t- Maximum Read Data Block: %d\n", 2 << (MMC_CSD_GET_READBLLEN (Csd)-1)));
51 DEBUG ((DEBUG_ERROR,
"\t- Maximum Write Data Block: %d\n", 2 << (MMC_CSD_GET_WRITEBLLEN (Csd)-1)));
53 if (!MMC_CSD_GET_FILEFORMATGRP (Csd)) {
54 Value = MMC_CSD_GET_FILEFORMAT (Csd);
56 DEBUG ((DEBUG_ERROR,
"\t- Format (0): Hard disk-like file system with partition table\n"));
57 }
else if (Value == 1) {
58 DEBUG ((DEBUG_ERROR,
"\t- Format (1): DOS FAT (floppy-like) with boot sector only (no partition table)\n"));
59 }
else if (Value == 2) {
60 DEBUG ((DEBUG_ERROR,
"\t- Format (2): Universal File Format\n"));
62 DEBUG ((DEBUG_ERROR,
"\t- Format (3): Others/Unknown\n"));
65 DEBUG ((DEBUG_ERROR,
"\t- Format: Reserved\n"));
74 DEBUG ((DEBUG_ERROR,
"- PrintRCA: 0x%X\n", Rca));
75 DEBUG ((DEBUG_ERROR,
"\t- Status: 0x%X\n", Rca & 0xFFFF));
76 DEBUG ((DEBUG_ERROR,
"\t- RCA: 0x%X\n", (Rca >> 16) & 0xFFFF));
94 for (Loop = 8; Loop < 24; Loop++) {
95 if (Ocr & (1 << Loop)) {
108 DEBUG ((DEBUG_ERROR,
"- PrintOCR Ocr (0x%X)\n", Ocr));
109 DEBUG ((DEBUG_ERROR,
"\t- Card operating voltage: %d.%d to %d.%d\n", MinV/10, MinV % 10, MaxV/10, MaxV % 10));
110 if (((Ocr >> 29) & 3) == 0) {
111 DEBUG ((DEBUG_ERROR,
"\t- AccessMode: Byte Mode\n"));
113 DEBUG ((DEBUG_ERROR,
"\t- AccessMode: Block Mode (0x%X)\n", ((Ocr >> 29) & 3)));
116 if (Ocr & MMC_OCR_POWERUP) {
117 DEBUG ((DEBUG_ERROR,
"\t- PowerUp\n"));
119 DEBUG ((DEBUG_ERROR,
"\t- Voltage Not Supported\n"));
128 DEBUG ((DEBUG_INFO,
"Response: 0x%X\n", Response));
129 if (Response & MMC_R0_READY_FOR_DATA) {
130 DEBUG ((DEBUG_INFO,
"\t- READY_FOR_DATA\n"));
133 switch ((Response >> 9) & 0xF) {
135 DEBUG ((DEBUG_INFO,
"\t- State: Idle\n"));
138 DEBUG ((DEBUG_INFO,
"\t- State: Ready\n"));
141 DEBUG ((DEBUG_INFO,
"\t- State: Ident\n"));
144 DEBUG ((DEBUG_INFO,
"\t- State: StandBy\n"));
147 DEBUG ((DEBUG_INFO,
"\t- State: Tran\n"));
150 DEBUG ((DEBUG_INFO,
"\t- State: Data\n"));
153 DEBUG ((DEBUG_INFO,
"\t- State: Rcv\n"));
156 DEBUG ((DEBUG_INFO,
"\t- State: Prg\n"));
159 DEBUG ((DEBUG_INFO,
"\t- State: Dis\n"));
162 DEBUG ((DEBUG_INFO,
"\t- State: Reserved\n"));
#define DEBUG(Expression)