X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Omap35xxPkg%2FMMCHSDxe%2FMMCHS.h;h=8fa1ba1b677a2c9559d07bc25a32cb64c5ab9e7b;hp=9baac74931f66e7638721b296aca2fc9b98427bd;hb=2b649f74775d0efd1e75c91f77c3045ae6249cb4;hpb=a3f98646f68239bf9c577b24689bc69cbcde1b47 diff --git a/Omap35xxPkg/MMCHSDxe/MMCHS.h b/Omap35xxPkg/MMCHSDxe/MMCHS.h old mode 100755 new mode 100644 index 9baac74931..8fa1ba1b67 --- a/Omap35xxPkg/MMCHSDxe/MMCHS.h +++ b/Omap35xxPkg/MMCHSDxe/MMCHS.h @@ -1,8 +1,8 @@ /** @file - Copyright (c) 2008-2009 Apple Inc. All rights reserved.
+ Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- All rights reserved. This program and the accompanying materials + 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 @@ -21,19 +21,19 @@ #include #include #include +#include #include #include -#include #include #include #include -#define MAX_RETRY_COUNT 100 +#define MAX_RETRY_COUNT (100*5) -#define HCS (0x1UL << 30) //Host capacity support/1 = Supporting high capacity -#define CCS (0x1UL << 30) //Card capacity status/1 = High capacity card +#define HCS BIT30 //Host capacity support/1 = Supporting high capacity +#define CCS BIT30 //Card capacity status/1 = High capacity card typedef struct { UINT32 Reserved0: 7; // 0 UINT32 V170_V195: 1; // 1.70V - 1.95V @@ -59,18 +59,21 @@ typedef struct { typedef struct { UINT8 NOT_USED: 1; // Not used, always 1 [0:0] UINT8 CRC: 7; // CRC [7:1] + UINT8 RESERVED_1: 2; // Reserved [9:8] UINT8 FILE_FORMAT: 2; // File format [11:10] UINT8 TMP_WRITE_PROTECT: 1; // Temporary write protection [12:12] UINT8 PERM_WRITE_PROTECT: 1; // Permanent write protection [13:13] UINT8 COPY: 1; // Copy flag (OTP) [14:14] UINT8 FILE_FORMAT_GRP: 1; // File format group [15:15] + UINT16 RESERVED_2: 5; // Reserved [20:16] UINT16 WRITE_BL_PARTIAL: 1; // Partial blocks for write allowed [21:21] UINT16 WRITE_BL_LEN: 4; // Max. write data block length [25:22] UINT16 R2W_FACTOR: 3; // Write speed factor [28:26] UINT16 RESERVED_3: 2; // Reserved [30:29] UINT16 WP_GRP_ENABLE: 1; // Write protect group enable [31:31] + UINT32 WP_GRP_SIZE: 7; // Write protect group size [38:32] UINT32 SECTOR_SIZE: 7; // Erase sector size [45:39] UINT32 ERASE_BLK_EN: 1; // Erase single block enable [46:46] @@ -79,8 +82,9 @@ typedef struct { UINT32 VDD_W_CURR_MIN: 3; // Max. write current @ VDD min [55:53] UINT32 VDD_R_CURR_MAX: 3; // Max. read current @ VDD max [58:56] UINT32 VDD_R_CURR_MIN: 3; // Max. read current @ VDD min [61:59] - UINT32 C_SIZELow2: 2; // Device size [73:62] - UINT32 C_SIZEHigh10: 10;// Device size [73:62] + UINT32 C_SIZELow2: 2; // Device size [63:62] + + UINT32 C_SIZEHigh10: 10;// Device size [73:64] UINT32 RESERVED_4: 2; // Reserved [75:74] UINT32 DSR_IMP: 1; // DSR implemented [76:76] UINT32 READ_BLK_MISALIGN: 1; // Read block misalignment [77:77] @@ -88,9 +92,11 @@ typedef struct { UINT32 READ_BL_PARTIAL: 1; // Partial blocks for read allowed [79:79] UINT32 READ_BL_LEN: 4; // Max. read data block length [83:80] UINT32 CCC: 12;// Card command classes [95:84] + UINT8 TRAN_SPEED ; // Max. bus clock frequency [103:96] UINT8 NSAC ; // Data read access-time 2 in CLK cycles (NSAC*100) [111:104] UINT8 TAAC ; // Data read access-time 1 [119:112] + UINT8 RESERVED_5: 6; // Reserved [125:120] UINT8 CSD_STRUCTURE: 2; // CSD structure [127:126] }CSD; @@ -143,8 +149,7 @@ typedef enum { WRITE } OPERATION_TYPE; -typedef struct -{ +typedef struct { UINT16 RCA; UINTN BlockSize; UINTN NumBlocks; @@ -155,4 +160,11 @@ typedef struct CSD CSDData; } CARD_INFO; +EFI_STATUS +DetectCard ( + VOID + ); + +extern EFI_BLOCK_IO_PROTOCOL gBlockIo; + #endif