Difference between revisions of "Unit MMC"
Line 1,599: | Line 1,599: | ||
| <code>MMC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | | <code>MMC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | ||
| No MMC messages | | No MMC messages | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD specific constants''' <code> SD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_DEFAULT_BLOCKSIZE = 512;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_DEFAULT_BLOCKSHIFT = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD bus width constants''' <code> SD_BUS_WIDTH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_BUS_WIDTH_1 = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_BUS_WIDTH_4 = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD bus speed (Hz) constants''' <code> SD_BUS_SPEED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_DEFAULT = 25000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_HS = 50000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_UHS_SDR12 = 25000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_UHS_SDR25 = 50000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_UHS_DDR50 = 50000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_UHS_SDR50 = 100000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_BUS_SPEED_UHS_SDR104 = 208000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD command constants''' <code> SD_CMD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|From: /include/linux/mmc/sd.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 0'' | ||
+ | |- | ||
+ | | <code>SD_CMD_SEND_RELATIVE_ADDR = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_SEND_IF_COND = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_SWITCH_VOLTAGE = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 10'' | ||
+ | |- | ||
+ | | <code>SD_CMD_SWITCH = 6;</code> | ||
+ | | See: 4.3.10 Switch Function Command | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 5'' | ||
+ | |- | ||
+ | | <code>SD_CMD_ERASE_WR_BLK_START = 32;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_ERASE_WR_BLK_END = 33;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Application commands'' | ||
+ | |- | ||
+ | | <code>SD_CMD_APP_SET_BUS_WIDTH = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_APP_SD_STATUS = 13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_APP_SEND_NUM_WR_BLKS = 22;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_APP_SEND_OP_COND = 41;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_CMD_APP_SEND_SCR = 51;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|SD_CMD_SWITCH argument format: | ||
+ | |- | ||
+ | | <code>[31] Check (0) or switch (1)</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[30:24] Reserved (0)</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[23:20] Function group 6</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[19:16] Function group 5</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[15:12] Function group 4</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[11:8] Function group 3</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[7:4] Function group 2</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[3:0] Function group 1</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch mode value constants''' <code> SD_SWITCH_MODE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_MODE_CHECK = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_SWITCH_MODE_SWITCH = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch function group constants''' <code> SD_SWITCH_FUNCTION_GROUP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_FUNCTION_GROUP_ACCESS = 0;</code> | ||
+ | | Access Mode | ||
+ | |- | ||
+ | | <code>SD_SWITCH_FUNCTION_GROUP_COMMAND = 1;</code> | ||
+ | | Command System | ||
+ | |- | ||
+ | | <code>SD_SWITCH_FUNCTION_GROUP_DRIVER = 2;</code> | ||
+ | | Driver Strength | ||
+ | |- | ||
+ | | <code>SD_SWITCH_FUNCTION_GROUP_POWER = 3;</code> | ||
+ | | Power Limit | ||
+ | |- | ||
+ | |||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch access mode constants''' <code> SD_SWITCH_ACCESS_MODE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_ACCESS_MODE_DEF = 0;</code> | ||
+ | | Default SDR12 | ||
+ | |- | ||
+ | | <code>SD_SWITCH_ACCESS_MODE_HS = 1;</code> | ||
+ | | High Speed SDR25 | ||
+ | |- | ||
+ | | <code>SD_SWITCH_ACCESS_MODE_SDR50 = 2;</code> | ||
+ | | SDR50 (1.8V only) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_ACCESS_MODE_SDR104 = 3;</code> | ||
+ | | SDR104 (1.8V only) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_ACCESS_MODE_DDR50 = 4;</code> | ||
+ | | DDR50 (1.8V only) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch command system constants''' <code> SD_SWITCH_COMMAND_SYSTEM_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_COMMAND_SYSTEM_DEF = 0;</code> | ||
+ | | Default | ||
+ | |- | ||
+ | | <code>SD_SWITCH_COMMAND_SYSTEM_EC = 1;</code> | ||
+ | | For eC | ||
+ | |- | ||
+ | | <code>SD_SWITCH_COMMAND_SYSTEM_OTP = 3;</code> | ||
+ | | OTP | ||
+ | |- | ||
+ | | <code>SD_SWITCH_COMMAND_SYSTEM_ASSD = 4;</code> | ||
+ | | ASSD | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch driver strength constants''' <code> SD_SWITCH_DRIVER_STRENGTH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_DRIVER_STRENGTH_DEF = 0;</code> | ||
+ | | Default Type B | ||
+ | |- | ||
+ | | <code>SD_SWITCH_DRIVER_STRENGTH_TYPE_A = 1;</code> | ||
+ | | Type A | ||
+ | |- | ||
+ | | <code>SD_SWITCH_DRIVER_STRENGTH_TYPE_C = 2;</code> | ||
+ | | Type C | ||
+ | |- | ||
+ | | <code>SD_SWITCH_DRIVER_STRENGTH_TYPE_D = 3;</code> | ||
+ | | Type D | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch power limit constants''' <code> SD_SWITCH_POWER_LIMIT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_DEF = 0;</code> | ||
+ | | Default 0.72W | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_144 = 1;</code> | ||
+ | | 1.44W | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_216 = 2;</code> | ||
+ | | 2.16W (Embedded only) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_216 = 2;</code> | ||
+ | | 2.16W (Embedded only) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_288 = 3;</code> | ||
+ | | 2.88W (Embedded only) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_POWER_LIMIT_180 = 4;</code> | ||
+ | | 1.80W | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD send interface condition value constants''' <code> SD_SEND_IF_COND_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SEND_IF_COND_CHECK_PATTERN = $AA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SEND_IF_COND_VOLTAGE_MASK = $00FF8000;</code> | ||
+ | | MMC_VDD_27_28, MMC_VDD_28_29, MMC_VDD_29_30, MMC_VDD_30_31, MMC_VDD_31_32, MMC_VDD_32_33, MMC_VDD_33_34, MMC_VDD_34_35, MMC_VDD_35_36 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|SD_CMD_SEND_IF_COND argument format: | ||
+ | |- | ||
+ | | <code>[31:12] Reserved (0)</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[11:8] Host Voltage Supply Flags</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[7:0] Check Pattern (0xAA)</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD send operation condition value constants''' <code> SD_SEND_OP_COND_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SEND_OP_COND_VOLTAGE_MASK = $00FF8000;</code> | ||
+ | | MMC_VDD_27_28, MMC_VDD_28_29, MMC_VDD_29_30, MMC_VDD_30_31, MMC_VDD_31_32, MMC_VDD_32_33, MMC_VDD_33_34, MMC_VDD_34_35, MMC_VDD_35_36 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD operation condition register value constants''' <code> SD_OCR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.1 of SD Physical Layer Simplified Specification V4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SD_OCR_CCS = $40000000;</code> | ||
+ | | Card Capacity Status - 0 = SDSC / 1 = SDHC or SDXC | ||
+ | |- | ||
+ | | <code>SD_OCR_CCS = $40000000;</code> | ||
+ | | Card Capacity Status - 0 = SDSC / 1 = SDHC or SDXC | ||
+ | |- | ||
+ | | <code>SD_OCR_UHS_II = $20000000;</code> | ||
+ | | UHS-II Card Status - 0 = Non UHS-II Card / 1 = UHS-II Card | ||
+ | |- | ||
+ | | <code>SD_OCR_XPC = $10000000;</code> | ||
+ | | SDXC Power Control | ||
+ | |- | ||
+ | | <code>SD_OCR_S18A = $01000000;</code> | ||
+ | | 1.8V Switching Accepted | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD CSD structure value constants''' <code> SD_CSD_STRUCT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_CSD_STRUCT_VER_1_0 = 0;</code> | ||
+ | | Standard Capacity | ||
+ | |- | ||
+ | | <code>SD_CSD_STRUCT_VER_2_0 = 1;</code> | ||
+ | | High Capacity and Extended Capacity | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SD status register (SSR) value constants''' <code> SD_SSR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD SSR Fields'' | ||
+ | |- | ||
+ | | <code>SD_SSR_DAT_BUS_WIDTH = 1;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_SSR_SECURED_MODE = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_SD_CARD_TYPE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_SIZE_OF_PROTECTED_AREA = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_PERFORMANCE_MOVE = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_AU_SIZE = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_ERASE_SIZE = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_ERASE_TIMEOUT = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_ERASE_OFFSET = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_UHS_SPEED_GRADE = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SSR_UHS_AU_SIZE = 12;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR bus width value constants''' <code> SD_SSR_BUS_WIDTH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SSR_BUS_WIDTH_1 = 0;</code> | ||
+ | | 1 (default) | ||
+ | |- | ||
+ | | <code>SD_SSR_BUS_WIDTH_4 = 2;</code> | ||
+ | | 4 bit width | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR card type value constants''' <code> SD_SSR_CARD_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SSR_CARD_TYPE_RW = $0000;</code> | ||
+ | | Regular SD RD/WR Card | ||
+ | |- | ||
+ | | <code>SD_SSR_CARD_TYPE_ROM = $0001;</code> | ||
+ | | SD ROM Card | ||
+ | |- | ||
+ | | <code>SD_SSR_CARD_TYPE_OTP = $0002;</code> | ||
+ | | OTP | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR speed class value constants''' <code> SD_SSR_SPEED_CLASS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS_0 = $00;</code> | ||
+ | | Class 0 | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS_2 = $01;</code> | ||
+ | | Class 2 | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS_4 = $02;</code> | ||
+ | | Class 4 | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS_6 = $03;</code> | ||
+ | | Class 6 | ||
+ | |- | ||
+ | | <code>SD_SSR_SPEED_CLASS_10 = $04;</code> | ||
+ | | Class 10 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR AU size value constants''' <code> SD_SSR_AU_SIZE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<code>SD_SSR_AU_SIZE_VALUES:array[0..15] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Defined | ||
+ | |- | ||
+ | | <code>$00004000,</code> | ||
+ | | 16 KB | ||
+ | |- | ||
+ | | <code>$00008000,</code> | ||
+ | | 32 KB | ||
+ | |- | ||
+ | | <code>$00010000,</code> | ||
+ | | 64 KB | ||
+ | |- | ||
+ | | <code>$00020000,</code> | ||
+ | | 128 KB | ||
+ | |- | ||
+ | | <code>$00040000,</code> | ||
+ | | 256 KB | ||
+ | |- | ||
+ | | <code>$00080000,</code> | ||
+ | | 512 KB | ||
+ | |- | ||
+ | | <code>$00100000,</code> | ||
+ | | 1 MB | ||
+ | |- | ||
+ | | <code>$00200000,</code> | ||
+ | | 2 MB | ||
+ | |- | ||
+ | | <code>$00400000,</code> | ||
+ | | 4 MB | ||
+ | |- | ||
+ | | <code>$00800000,</code> | ||
+ | | 8 MB | ||
+ | |- | ||
+ | | <code>$00800000 + $00400000,</code> | ||
+ | | 12 MB | ||
+ | |- | ||
+ | | <code>$01000000,</code> | ||
+ | | 16 MB | ||
+ | |- | ||
+ | | <code>$01000000 + $00800000,</code> | ||
+ | | 24 MB | ||
+ | |- | ||
+ | | <code>$02000000,</code> | ||
+ | | 32 MB | ||
+ | |- | ||
+ | | <code>$04000000);</code> | ||
+ | | 64 MB | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR UHS speed grade value constants''' <code> SD_SSR_UHS_SPEED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SSR_UHS_SPEED_GRADE_0 = 0;</code> | ||
+ | | Less than 10MB/sec | ||
+ | |- | ||
+ | | <code>SD_SSR_UHS_SPEED_GRADE_1 = 1;</code> | ||
+ | | 10MB/sec and above | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SSR UHS AU size value constants''' <code> SD_SSR_UHS_AU_SIZE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<code>SD_SSR_UHS_AU_SIZE_VALUES:array[0..15] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Defined | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | Not Used | ||
+ | |- | ||
+ | | <code>$00100000,</code> | ||
+ | | 1 MB | ||
+ | |- | ||
+ | | <code>$00200000,</code> | ||
+ | | 2 MB | ||
+ | |- | ||
+ | | <code>$00400000,</code> | ||
+ | | 4 MB | ||
+ | |- | ||
+ | | <code>$00800000,</code> | ||
+ | | 8 MB | ||
+ | |- | ||
+ | | <code>$00800000 + $00400000,</code> | ||
+ | | 12 MB | ||
+ | |- | ||
+ | | <code>$01000000,</code> | ||
+ | | 16 MB | ||
+ | |- | ||
+ | | <code>$01000000 + $00800000,</code> | ||
+ | | 24 MB | ||
+ | |- | ||
+ | | <code>$02000000,</code> | ||
+ | | 32 MB | ||
+ | |- | ||
+ | | <code>$04000000);</code> | ||
+ | | 64 MB | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD switch status value constants''' <code> SD_SWITCH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD Switch Fields'' | ||
+ | |- | ||
+ | | <code>SD_SWITCH_MAXIMUM_CURRENT = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP6_SUPPORT = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP5_SUPPORT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP4_SUPPORT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_SUPPORT = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP2_SUPPORT = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SUPPORT = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP6_SELECTION = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP5_SELECTION = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP4_SELECTION = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_SELECTION = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP2_SELECTION = 12;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SELECTION = 13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_STRUCT_VERSION = 14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP6_BUSY_STATUS = 15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP5_BUSY_STATUS = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP4_BUSY_STATUS = 17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_BUSY_STATUS = 18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP2_BUSY_STATUS = 19;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_BUSY_STATUS = 20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD Switch Access Mode (Bus Speed) Support (Group 1)'' | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SDR12 = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_HS = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SDR25 = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SDR50 = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_SDR104 = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP1_DDR50 = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD Switch Driver Strength Support (Group 3)'' | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_TYPE_B = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_TYPE_A = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_TYPE_C = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SWITCH_GROUP3_TYPE_D = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD Switch Structure Versions'' | ||
+ | |- | ||
+ | | <code>SD_SWITCH_STRUCT_VER_0 = 0;</code> | ||
+ | | Bits 511:376 are defined (SD_SWITCH_MAXIMUM_CURRENT to SD_SWITCH_GROUP1_SELECTION) | ||
+ | |- | ||
+ | | <code>SD_SWITCH_STRUCT_VER_1 = 1;</code> | ||
+ | | Bits 511:272 are defined (SD_SWITCH_MAXIMUM_CURRENT to SD_SWITCH_GROUP1_BUSY_STATUS | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SD configuration register (SCR) value constants''' <code> SD_SCR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SD SCR Fields'' | ||
+ | |- | ||
+ | | <code>SD_SCR_STRUCTURE = 1;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SD_SCR_SD_SPEC = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_DATA_STAT_AFTER_ERASE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_SD_SECURITY = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_SD_BUS_WIDTHS = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_SD_SPEC3 = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_EX_SECURITY = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_SD_SPEC4 = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_SCR_CMD_SUPPORT = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR structure value constants''' <code> SD_SCR_STRUCT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_STRUCT_VER_1_0 = 0;</code> | ||
+ | | Valid for system specification 1.01 - 4.0 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR Spec version value constants''' <code> SD_SCR_SPEC_VER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_SPEC_VER_0 = 0;</code> | ||
+ | | Implements system specification 1.0 - 1.01 | ||
+ | |- | ||
+ | | <code>SD_SCR_SPEC_VER_1 = 1;</code> | ||
+ | | Implements system specification 1.10 | ||
+ | |- | ||
+ | | <code>SD_SCR_SPEC_VER_2 = 2;</code> | ||
+ | | Implements system specification 2.00-4.0X | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR security value constants''' <code> SD_SCR_SECURITY_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_SECURITY_VER_0 = 0;</code> | ||
+ | | No Security | ||
+ | |- | ||
+ | | <code>SD_SCR_SECURITY_VER_2 = 2;</code> | ||
+ | | SDSC Card (Security Version 1.01) | ||
+ | |- | ||
+ | | <code>SD_SCR_SECURITY_VER_3 = 3;</code> | ||
+ | | SDHC Card (Security Version 2.00) | ||
+ | |- | ||
+ | | <code>SD_SCR_SECURITY_VER_4 = 4;</code> | ||
+ | | SDXC Card (Security Version 3.xx) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR bus width value constants''' <code> SD_SCR_BUS_WIDTH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_BUS_WIDTH_1 = (1 shl 0);</code> | ||
+ | | 1 bit (DAT0) | ||
+ | |- | ||
+ | | <code>SD_SCR_BUS_WIDTH_4 = (1 shl 2); {4 bit (DAT0-3)}</code> | ||
+ | | 4 bit (DAT0-3) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR extended security value constants''' <code> SD_SCR_EX_SECURITY_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_EX_SECURITY_VER_0 = 0;</code> | ||
+ | | Extended Security is not supported | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SD SCR command support value constants''' <code> SD_SCR_*_SUPPORT </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SD_SCR_CMD20_SUPPORT = (1 shl 0);</code> | ||
+ | | Mandatory for SDXC card | ||
+ | |- | ||
+ | | <code>SD_SCR_CMD23_SUPPORT = (1 shl 1);</code> | ||
+ | | Mandatory for UHS104 card | ||
+ | |- | ||
+ | | <code>SD_SCR_CMD48_49_SUPPORT = (1 shl 2);</code> | ||
+ | | Optional | ||
+ | |- | ||
+ | | <code>SD_SCR_CMD58_59_SUPPORT = (1 shl 3);</code> | ||
+ | | Optional (If CMD58/59 is supported, CMD48/49 shall be supported) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO command constants''' <code> SDIO_CMD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|From: /include/linux/mmc/sdio.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_CMD_SEND_OP_COND = 5;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_CMD_RW_DIRECT = 52;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CMD_RW_EXTENDED = 53;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|SDIO_CMD_RW_DIRECT argument format: | ||
+ | |- | ||
+ | | <code>[31] R/W flag</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[30:28] Function number</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[27] RAW flag</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[25:9] Register address</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[7:0] Data</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|SDIO_CMD_RW_EXTENDED argument format: | ||
+ | |- | ||
+ | | <code>[31] R/W flag</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[30:28] Function number</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[27] Block mode</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[26] Increment address</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[25:9] Register address</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>[8:0] Byte/block count</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO response value constants''' <code> SDIO_RSP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|From: /include/linux/mmc/sdio.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''R4'' | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R4_18V_PRESENT = (1 shl 24);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R4_MEMORY_PRESENT = (1 shl 27);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''R5'' | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R5_COM_CRC_ERROR = (1 shl 15);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R5_ILLEGAL_COMMAND = (1 shl 14);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R5_ERROR = (1 shl 11);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R5_FUNCTION_NUMBER = (1 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_RSP_R5_OUT_OF_RANGE = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO card common control registers (CCCR) constants''' <code> SDIO_CCCR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CCCR = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_SD = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_IOEx = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_IORx = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_IENx = $04;</code> | ||
+ | | Function/Master Interrupt Enable | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_INTx = $05;</code> | ||
+ | | Function Interrupt Pending | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_ABORT = $06;</code> | ||
+ | | function abort/card reset | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_IF = $07;</code> | ||
+ | | bus interface controls | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAPS = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CIS = $09;</code> | ||
+ | | common CIS pointer (3 bytes) | ||
+ | |- | ||
+ | |colspan="2"|''Following 4 regs are valid only if SBS is set'' | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_SUSPEND = $0c;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_SELx = $0d;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_EXECx = $0e;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_READYx = $0f;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_BLKSIZE = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_POWER = $12;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_SPEED = $13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_UHS = $14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_DRIVE_STRENGTH = $15;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO revision constants''' <code> SDIO_*_REV_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''SDIO CCCR Register values'' | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_REV_1_00 = 0;</code> | ||
+ | | CCCR/FBR Version 1.00 | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_REV_1_10 = 1;</code> | ||
+ | | CCCR/FBR Version 1.10 | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_REV_1_20 = 2;</code> | ||
+ | | CCCR/FBR Version 1.20 | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_REV_3_00 = 3;</code> | ||
+ | | CCCR/FBR Version 3.00 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_SDIO_REV_1_00 = 0;</code> | ||
+ | | SDIO Spec Version 1.00 | ||
+ | |- | ||
+ | | <code>SDIO_SDIO_REV_1_10 = 1;</code> | ||
+ | | SDIO Spec Version 1.10 | ||
+ | |- | ||
+ | | <code>SDIO_SDIO_REV_1_20 = 2;</code> | ||
+ | | SDIO Spec Version 1.20 | ||
+ | |- | ||
+ | | <code>SDIO_SDIO_REV_2_00 = 3;</code> | ||
+ | | SDIO Spec Version 2.00 | ||
+ | |- | ||
+ | | <code>SDIO_SDIO_REV_3_00 = 4;</code> | ||
+ | | SDIO Spec Version 3.00 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|SDIO CCCR SD Register values | ||
+ | |- | ||
+ | | <code>SDIO_SD_REV_1_01 = 0;</code> | ||
+ | | SD Physical Spec Version 1.01 | ||
+ | |- | ||
+ | | <code>SDIO_SD_REV_1_10 = 1;</code> | ||
+ | | SD Physical Spec Version 1.10 | ||
+ | |- | ||
+ | | <code>SDIO_SD_REV_2_00 = 2;</code> | ||
+ | | SD Physical Spec Version 2.00 | ||
+ | |- | ||
+ | | <code>SDIO_SD_REV_3_00 = 3;</code> | ||
+ | | SD Physical Spev Version 3.00 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO bus width constants''' <code> SDIO_BUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''SDIO CCCR IF Register values'' | ||
+ | |- | ||
+ | | <code>SDIO_BUS_WIDTH_MASK = $03;</code> | ||
+ | | data bus width setting | ||
+ | |- | ||
+ | | <code>SDIO_BUS_WIDTH_1BIT = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_BUS_WIDTH_RESERVED = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_BUS_WIDTH_4BIT = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_BUS_ECSI = $20;</code> | ||
+ | | Enable continuous SPI interrupt | ||
+ | |- | ||
+ | | <code>SDIO_BUS_SCSI = $40;</code> | ||
+ | | Support continuous SPI interrupt | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_BUS_ASYNC_INT = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_BUS_CD_DISABLE = $80;</code> | ||
+ | | disable pull-up on DAT3 (pin 1) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO CCCR caps register value constants''' <code> SDIO_CCCR_CAP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_SDC = $01;</code> | ||
+ | | can do CMD52 while data transfer | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_SMB = $02;</code> | ||
+ | | can do multi-block xfers (CMD53) | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_SRW = $04;</code> | ||
+ | | supports read-wait protocol | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_SBS = $08;</code> | ||
+ | | supports suspend/resume | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_S4MI = $10;</code> | ||
+ | | interrupt during 4-bit CMD53 | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_E4MI = $20;</code> | ||
+ | | enable ints during 4-bit CMD53 | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_LSC = $40;</code> | ||
+ | | low speed card | ||
+ | |- | ||
+ | | <code>SDIO_CCCR_CAP_4BLS = $80;</code> | ||
+ | | 4 bit low speed card | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO CCCR power register value constants ''' <code> SDIO_POWER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_POWER_SMPC = $01;</code> | ||
+ | | Supports Master Power Control | ||
+ | |- | ||
+ | | <code>SDIO_POWER_EMPC = $02;</code> | ||
+ | | Enable Master Power Control | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO CCCR speed register value constants''' <code> SDIO_SPEED_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_SHS = $01;</code> | ||
+ | | Supports High-Speed mode | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_BSS_SHIFT = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_BSS_MASK = (7 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_SDR12 = (0 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_SDR25 = (1 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_SDR50 = (2 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_SDR104 = (3 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_DDR50 = (4 shl SDIO_SPEED_BSS_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_SPEED_EHS = SDIO_SPEED_SDR25;</code> | ||
+ | | Enable High-Speed | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO CCCR UHS register value constants''' <code> SDIO_UHS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_UHS_SDR50 = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_UHS_SDR104 = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_UHS_DDR50 = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO CCCR drive strength register value constants''' <code> SDIO_DRIVE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_SDTx_MASK = $07;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_DRIVE_SDTA = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DRIVE_SDTC = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DRIVE_SDTD = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DRIVE_DTSx_MASK = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DRIVE_DTSx_SHIFT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DTSx_SET_TYPE_B = (0 shl SDIO_DRIVE_DTSx_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DTSx_SET_TYPE_A = (1 shl SDIO_DRIVE_DTSx_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DTSx_SET_TYPE_C = (2 shl SDIO_DRIVE_DTSx_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DTSx_SET_TYPE_D = (3 shl SDIO_DRIVE_DTSx_SHIFT);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDIO function basic register (FBR) constants''' <code> SDIO_FBR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_FBR_BASE(f) ((f) * $100)</code> | ||
+ | | base of function f's FBRs | ||
+ | |- | ||
+ | | <code>SDIO_FBR_STD_IF = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_FBR_STD_IF_EXT = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_FBR_POWER = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_FBR_CIS = $09;</code> | ||
+ | | CIS pointer (3 bytes) | ||
+ | |- | ||
+ | | <code>SDIO_FBR_CSA = $0C;</code> | ||
+ | | CSA pointer (3 bytes) | ||
+ | |- | ||
+ | | <code>SDIO_FBR_BLKSIZE = $10;</code> | ||
+ | | block size (2 bytes) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SDIO FBR IF Register values'' | ||
+ | |- | ||
+ | | <code>SDIO_FBR_SUPPORTS_CSA = $40;</code> | ||
+ | | supports Code Storage Area | ||
+ | |- | ||
+ | | <code>SDIO_FBR_ENABLE_CSA = $80;</code> | ||
+ | | enable Code Storage Area | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SDIO FBR POWER Register values'' | ||
+ | |- | ||
+ | | <code>SDIO_FBR_POWER_SPS = $01;</code> | ||
+ | | Supports Power Selection | ||
+ | |- | ||
+ | | <code>SDIO_FBR_POWER_EPS = $02;</code> | ||
+ | | Enable (low) Power Selection | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI specific constants''' <code> SDHCI_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_NAME_PREFIX = 'SDHCI';</code> | ||
+ | | Name prefix for SDHCI Devices | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host type constants''' <code> SDHCI_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_MAX = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SDHCI Type Names'' | ||
+ | |- | ||
+ | |colspan="2"|<code>SDHCI_TYPE_NAMES:array[SDHCI_TYPE_NONE..SDHCI_TYPE_MAX] of String = (</code> | ||
+ | |- | ||
+ | | <code>'SDHCI_TYPE_NONE');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host state constants''' <code> SDHCI_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_STATE_DISABLED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_STATE_ENABLED = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_STATE_MAX = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SDHCI State Names'' | ||
+ | |- | ||
+ | |colspan="2"|<code>SDHCI_STATE_NAMES:array[SDHCI_STATE_DISABLED..SDHCI_STATE_MAX] of String = (</code> | ||
+ | |- | ||
+ | | <code>'SDHCI_STATE_DISABLED',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDHCI_STATE_ENABLED');</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host flag constants''' <code> SDHCI_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_NONE = $00000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_SDMA = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_ADMA = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_SPI = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_CRC_ENABLE = $00000008;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI controller register constants''' <code> SDHCI_DMA_*, SDHCI_BLOCK_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_DMA_ADDRESS = $00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_BLOCK_SIZE = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_BLOCK_COUNT = $06;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ARGUMENT = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TRANSFER_MODE = $0C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_COMMAND = $0E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_RESPONSE = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_BUFFER = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESENT_STATE = $24;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_HOST_CONTROL = $28;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_POWER_CONTROL = $29;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_BLOCK_GAP_CONTROL = $2A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_WAKE_UP_CONTROL = $2B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_CONTROL = $2C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TIMEOUT_CONTROL = $2E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SOFTWARE_RESET = $2F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_STATUS = $30;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ENABLE = $34;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SIGNAL_ENABLE = $38;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ACMD12_ERR = $3C;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''3E-3F reserved'' | ||
+ | |- | ||
+ | | <code>SDHCI_CAPABILITIES = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAPABILITIES_1 = $44;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CURRENT = $48;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''4C-4F reserved for more max current'' | ||
+ | |- | ||
+ | | <code>SDHCI_SET_ACMD12_ERROR = $50;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SET_INT_ERROR = $52;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA_ERROR = $54;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''55-57 reserved'' | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA_ADDRESS = $58;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''60-FB reserved'' | ||
+ | |- | ||
+ | | <code>SDHCI_SLOT_INT_STATUS = $FC;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_HOST_VERSION = $FE;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI transfer mode constants''' <code> SDHCI_TRNS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_DMA = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_BLK_CNT_EN = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_AUTO_CMD12 = $04;</code> | ||
+ | | SDHCI_TRNS_ACMD12 | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_AUTO_CMD23 = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_READ = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TRNS_MULTI = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI command value constants''' <code> SDHCI_CMD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_RESP_MASK = $03;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_CRC = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_INDEX = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_DATA = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_ABORTCMD = $C0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI command response value constants''' <code> SDHCI_CMD_RESP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_RESP_NONE = $00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_RESP_LONG = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_RESP_SHORT = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_RESP_SHORT_BUSY = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI present state value constants''' <code> SDHCI_DATA_*, SDHCI_CARD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_INHIBIT = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DATA_INHIBIT = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DOING_WRITE = $00000100;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DOING_READ = $00000200;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPACE_AVAILABLE = $00000400;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DATA_AVAILABLE = $00000800;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CARD_PRESENT = $00010000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CARD_STATE_STABLE = $00020000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CARD_DETECT_PIN_LEVEL = $00040000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_WRITE_PROTECT = $00080000;</code> | ||
+ | | Set if Write Enabled / Clear if Write Protected | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host control value constants''' <code> SDHCI_CTRL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_LED = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_4BITBUS = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_HISPD = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DMA_MASK = $18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_SDMA = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_ADMA1 = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_ADMA32 = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_ADMA64 = $18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_8BITBUS = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_CD_TEST_INS = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_CD_TEST = $80;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI power control value constants''' <code> SDHCI_POWER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_POWER_ON = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_POWER_180 = $0A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_POWER_300 = $0C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_POWER_330 = $0E;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI wakeup control value constants''' <code> SDHCI_WAKE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_WAKE_ON_INT = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_WAKE_ON_INSERT = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_WAKE_ON_REMOVE = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI clock control value constants''' <code> SDHCI_CLOCK_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_DIVIDER_SHIFT = 8;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_DIVIDER_HI_SHIFT = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DIV_MASK = $FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DIV_MASK_LEN = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DIV_HI_MASK = $0300;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_CARD_EN = $0004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_INT_STABLE = $0002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_INT_EN = $0001;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI software reset value constants''' <code> SDHCI_RESET_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_RESET_ALL = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_RESET_CMD = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_RESET_DATA = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI interrupt value constants''' <code> SDHCI_INT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_INT_RESPONSE = $00000001;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_END = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_BLK_GAP = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DMA_END = $00000008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_SPACE_AVAIL = $00000010;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_AVAIL = $00000020;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_CARD_INSERT = $00000040;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_CARD_REMOVE = $00000080;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_CARD_INT = $00000100;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ERROR = $00008000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_TIMEOUT = $00010000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_CRC = $00020000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_END_BIT = $00040000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_INDEX = $00080000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_TIMEOUT = $00100000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_CRC = $00200000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_END_BIT = $00400000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_BUS_POWER = $00800000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ACMD12ERR = $01000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ADMA_ERROR = $02000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_INT_NORMAL_MASK = $00007FFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ERROR_MASK = $FFFF8000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|<code>SDHCI_INT_CMD_MASK = (SDHCI_INT_RESPONSE or SDHCI_INT_TIMEOUT or SDHCI_INT_CRC or SDHCI_INT_END_BIT or SDHCI_INT_INDEX);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_DATA_MASK = (SDHCI_INT_DATA_END or SDHCI_INT_DMA_END or SDHCI_INT_DATA_AVAIL or SDHCI_INT_SPACE_AVAIL or SDHCI_INT_DATA_TIMEOUT or SDHCI_INT_DATA_CRC or SDHCI_INT_DATA_END_BIT or SDHCI_INT_ADMA_ERROR or SDHCI_INT_BLK_GAP);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_ALL_MASK = (LongWord(-1));</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI capabilities value constants''' <code> SDHCI_*_MASK*, SDHCI_*SHIFT </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_TIMEOUT_CLK_MASK = $0000003F;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_TIMEOUT_CLK_SHIFT = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_TIMEOUT_CLK_UNIT = $00000080;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_BASE_MASK = $00003F00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_V3_BASE_MASK = $0000FF00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_BASE_SHIFT = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_BASE_MULTIPLIER = 1000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_BLOCK_MASK = $00030000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_BLOCK_SHIFT = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_8BIT = $00040000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_ADMA2 = $00080000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_ADMA1 = $00100000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_HISPD = $00200000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_SDMA = $00400000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_VDD_330 = $01000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_VDD_300 = $02000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_VDD_180 = $04000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_64BIT = $10000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>NAME_</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>NAME_</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>NAME_</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>NAME_</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host version value constants''' <code> SDHCI_*_VER_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_VENDOR_VER_MASK = $FF00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_VENDOR_VER_SHIFT = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_VER_MASK = $00FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_VER_SHIFT = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_100 = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_200 = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_300 = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI clock divider constants''' <code> SDHCI_MAX_CLOCK_DIV_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CLOCK_DIV_SPEC_200 = 256;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CLOCK_DIV_SPEC_300 = 2046;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI quirks/bug constants''' <code> SDHCI_QUIRK* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|From: U-Boot sdhci.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>*SDHCI_QUIRK_32BIT_DMA_ADDR = (1 shl 0);</code> | ||
+ | | See: SDHCI_QUIRK_32BIT_DMA_ADDR below | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_REG32_RW = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_R1B = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_HISPD_BIT = (1 shl 3);</code> | ||
+ | | See: SDHCI_QUIRK_NO_HISPD_BIT below | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_VOLTAGE = (1 shl 4);</code> | ||
+ | | Use SDHCI_QUIRK_MISSING_CAPS instead | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_CD = (1 shl 5);</code> | ||
+ | | See: SDHCI_QUIRK_BROKEN_CARD_DETECTION below | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_WAIT_SEND_CMD = (1 shl 6);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER = (1 shl 7);</code> | ||
+ | | See: SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER below | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_USE_WIDE8 = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_MISSING_CAPS = (1 shl 9);</code> | ||
+ | | See: SDHCI_QUIRK_MISSING_CAPS below* | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|From Linux /include/linux/mmc/sdhci.h | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_CLOCK_BEFORE_RESET = (1 shl 0);</code> | ||
+ | | Controller doesn't honor resets unless we touch the clock register | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_FORCE_DMA = (1 shl 1);</code> | ||
+ | | Controller has bad caps bits, but really supports DMA | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_CARD_NO_RESET = (1 shl 2);</code> | ||
+ | | Controller doesn't like to be reset when there is no card inserted | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_SINGLE_POWER_WRITE = (1 shl 3);</code> | ||
+ | | Controller doesn't like clearing the power reg before a change | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS = (1 shl 4);/code> | ||
+ | | Controller has flaky internal state so reset it on each ios change} | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_DMA = (1 shl 5);</code> | ||
+ | | Controller has an unusable DMA engine | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_ADMA = (1 shl 6);</code> | ||
+ | | Controller has an unusable ADMA engine | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_32BIT_DMA_ADDR = (1 shl 7);</code> | ||
+ | | Controller can only DMA from 32-bit aligned addresses | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_32BIT_DMA_SIZE = (1 shl 8);</code> | ||
+ | | Controller can only DMA chunk sizes that are a multiple of 32 bits | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_32BIT_ADMA_SIZE = (1 shl 9);</code> | ||
+ | | Controller can only ADMA chunks that are a multiple of 32 bits | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_RESET_AFTER_REQUEST = (1 shl 10);</code> | ||
+ | | Controller needs to be reset after each request to stay stable | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER = (1 shl 11);</code> | ||
+ | | Controller needs voltage and power writes to happen separately | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_TIMEOUT_VAL = (1 shl 12);</code> | ||
+ | | Controller provides an incorrect timeout value for transfers | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_SMALL_PIO = (1 shl 13);</code> | ||
+ | | Controller has an issue with buffer bits for small transfers | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_BUSY_IRQ = (1 shl 14);</code> | ||
+ | | Controller does not provide transfer-complete interrupt when not busy | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_CARD_DETECTION = (1 shl 15);</code> | ||
+ | | Controller has unreliable card detection | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_INVERTED_WRITE_PROTECT = (1 shl 16);</code> | ||
+ | | Controller reports inverted write-protect state | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_PIO_NEEDS_DELAY = (1 shl 18);</code> | ||
+ | | Controller does not like fast PIO transfers | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_FORCE_BLK_SZ_2048 = (1 shl 20);</code> | ||
+ | | Controller has to be forced to use block size of 2048 bytes | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_MULTIBLOCK = (1 shl 21);</code> | ||
+ | | Controller cannot do multi-block transfers | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_FORCE_1_BIT_DATA = (1 shl 22);</code> | ||
+ | | Controller can only handle 1-bit data transfers | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_DELAY_AFTER_POWER = (1 shl 23);</code> | ||
+ | | Controller needs 10ms delay between applying power and clock | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK = (1 shl 24);</code> | ||
+ | | Controller uses SDCLK instead of TMCLK for data timeouts | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN = (1 shl 25);</code> | ||
+ | | Controller reports wrong base clock capability | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC = (1 shl 26);</code> | ||
+ | | Controller cannot support End Attribute in NOP ADMA descriptor | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_MISSING_CAPS = (1 shl 27);</code> | ||
+ | | Controller is missing device caps. Use caps provided by host | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 = (1 shl 28);</code> | ||
+ | | Controller uses Auto CMD12 command to stop the transfer | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_NO_HISPD_BIT = (1 shl 29);</code> | ||
+ | | Controller doesn't have HISPD bit field in HI-SPEED SD card | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC = (1 shl 30);</code> | ||
+ | | Controller treats ADMA descriptors with length 0000h incorrectly | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK_UNSTABLE_RO_DETECT = (1 shl 31);</code> | ||
+ | | The read-only detection via SDHCI_PRESENT_STATE register is unstable | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''SDHCI More Quirks/Bugs'' | ||
+ | |- | ||
+ | |colspan="2"|From Linux /include/linux/mmc/sdhci.h | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_HOST_OFF_CARD_ON = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_HOST_NO_CMD23 = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_NO_1_8_V = (1 shl 2);</code> | ||
+ | | The system physically doesn't support 1.8v, even if the host does | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_PRESET_VALUE_BROKEN = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_BROKEN_HOST_CONTROL = (1 shl 5);</code> | ||
+ | | Controller has a non-standard host control register | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_BROKEN_HS200 = (1 shl 6);</code> | ||
+ | | Controller does not support HS200 | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_BROKEN_DDR50 = (1 shl 7);</code> | ||
+ | | Controller does not support DDR50 | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_STOP_WITH_TC = (1 shl 8);</code> | ||
+ | | Stop command(CMD12) can set Transfer Complete when not using MMC_RSP_BUSY | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Additions from U-Boot'' | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_REG32_RW = (1 shl 28);</code> | ||
+ | | Controller requires all register reads and writes as 32bit | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_BROKEN_R1B = (1 shl 29);</code> | ||
+ | | Response type R1B is broken | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_WAIT_SEND_CMD = (1 shl 30);</code> | ||
+ | | Controller requires a delay between each command write | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_USE_WIDE8 = (1 shl 31);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI host SDMA buffer boundary constants''' <code> SDHCI_DEFAULT_BOUNDARY_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Valid values from 4K to 512K in powers of 2 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_DEFAULT_BOUNDARY_SIZE = (512 * 1024);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_DEFAULT_BOUNDARY_ARG = (7);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''SDHCI timeout value constants''' <code> SDHCI_TIMEOUT_VALUE* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_TIMEOUT_VALUE = $0E;</code> | ||
+ | | style="width: 50%;"| | ||
|- | |- | ||
|} | |} |
Revision as of 02:27, 3 January 2017
Return to Unit Reference
Contents
[hide]Description
Ultibo MMC/SD interface unit
This unit implements the standards based part of the SD/MMC specification including the standard SDHCI interfaces.
For each platform a SDHCI module needs to be provided that implements the platform specific parts of the SDHCI interface.
This is similar in model to USB and other interfaces in Ultibo, where the generic interface unit requires a platform specific module to register with it in order to communicate with platform specific devices.
The SD/MMC interfaces are 2 tier (ie Host and Device) whereas the USB interface is 3 tier (Host, Device and Driver).
Constants
MMC_*
MMC_TYPE_*
MMC_STATE_*
MMC_FLAG_*
MMC_STATUS_*
SD_VERSION_*, MMC_VERSION_*
MMC_MODE_*
MMC_DATA_*
MMC_BUS_WIDTH_*
MMC_BUS_SPEED_*
MMC_CMD_*
MMC_RSP_*
MMC_RSP_R1_*, MMC_RSP_R2_*
MMC_OCR_*
MMC_CARD_STATUS_*
MMC_CURRENT_STATE_*
MMC_CID_*
MMC_CSD_*
MMC_CSD_STRUCT_*
MMC_CSD_SPEC_VER_*
MMC_CSD_TAAC_UNITS*
MMC_CSD_TAAC_VALUES*
MMC_CCC_*
MMC_CSD_TRAN_SPEED_UNITS*
MMC_CSD_TRAN_SPEED_VALUES*
MMC_VDD_*
MMC_SWITCH_MODE_*
EXT_CSD_*
EXT_CSD_*
MMCPART_*, MMC_MAX_*
MMC_LOG_*
SD_*
SD_BUS_WIDTH_*
SD_BUS_SPEED_*
SD_CMD_*
SD_SWITCH_MODE_*
SD_SWITCH_FUNCTION_GROUP_*
SD_SWITCH_ACCESS_MODE_*
SD_SWITCH_COMMAND_SYSTEM_*
SD_SWITCH_DRIVER_STRENGTH_*
SD_SWITCH_POWER_LIMIT_*
SD_SEND_IF_COND_*
SD_SEND_OP_COND_*
SD_OCR_*
SD_CSD_STRUCT_*
SD_SSR_*
SD_SSR_BUS_WIDTH_*
SD_SSR_CARD_TYPE_*
SD_SSR_SPEED_CLASS_*
SD_SSR_AU_SIZE_*
SD_SSR_UHS_SPEED_*
SD_SSR_UHS_AU_SIZE_*
SD_SWITCH_*
SD_SCR_*
SD_SCR_STRUCT_*
SD_SCR_SPEC_VER_*
SD_SCR_SECURITY_*
SD_SCR_BUS_WIDTH_*
SD_SCR_EX_SECURITY_*
SD_SCR_*_SUPPORT
SDIO_CMD_*
SDIO_RSP_*
SDIO_CCCR_*
SDIO_*_REV_*
SDIO_BUS_*
SDIO_CCCR_CAP_*
SDIO_POWER_*
SDIO_SPEED_*
SDIO_UHS_*
SDIO_DRIVE_*
SDIO_FBR_*
SDHCI_*
SDHCI_TYPE_*
SDHCI_STATE_*
SDHCI_FLAG_*
SDHCI_DMA_*, SDHCI_BLOCK_*
SDHCI_TRNS_*
SDHCI_CMD_*
SDHCI_CMD_RESP_*
SDHCI_DATA_*, SDHCI_CARD_*
SDHCI_CTRL_*
SDHCI_POWER_*
SDHCI_WAKE_*
SDHCI_CLOCK_*
SDHCI_RESET_*
SDHCI_INT_*
SDHCI_*_MASK*, SDHCI_*SHIFT
SDHCI_*_VER_*
SDHCI_MAX_CLOCK_DIV_*
SDHCI_QUIRK*
SDHCI_DEFAULT_BOUNDARY_*
SDHCI_TIMEOUT_VALUE*
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
MMC functions
function MMCDeviceReadBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
function MMCDeviceWriteBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
function MMCDeviceEraseBlocks(MMC:PMMCDevice; const Start,Count:Int64):LongWord;
function MMCDeviceSetClock(MMC:PMMCDevice; Clock:LongWord):LongWord;
function MMCDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
function MMCDeviceSetBlockLength(MMC:PMMCDevice; Length:LongWord):LongWord;
function MMCDeviceSetBlockCount(MMC:PMMCDevice; Count:LongWord; Relative:Boolean):LongWord;
function MMCDeviceSetDriverStage(MMC:PMMCDevice; DriverStage:LongWord):LongWord;
function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte):LongWord;
function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
function MMCDeviceSendCardIdentification(MMC:PMMCDevice):LongWord;
function MMCDeviceSendAllCardIdentification(MMC:PMMCDevice):LongWord;
function MMCDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
function MMCDeviceGetExtendedCardSpecific(MMC:PMMCDevice):LongWord;
function MMCDeviceSendExtendedCardSpecific(MMC:PMMCDevice):LongWord;
function MMCDeviceDecodeExtendedCardSpecific(MMC:PMMCDevice):LongWord;
function MMCDeviceSetRelativeAddress(MMC:PMMCDevice):LongWord;
function MMCDeviceSPISetCRC(MMC:PMMCDevice; Enable:Boolean):LongWord;
function MMCDeviceSPIReadOperationCondition(MMC:PMMCDevice; HighCapacity:Boolean):LongWord;
function MMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
function MMCDeviceDestroy(MMC:PMMCDevice):LongWord;
function MMCDeviceRegister(MMC:PMMCDevice):LongWord;
function MMCDeviceDeregister(MMC:PMMCDevice):LongWord;
function MMCDeviceFindByName(const Name:String):PMMCDevice; inline;
function MMCDeviceFindByDescription(const Description:String):PMMCDevice; inline;
function MMCDeviceEnumerate(Callback:TMMCEnumerate; Data:Pointer):LongWord;
function MMCDeviceNotification(MMC:PMMCDevice; Callback:TMMCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
SD functions
function SDDeviceSwitch(MMC:PMMCDevice; Mode,Group:Integer; Value:Byte; Buffer:Pointer):LongWord;
function SDDeviceSetBusSpeed(MMC:PMMCDevice; Speed:LongWord):LongWord;
function SDDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
function SDDeviceSendInterfaceCondition(MMC:PMMCDevice):LongWord;
function SDDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
function SDDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
function SDDeviceGetCardIdentification(MMC:PMMCDevice):LongWord;
function SDDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
function SDDeviceSendSDConfiguration(MMC:PMMCDevice):LongWord;
function SDDeviceDecodeSDConfiguration(MMC:PMMCDevice):LongWord;
function SDDeviceSendRelativeAddress(MMC:PMMCDevice):LongWord;
function SDDeviceSendApplicationCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
SDIO functions
function SDIODeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
function SDIODeviceReadWriteDirect(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Input:Byte; Output:PByte):LongWord;
function SDIODeviceReadWriteExtended(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Increment:Boolean; Buffer:Pointer; BlockCount,BlockSize:LongWord):LongWord;
SDHCI functions
function SDHCIHostReset(SDHCI:PSDHCIHost; Mask:Byte):LongWord;
function SDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;
function SDHCIHostSetClock(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;
function SDHCIHostFinishCommand(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostFinishData(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostCommandInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord; var ReturnMask:LongWord):LongWord;
function SDHCIHostDataInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord):LongWord;
function SDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte; inline;
function SDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word; inline;
function SDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord; inline;
procedure SDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte); inline;
procedure SDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word); inline;
procedure SDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord); inline;
function SDHCIHostSetClockDivider(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;
function SDHCIHostSetControlRegister(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostCreateEx(Size:LongWord):PSDHCIHost;
function SDHCIHostDestroy(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostRegister(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostDeregister(SDHCI:PSDHCIHost):LongWord;
function SDHCIHostEnumerate(Callback:TSDHCIEnumerate; Data:Pointer):LongWord;
function SDHCIHostNotification(SDHCI:PSDHCIHost; Callback:TSDHCINotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
MMC helper functions
function MMCDeviceCheck(MMC:PMMCDevice):PMMCDevice;
function MMCGetCIDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
function MMCGetCSDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
function MMCGetExtendedCSDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
function MMCExtractBits(Buffer:Pointer; Start,Size:LongWord):LongWord;
function MMCExtractBitsEx(Buffer:Pointer; Length,Start,Size:LongWord):LongWord;
function MMCStatusToString(Status:LongWord):String;
procedure MMCLog(Level:LongWord; MMC:PMMCDevice; const AText:String);
SD helper functions
function SDGetMaxClock(MMC:PMMCDevice):LongWord;
function SDGetCIDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
function SDGetCSDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
function SDGetSCRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
function SDGetSSRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
function SDGetSwitchValue(MMC:PMMCDevice; Value:LongWord):LongWord;
SDHCI helper functions
function SDHCIHostCheck(SDHCI:PSDHCIHost):PSDHCIHost;
function SDHCIDeviceStateToString(SDHCIState:LongWord):String;
MMC storage functions
function MMCStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
function MMCStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
function MMCStorageDeviceErase(Storage:PStorageDevice; const Start,Count:Int64):LongWord;
function MMCStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
Return to Unit Reference