Difference between revisions of "Unit MMC"
(117 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === Description === | ||
---- | ---- | ||
+ | |||
+ | '''Ultibo MMC/SD/SDIO Interface unit''' | ||
This unit implements the standards based part of the SD/MMC specification including the standard SDHCI interfaces. | 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. | For each platform a SDHCI module needs to be provided that implements the platform specific parts of the SDHCI interface. | ||
+ | |||
+ | A fully standards compliant SDHCI host controller needs only a procedure to register it with the SD/MMC core and it can operate using the standard functions provided in this unit, any deviations from the standard will require custom functions to be provided to override the standard functionality. | ||
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. | 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). | + | The SD/MMC interfaces are normally 2 tier (ie Host and Device) whereas the USB interface is 3 tier (Host, Device and Driver) however SDIO support adds a driver model to encapsulate support for device functions which can provide a variety of functionality including WiFi, Bluetooth, Ethernet and others. |
=== Constants === | === Constants === | ||
---- | ---- | ||
− | '' | + | |
+ | <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;">'''MMC specific constants''' <code> MMC_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_NAME_PREFIX = 'MMC';</code> | ||
+ | | Name prefix for MMC Devices | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_DEVICE_DESCRIPTION = 'MMC/SD Device';</code> | ||
+ | | Description of MMC/SD device | ||
+ | |- | ||
+ | | <code>MMC_STORAGE_DESCRIPTION = 'MMC/SD Storage Device';</code> | ||
+ | | Description of MMC/SD storage device | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_STATUS_TIMER_INTERVAL = 1000;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_DEFAULT_BLOCKSIZE = 512;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_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;">'''MMC device type''' <code> MMC_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_TYPE_NONE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_TYPE_MMC = 1;</code> | ||
+ | | An MMC specification card | ||
+ | |- | ||
+ | | <code>MMC_TYPE_SD = 2;</code> | ||
+ | | An SD specification card | ||
+ | |- | ||
+ | | <code>MMC_TYPE_SDIO = 3;</code> | ||
+ | | An SDIO specification card | ||
+ | |- | ||
+ | | <code>MMC_TYPE_SD_COMBO = 4;</code> | ||
+ | | An SD/SDIO combination card | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_TYPE_MAX = 4;</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;">'''MMC device state''' <code> MMC_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_STATE_EJECTED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_STATE_INSERTED = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_STATE_MAX = 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;">'''MMC device flag''' <code> MMC_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_FLAG_NONE = $00000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_FLAG_CARD_PRESENT = $00000001;</code> | ||
+ | | Card is present | ||
+ | |- | ||
+ | | <code>MMC_FLAG_WRITE_PROTECT = $00000002;</code> | ||
+ | | Card is write protected | ||
+ | |- | ||
+ | | <code>MMC_FLAG_HIGH_CAPACITY = $00000004;</code> | ||
+ | | High Capacity (SDHC) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_EXT_CAPACITY = $00000008;</code> | ||
+ | | Extended Capacity (SDXC) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_UHS_I = $00000010;</code> | ||
+ | | Ultra High Speed (UHS-I) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_UHS_II = $00000020;</code> | ||
+ | | Ultra High Speed (UHS-II) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_BLOCK_ADDRESSED = $00000040;</code> | ||
+ | | Block Addressed (SDHC/SDXC and others) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_AUTO_BLOCK_COUNT = $00000080;</code> | ||
+ | | Controller supports Auto CMD23 (Set Block Count) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_AUTO_COMMAND_STOP = $00000100;</code> | ||
+ | | Controller supports Auto CMD12 (Stop Transmission) | ||
+ | |- | ||
+ | | <code>MMC_FLAG_DDR_MODE = $00000200;</code> | ||
+ | | Device supports DDR mode | ||
+ | |- | ||
+ | | <code>MMC_FLAG_NON_REMOVABLE = $00000400;</code> | ||
+ | | Device is non removable, only check for presence once. | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC/SD status code''' <code> MMC_STATUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_STATUS_SUCCESS = 0;</code> | ||
+ | | Function successful | ||
+ | |- | ||
+ | | <code>MMC_STATUS_TIMEOUT = 1;</code> | ||
+ | | The operation timed out | ||
+ | |- | ||
+ | | <code>MMC_STATUS_NO_MEDIA = 2;</code> | ||
+ | | No media present in device | ||
+ | |- | ||
+ | | <code>MMC_STATUS_HARDWARE_ERROR = 3;</code> | ||
+ | | Hardware error of some form occurred | ||
+ | |- | ||
+ | | <code>MMC_STATUS_INVALID_DATA = 4;</code> | ||
+ | | Invalid data was received | ||
+ | |- | ||
+ | | <code>MMC_STATUS_INVALID_PARAMETER = 5;</code> | ||
+ | | An invalid parameter was passed to the function | ||
+ | |- | ||
+ | | <code>MMC_STATUS_INVALID_SEQUENCE = 6;</code> | ||
+ | | Invalid sequence encountered | ||
+ | |- | ||
+ | | <code>MMC_STATUS_OUT_OF_MEMORY = 7;</code> | ||
+ | | No memory available for operation | ||
+ | |- | ||
+ | | <code>MMC_STATUS_UNSUPPORTED_REQUEST = 8;</code> | ||
+ | | The request is unsupported | ||
+ | |- | ||
+ | | <code>MMC_STATUS_NOT_PROCESSED = 9;</code> | ||
+ | | The MMC transfer has not yet been processed | ||
+ | |- | ||
+ | | <code>MMC_STATUS_OPERATION_FAILED = 10;</code> | ||
+ | | The operation was not able to be completed | ||
+ | |- | ||
+ | | <code>MMC_STATUS_DEVICE_DETACHED = 11;</code> | ||
+ | | SDIO device was detached | ||
+ | |- | ||
+ | | <code>MMC_STATUS_DEVICE_UNSUPPORTED = 12;</code> | ||
+ | | SDIO device is unsupported by the driver | ||
+ | |- | ||
+ | | <code>MMC_STATUS_NOT_BOUND = 13;</code> | ||
+ | | SDIO device is not bound to a driver | ||
+ | |- | ||
+ | | <code>MMC_STATUS_ALREADY_BOUND = 14;</code> | ||
+ | | SDIO device is already bound to a driver | ||
+ | |- | ||
+ | | <code>MMC_STATUS_NOT_READY = 15;</code> | ||
+ | | The device is not ready yet, retry again later. | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC/SD/SDIO version''' <code> SDIO_VERSION_*, SD_VERSION_*, MMC_VERSION_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_SDIO = $00040000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_1_00 = (SDIO_VERSION_SDIO or $0100);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_1_10 = (SDIO_VERSION_SDIO or $010a);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_1_20 = (SDIO_VERSION_SDIO or $0114);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_2_00 = (SDIO_VERSION_SDIO or $0200);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VERSION_3_00 = (SDIO_VERSION_SDIO or $0300);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SD_VERSION_SD = $00020000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_VERSION_1_0 = (SD_VERSION_SD or $0100);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_VERSION_1_10 = (SD_VERSION_SD or $010a);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_VERSION_2 = (SD_VERSION_SD or $0200);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_VERSION_3 = (SD_VERSION_SD or $0300);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SD_VERSION_4 = (SD_VERSION_SD or $0400);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_VERSION_MMC = $00010000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_1_2 = (MMC_VERSION_MMC or $0102);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_1_4 = (MMC_VERSION_MMC or $0104);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_2_2 = (MMC_VERSION_MMC or $0202);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_3 = (MMC_VERSION_MMC or $0300);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4 = (MMC_VERSION_MMC or $0400);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4_1 = (MMC_VERSION_MMC or $0401);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4_2 = (MMC_VERSION_MMC or $0402);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4_3 = (MMC_VERSION_MMC or $0403);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4_41 = (MMC_VERSION_MMC or $0429);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_4_5 = (MMC_VERSION_MMC or $0405);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_5_0 = (MMC_VERSION_MMC or $0500);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_VERSION_UNKNOWN = (MMC_VERSION_MMC);</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;">'''MMC/SD capabilities''' <code> MMC_CAP_* </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/host.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CAP_4_BIT_DATA = (1 shl 0);</code> | ||
+ | | Can the host do 4 bit transfers | ||
+ | |- | ||
+ | | <code>MMC_CAP_MMC_HIGHSPEED = (1 shl 1);</code> | ||
+ | | Can do MMC high-speed timing | ||
+ | |- | ||
+ | | <code>MMC_CAP_SD_HIGHSPEED = (1 shl 2);</code> | ||
+ | | Can do SD high-speed timing | ||
+ | |- | ||
+ | | <code>MMC_CAP_SDIO_IRQ = (1 shl 3);</code> | ||
+ | | Can signal pending SDIO IRQs | ||
+ | |- | ||
+ | | <code>MMC_CAP_SPI = (1 shl 4);</code> | ||
+ | | Talks only SPI protocols | ||
+ | |- | ||
+ | | <code>MMC_CAP_NEEDS_POLL = (1 shl 5);</code> | ||
+ | | Needs polling for card-detection | ||
+ | |- | ||
+ | | <code>MMC_CAP_8_BIT_DATA = (1 shl 6);</code> | ||
+ | | Can the host do 8 bit transfers | ||
+ | |- | ||
+ | | <code>MMC_CAP_AGGRESSIVE_PM = (1 shl 7);</code> | ||
+ | | Suspend = (e)MMC/SD at idle | ||
+ | |- | ||
+ | | <code>MMC_CAP_NONREMOVABLE = (1 shl 8);</code> | ||
+ | | Nonremovable eg. eMMC | ||
+ | |- | ||
+ | | <code>MMC_CAP_WAIT_WHILE_BUSY = (1 shl 9);</code> | ||
+ | | Waits while card is busy | ||
+ | |- | ||
+ | | <code>MMC_CAP_3_3V_DDR = (1 shl 11);</code> | ||
+ | | Host supports eMMC DDR 3.3V | ||
+ | |- | ||
+ | | <code>MMC_CAP_1_8V_DDR = (1 shl 12);</code> | ||
+ | | Host supports eMMC DDR 1.8V | ||
+ | |- | ||
+ | | <code>MMC_CAP_1_2V_DDR = (1 shl 13);</code> | ||
+ | | Host supports eMMC DDR 1.2V | ||
+ | |- | ||
+ | | <code>MMC_CAP_DDR = (MMC_CAP_3_3V_DDR or MMC_CAP_1_8V_DDR or MMC_CAP_1_2V_DDR);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP_POWER_OFF_CARD = (1 shl 14);</code> | ||
+ | | Can power off after boot | ||
+ | |- | ||
+ | | <code>MMC_CAP_BUS_WIDTH_TEST = (1 shl 15);</code> | ||
+ | | CMD14/CMD19 bus width ok | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS_SDR12 = (1 shl 16);</code> | ||
+ | | Host supports UHS SDR12 mode | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS_SDR25 = (1 shl 17);</code> | ||
+ | | Host supports UHS SDR25 mode | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS_SDR50 = (1 shl 18);</code> | ||
+ | | Host supports UHS SDR50 mode | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS_SDR104 = (1 shl 19);</code> | ||
+ | | Host supports UHS SDR104 mode | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS_DDR50 = (1 shl 20);</code> | ||
+ | | Host supports UHS DDR50 mode | ||
+ | |- | ||
+ | | <code>MMC_CAP_UHS = (MMC_CAP_UHS_SDR12 or MMC_CAP_UHS_SDR25 or MMC_CAP_UHS_SDR50 or MMC_CAP_UHS_SDR104 or MMC_CAP_UHS_DDR50);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP_SYNC_RUNTIME_PM = (1 shl 21);</code> | ||
+ | | Synced runtime PM suspends | ||
+ | |- | ||
+ | | <code>MMC_CAP_NEED_RSP_BUSY = (1 shl 22);</code> | ||
+ | | Commands with R1B can't use R1 | ||
+ | |- | ||
+ | | <code>MMC_CAP_DRIVER_TYPE_A = (1 shl 23);</code> | ||
+ | | Host supports Driver Type A | ||
+ | |- | ||
+ | | <code>MMC_CAP_DRIVER_TYPE_C = (1 shl 24);</code> | ||
+ | | Host supports Driver Type C | ||
+ | |- | ||
+ | | <code>MMC_CAP_DRIVER_TYPE_D = (1 shl 25);</code> | ||
+ | | Host supports Driver Type D | ||
+ | |- | ||
+ | | <code>MMC_CAP_DONE_COMPLETE = (1 shl 27);</code> | ||
+ | | RW reqs can be completed within mmc_request_done() | ||
+ | |- | ||
+ | | <code>MMC_CAP_CD_WAKE = (1 shl 28);</code> | ||
+ | | Enable card detect wake | ||
+ | |- | ||
+ | | <code>MMC_CAP_CMD_DURING_TFR = (1 shl 29);</code> | ||
+ | | Commands during data transfer | ||
+ | |- | ||
+ | | <code>MMC_CAP_CMD23 = (1 shl 30);</code> | ||
+ | | CMD23 supported | ||
+ | |- | ||
+ | | <code>MMC_CAP_HW_RESET = (1 shl 31);</code> | ||
+ | | Reset the eMMC card via RST_n | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC/SD capabilities2''' <code> MMC_CAP2_* </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/host.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CAP2_BOOTPART_NOACC = (1 shl 0);</code> | ||
+ | | Boot partition no access | ||
+ | |- | ||
+ | | <code>MMC_CAP2_FULL_PWR_CYCLE = (1 shl 2);</code> | ||
+ | | Can do full power cycle | ||
+ | |- | ||
+ | | <code>MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND = (1 shl 3);</code> | ||
+ | | Can do full power cycle in suspend | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS200_1_8V_SDR = (1 shl 5);</code> | ||
+ | | Can support HS200 1.8V | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS200_1_2V_SDR = (1 shl 6);</code> | ||
+ | | Can support HS200 1.2V | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS200 = (MMC_CAP2_HS200_1_8V_SDR or MMC_CAP2_HS200_1_2V_SDR);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP2_CD_ACTIVE_HIGH = (1 shl 10);</code> | ||
+ | | Card-detect signal active high | ||
+ | |- | ||
+ | | <code>MMC_CAP2_RO_ACTIVE_HIGH = (1 shl 11);</code> | ||
+ | | Write-protect signal active high | ||
+ | |- | ||
+ | | <code>MMC_CAP2_NO_PRESCAN_POWERUP = (1 shl 14);</code> | ||
+ | | Don't power up before scan | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS400_1_8V = (1 shl 15);</code> | ||
+ | | Can support HS400 1.8V | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS400_1_2V = (1 shl 16);</code> | ||
+ | | Can support HS400 1.2V | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS400 = (MMC_CAP2_HS400_1_8V or MMC_CAP2_HS400_1_2V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HSX00_1_8V = (MMC_CAP2_HS200_1_8V_SDR or MMC_CAP2_HS400_1_8V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HSX00_1_2V = (MMC_CAP2_HS200_1_2V_SDR or MMC_CAP2_HS400_1_2V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CAP2_SDIO_IRQ_NOTHREAD = (1 shl 17);</code> | ||
+ | | Don't create a thread to poll for SDIO IRQ | ||
+ | |- | ||
+ | | <code>MMC_CAP2_NO_WRITE_PROTECT = (1 shl 18);</code> | ||
+ | | No physical write protect pin, assume that card is always read-write | ||
+ | |- | ||
+ | | <code>MMC_CAP2_NO_SDIO = (1 shl 19);</code> | ||
+ | | Do not send SDIO commands during initialization | ||
+ | |- | ||
+ | | <code>MMC_CAP2_HS400_ES = (1 shl 20);</code> | ||
+ | | Host supports enhanced strobe | ||
+ | |- | ||
+ | | <code>MMC_CAP2_NO_SD = (1 shl 21);</code> | ||
+ | | Do not send SD commands during initialization | ||
+ | |- | ||
+ | | <code>MMC_CAP2_NO_MMC = (1 shl 22);</code> | ||
+ | | Do not send = (e)MMC commands during initialization | ||
+ | |- | ||
+ | | <code>MMC_CAP2_CQE = (1 shl 23);</code> | ||
+ | | Has eMMC command queue engine | ||
+ | |- | ||
+ | | <code>MMC_CAP2_CQE_DCMD = (1 shl 24);</code> | ||
+ | | CQE can issue a direct command | ||
+ | |- | ||
+ | | <code>MMC_CAP2_AVOID_3_3V = (1 shl 25);</code> | ||
+ | | Host must negotiate down from 3.3V | ||
+ | |- | ||
+ | | <code>MMC_CAP2_MERGE_CAPABLE = (1 shl 26);</code> | ||
+ | | Host can merge a segment over the segment size | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC/SD direction''' <code> MMC_DATA_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_DATA_READ = 1;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_DATA_WRITE = 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;">'''MMC/SD bus width''' <code> MMC_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>MMC_BUS_WIDTH_1 = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_BUS_WIDTH_4 = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUS_WIDTH_8 = 3;</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;">'''MMC bus speed (Hz)''' <code> MMC_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>MMC_BUS_SPEED_DEFAULT = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_BUS_SPEED_HS26 = 26000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUS_SPEED_HS52 = 52000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUS_SPEED_DDR = 52000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUS_SPEED_HS200 = 200000000;</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;">'''MMC/SD timing''' <code> MMC_TIMING_* </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/host.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_TIMING_LEGACY = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_TIMING_MMC_HS = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_SD_HS = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_UHS_SDR12 = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_UHS_SDR25 = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_UHS_SDR50 = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_UHS_SDR104 = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_UHS_DDR50 = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_MMC_DDR52 = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_MMC_HS200 = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TIMING_MMC_HS400 = 10;</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;">'''MMC/SD signal voltage''' <code> MMC_SIGNAL_VOLTAGE_* </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/host.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_SIGNAL_VOLTAGE_330 = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_SIGNAL_VOLTAGE_180 = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SIGNAL_VOLTAGE_120 = 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;">'''MMC/SD set driver type''' <code> MMC_SET_DRIVER_TYPE_* </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/host.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_SET_DRIVER_TYPE_B = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_SET_DRIVER_TYPE_A = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SET_DRIVER_TYPE_C = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SET_DRIVER_TYPE_D = 3;</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;">'''MMC command''' <code> MMC_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/mmc.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 1'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_GO_IDLE_STATE = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_OP_COND = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_ALL_SEND_CID = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SET_RELATIVE_ADDR = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SET_DSR = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SLEEP_AWAKE = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SWITCH = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SELECT_CARD = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_EXT_CSD = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_CSD = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_CID = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_READ_DAT_UNTIL_STOP = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_STOP_TRANSMISSION = 12;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_STATUS = 13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_BUS_TEST_R = 14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_GO_INACTIVE_STATE = 15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_BUS_TEST_W = 19;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SPI_READ_OCR = 58;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SPI_CRC_ON_OFF = 59;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 2'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_SET_BLOCKLEN = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_READ_SINGLE_BLOCK = 17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_READ_MULTIPLE_BLOCK = 18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_TUNING_BLOCK = 19;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_TUNING_BLOCK_HS200 = 21;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 3'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_WRITE_DAT_UNTIL_STOP = 20;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 4'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_SET_BLOCK_COUNT = 23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_WRITE_SINGLE_BLOCK = 24;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_WRITE_MULTIPLE_BLOCK = 25;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_PROGRAM_CID = 26;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_PROGRAM_CSD = 27;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 6'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_SET_WRITE_PROT = 28;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_CLR_WRITE_PROT = 29;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_SEND_WRITE_PROT = 30;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 5'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_ERASE_GROUP_START = 35;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_ERASE_GROUP_END = 36;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_ERASE = 38;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 9'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_FAST_IO = 39;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_GO_IRQ_STATE = 40;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 7'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_LOCK_UNLOCK = 42;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Class 8'' | ||
+ | |- | ||
+ | | <code>MMC_CMD_APP_CMD = 55;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_GEN_CMD = 56;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD_RES_MAN = 62;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CMD62_ARG1 = $EFAC62EC;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CMD62_ARG2 = $00CBAEA7;</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;">'''MMC response type''' <code> MMC_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/mmc.h | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Native'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_PRESENT = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_136 = (1 shl 1);</code> | ||
+ | | 136 bit response | ||
+ | |- | ||
+ | | <code>MMC_RSP_CRC = (1 shl 2);</code> | ||
+ | | Expect valid crc | ||
+ | |- | ||
+ | | <code>MMC_RSP_BUSY = (1 shl 3);</code> | ||
+ | | Card may send busy | ||
+ | |- | ||
+ | | <code>MMC_RSP_OPCODE = (1 shl 4);</code> | ||
+ | | Response contains opcode | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''These are the native response types, and correspond to valid bit patterns of the above flags. One additional valid pattern is all zeros, which means we don't expect a response.'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_NONE = (0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1B = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE or MMC_RSP_BUSY);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2 = (MMC_RSP_PRESENT or MMC_RSP_136 or MMC_RSP_CRC);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R3 = (MMC_RSP_PRESENT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R4 = (MMC_RSP_PRESENT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R5 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R6 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R7 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);</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;">'''MMC non-SPI command''' <code> MMC_CMD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_CMD_MASK = (3 shl 5);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_CMD_AC = (0 shl 5);</code> | ||
+ | | Addressed Command, no Data | ||
+ | |- | ||
+ | | <code>MMC_CMD_ADTC = (1 shl 5);</code> | ||
+ | | Addressed Data Transfer Command | ||
+ | |- | ||
+ | | <code>MMC_CMD_BC = (2 shl 5);</code> | ||
+ | | Broadcast Command, no Response | ||
+ | |- | ||
+ | | <code>MMC_CMD_BCR = (3 shl 5);</code> | ||
+ | | Broadcast Command with Response | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC SPI response type''' <code> MMC_RSP_SPI_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_S1 = (1 shl 7);</code> | ||
+ | | One status byte | ||
+ | |- | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_S2 = (1 shl 8);</code> | ||
+ | | Second byte | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_B4 = (1 shl 9);</code> | ||
+ | | Four data bytes | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_BUSY = (1 shl 10);</code> | ||
+ | | Card may send busy | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''These are the SPI response types for MMC, SD, and SDIO cards. Commands return R1, with maybe more info. Zero is an error type, callers must always provide the appropriate MMC_RSP_SPI_Rx flags.'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R1 = (MMC_RSP_SPI_S1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R1B = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_BUSY);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R2 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_S2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R3 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R4 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R5 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_S2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_SPI_R7 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);</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;">'''MMC response value''' <code> MMC_RSP_R1_*, MMC_RSP_R2_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''R1 - MMC status in R1, for native mode (SPI bits are different)'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_OUT_OF_RANGE = (1 shl 31);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ADDRESS_ERROR = (1 shl 30);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_BLOCK_LEN_ERROR = (1 shl 29);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ERASE_SEQ_ERROR = (1 shl 28);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ERASE_PARAM = (1 shl 27);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_WP_VIOLATION = (1 shl 26);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_CARD_IS_LOCKED = (1 shl 25);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_LOCK_UNLOCK_FAILED = (1 shl 24);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_COM_CRC_ERROR = (1 shl 23);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ILLEGAL_COMMAND = (1 shl 22);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_CARD_ECC_FAILED = (1 shl 21);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_CC_ERROR = (1 shl 20);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ERROR = (1 shl 19);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_UNDERRUN = (1 shl 18);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_OVERRUN = (1 shl 17);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_CID_CSD_OVERWRITE = (1 shl 16);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_WP_ERASE_SKIP = (1 shl 15);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_CARD_ECC_DISABLED = (1 shl 14);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_ERASE_RESET = (1 shl 13);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_READY_FOR_DATA = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SWITCH_ERROR = (1 shl 7);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_EXCEPTION_EVENT = (1 shl 6);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_APP_CMD = (1 shl 5);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_AKE_SEQ_ERROR = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''R1 SPI - MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS. R1 is the low order byte, R2 is the next highest byte, when present.'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_IDLE = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_ERASE_RESET = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_ILLEGAL_COMMAND = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_COM_CRC = (1 shl 3);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_ERASE_SEQ = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_ADDRESS = (1 shl 5);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R1_SPI_PARAMETER = (1 shl 6);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''R1 bit 7 is always zero'' | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''R2 SPI - See above'' | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_CARD_LOCKED = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_WP_ERASE_SKIP = (1 shl 9);</code> | ||
+ | | Or lock/unlock fail | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_LOCK_UNLOCK_FAIL = MMC_RSP_R2_SPI_WP_ERASE_SKIP;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_ERROR = (1 shl 10);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_CC_ERROR = (1 shl 11);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_CARD_ECC_ERROR = (1 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_WP_VIOLATION = (1 shl 13);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_ERASE_PARAM = (1 shl 14);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_OUT_OF_RANGE = (1 shl 15);</code> | ||
+ | | Or CSD overwrite | ||
+ | |- | ||
+ | | <code>MMC_RSP_R2_SPI_CSD_OVERWRITE = MMC_RSP_R2_SPI_OUT_OF_RANGE;</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;">'''MMC operation condition register (OCR) value''' <code> MMC_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>MMC_OCR_BUSY = $80000000;</code> | ||
+ | | Busy Status - 0 = Initializing/1 = Initialization Complete | ||
+ | |- | ||
+ | | <code>MMC_OCR_HCS = $40000000;</code> | ||
+ | | Card Capacity Status - 0 = SDSC/1 = SDHC or SDXC | ||
+ | |- | ||
+ | | <code>MMC_OCR_UHS_II = $20000000;</code> | ||
+ | | UHS-II Card Status - 0 = Non UHS-II Card/1 = UHS-II Card | ||
+ | |- | ||
+ | | <code>MMC_OCR_S18A = $01000000;</code> | ||
+ | | Switching to 1.8V Accepted - 0 = Continue current voltage signaling/1 = Ready for switching signal voltage | ||
+ | |- | ||
+ | | <code>MMC_OCR_VOLTAGE_MASK = $007FFF80;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_OCR_ACCESS_MODE = $60000000;</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;">'''MMC card status register (CSR) value''' <code> MMC_CARD_STATUS_* </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.1 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"|Note: These map to the Native mode R1 response values | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CARD_STATUS_MASK = not($0206BF7F);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CARD_STATUS_ERROR = (1 shl 19);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CARD_STATUS_CURRENT_STATE = ($0F shl 9);</code> | ||
+ | | See MMC_CURRENT_STATE_ definitions below | ||
+ | |- | ||
+ | | <code>MMC_CARD_STATUS_READY_FOR_DATA = (1 shl 8);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CARD_STATUS_SWITCH_ERROR = (1 shl 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;">'''MMC current state value''' <code> MMC_CURRENT_STATE_* </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 Card Status Register or R1 Response | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_IDLE = (0 shl 9);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_READY = (1 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_IDENT = (2 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_STBY = (3 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_TRAN = (4 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_DATA = (5 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_RCV = (6 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_PRG = (7 shl 9);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CURRENT_STATE_DIS = (8 shl 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;">'''MMC card identification data (CID) value''' <code> MMC_CID_* </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.2 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''MMC CID Fields'' | ||
+ | |- | ||
+ | | <code>MMC_CID_MID = 1;</code> | ||
+ | | Manufacturer Id | ||
+ | |- | ||
+ | | <code>MMC_CID_OID = 2;</code> | ||
+ | | OEM/Application Id | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM0 = 3;</code> | ||
+ | | Product name (Byte 0) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM1 = 4;</code> | ||
+ | | Product name (Byte 1) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM2 = 5;</code> | ||
+ | | Product name (Byte 2) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM3 = 6;</code> | ||
+ | | Product name (Byte 3) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM4 = 7;</code> | ||
+ | | Product name (Byte 4) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM5 = 8;</code> | ||
+ | | Product name (Byte 5) | ||
+ | |- | ||
+ | | <code>MMC_CID_PNM6 = 9;</code> | ||
+ | | Product name (Byte 6) | ||
+ | |- | ||
+ | | <code>MMC_CID_PRV = 10;</code> | ||
+ | | Product revision | ||
+ | |- | ||
+ | | <code>MMC_CID_HRV = 11;</code> | ||
+ | | Hardware revision | ||
+ | |- | ||
+ | | <code>MMC_CID_FRV = 12;</code> | ||
+ | | Firmware revision | ||
+ | |- | ||
+ | | <code>MMC_CID_PSN = 13;</code> | ||
+ | | Product serial number | ||
+ | |- | ||
+ | | <code>MMC_CID_MDT_YEAR = 14;</code> | ||
+ | | Manufacturing year | ||
+ | |- | ||
+ | | <code>MMC_CID_MDT_MONTH = 15;</code> | ||
+ | | Manufacturing month | ||
+ | |- | ||
+ | | <code>MMC_CID_CRC = 16;</code> | ||
+ | | CRC | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC card specific data (CSD) value''' <code> MMC_CSD_* </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.3 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''MMC CSD Fields'' | ||
+ | |- | ||
+ | | <code>MMC_CSD_STRUCTURE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_SPECVER = 2;</code> | ||
+ | | MMC/eMMC Only | ||
+ | |- | ||
+ | | <code>MMC_CSD_TAAC_UNIT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_TAAC_VALUE = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_NSAC = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_TRAN_SPEED_UNIT = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_TRAN_SPEED_VALUE = 37;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_CCC = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_READ_BL_LEN = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_READ_BL_PARTIAL = 9;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_WRITE_BLK_MISALIGN = 10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_READ_BLK_MISALIGN = 11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_DSR_IMP = 12;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_C_SIZE = 13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_VDD_R_CURR_MIN = 14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_VDD_R_CURR_MAX = 15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_VDD_W_CURR_MIN = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_VDD_W_CURR_MAX = 17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_C_SIZE_MULT = 18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_ERASE_BLK_EN = 19;</code> | ||
+ | | SD Specification | ||
+ | |- | ||
+ | | <code>MMC_CSD_SECTOR_SIZE = 20;</code> | ||
+ | | MMC/eMMC Specification/SD Specification | ||
+ | |- | ||
+ | | <code>MMC_CSD_ERASE_GRP_SIZE = 21;</code> | ||
+ | | MMC/eMMC Specification | ||
+ | |- | ||
+ | | <code>MMC_CSD_ERASE_GRP_MULT = 22;</code> | ||
+ | | MMC/eMMC Specification | ||
+ | |- | ||
+ | | <code>MMC_CSD_WP_GRP_SIZE = 23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_WP_GRP_ENABLE = 24;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_DEFAULT_ECC = 25;</code> | ||
+ | | MMC/eMMC Only | ||
+ | |- | ||
+ | | <code>MMC_CSD_R2W_FACTOR = 26;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_WRITE_BL_LEN = 27;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_WRITE_BL_PARTIAL = 28;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_CONTENT_PROT_APP = 29;</code> | ||
+ | | MMC/eMMC Only | ||
+ | |- | ||
+ | | <code>MMC_CSD_FILE_FORMAT_GRP = 30;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_COPY = 31;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_PERM_WRITE_PROTECT = 32;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_TMP_WRITE_PROTECT = 33;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_FILE_FORMAT = 34;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_CSD_ECC = 35;</code> | ||
+ | | MMC/eMMC Only | ||
+ | |- | ||
+ | | <code>MMC_CSD_CRC = 36;</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;">'''MMC CSD structure value''' <code> MMC_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>MMC_CSD_STRUCT_VER_1_0 = 0;</code> | ||
+ | | Valid for system specification 1.0 - 1.2 | ||
+ | |- | ||
+ | | <code>MMC_CSD_STRUCT_VER_1_1 = 1;</code> | ||
+ | | Valid for system specification 1.4 - 2.2 | ||
+ | |- | ||
+ | | <code>MMC_CSD_STRUCT_VER_1_2 = 2;</code> | ||
+ | | Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 | ||
+ | |- | ||
+ | | <code>MMC_CSD_STRUCT_EXT_CSD = 3;</code> | ||
+ | | Version is coded in CSD_STRUCTURE in EXT_CSD | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC CSD spec version value''' <code> MMC_CSD_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>MMC_CSD_SPEC_VER_0 = 0;</code> | ||
+ | | Implements system specification 1.0 - 1.2 | ||
+ | |- | ||
+ | | <code>MMC_CSD_SPEC_VER_1 = 1;</code> | ||
+ | | Implements system specification 1.4 | ||
+ | |- | ||
+ | | <code>MMC_CSD_SPEC_VER_2 = 2;</code> | ||
+ | | Implements system specification 2.0 - 2.2 | ||
+ | |- | ||
+ | | <code>MMC_CSD_SPEC_VER_3 = 3;</code> | ||
+ | | Implements system specification 3.1 - 3.2 - 3.31 | ||
+ | |- | ||
+ | | <code>MMC_CSD_SPEC_VER_4 = 4;</code> | ||
+ | | Implements system specification 4.0 - 4.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;">'''MMC CSD TAAC time unit''' <code> MMC_CSD_TAAC_UNITS* </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>MMC_CSD_TAAC_UNITS:array[0..7] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>1,</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>10,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>100,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>10000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>100000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1000000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>10000000);</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;">'''MMC CSD TAAC time value''' <code> MMC_CSD_TAAC_VALUES* </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>MMC_CSD_TAAC_VALUES:array[0..15] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>10,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>12,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>13,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>15,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>20,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>25,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>30,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>35,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>40,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>45,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>50,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>55,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>60,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>70,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>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;">'''MMC CSD card command class (CCC) value''' <code> MMC_CCC_* </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: Table 4-21 (Page 68) of SD Physical Layer Simplified Specification V4.10 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MMC_CCC_BASIC = (1 shl 0);</code> | ||
+ | | (Class 0) Basic protocol functions (CMD0,1,2,3,4,7,9,10,12,13,15) (and for SPI, CMD58,59) | ||
+ | |- | ||
+ | | <code>MMC_CCC_STREAM_READ = (1 shl 1);</code> | ||
+ | | (Class 1) Stream read commands (CMD11) | ||
+ | |- | ||
+ | | <code>MMC_CCC_BLOCK_READ = (1 shl 2);</code> | ||
+ | | (Class 2) Block read commands (CMD16,17,18) | ||
+ | |- | ||
+ | | <code>MMC_CCC_STREAM_WRITE = (1 shl 3);</code> | ||
+ | | (Class 3) Stream write commands (CMD20) | ||
+ | |- | ||
+ | | <code>MMC_CCC_BLOCK_WRITE = (1 shl 4);</code> | ||
+ | | (Class 4) Block write commands (CMD16,24,25,26,27) | ||
+ | |- | ||
+ | | <code>MMC_CCC_ERASE = (1 shl 5);</code> | ||
+ | | (Class 5) Ability to erase blocks (CMD32,33,34,35,36,37,38,39) | ||
+ | |- | ||
+ | | <code>MMC_CCC_WRITE_PROT = (1 shl 6);</code> | ||
+ | | (Class 6) Ability to write protect blocks (CMD28,29,30) | ||
+ | |- | ||
+ | | <code>MMC_CCC_LOCK_CARD = (1 shl 7);</code> | ||
+ | | (Class 7) Ability to lock down card (CMD16,CMD42) | ||
+ | |- | ||
+ | | <code>MMC_CCC_APP_SPEC = (1 shl 8);</code> | ||
+ | | (Class 8) Application specific (CMD55,56,57,ACMD*) | ||
+ | |- | ||
+ | | <code>MMC_CCC_IO_MODE = (1 shl 9);</code> | ||
+ | | (Class 9) I/O mode (CMD5,39,40,52,53) | ||
+ | |- | ||
+ | | <code>MMC_CCC_SWITCH = (1 shl 10);</code> | ||
+ | | (Class 10) High speed switch (CMD6,34,35,36,37,50) | ||
+ | |- | ||
+ | | <code>MMC_CCC_EXTENSION = (1 shl 11);</code> | ||
+ | | (Class 11) Extension (CMD?) | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC CSD transfer speed rate unit''' <code> MMC_CSD_TRAN_SPEED_UNITS* </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>MMC_CSD_TRAN_SPEED_UNITS:array[0..7] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>10000,</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>100000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1000000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>10000000,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>0);</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;">'''MMC CSD transfer speed time value''' <code> MMC_CSD_TRAN_SPEED_VALUES* </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>MMC_CSD_TRAN_SPEED_VALUES:array[0..15] of LongWord = (</code> | ||
+ | |- | ||
+ | | <code>0,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>10,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>12,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>13,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>15,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>20,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>25,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>30,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>35,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>40,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>45,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>50,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>55,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>60,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>70,</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>80);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SECURE_ERASE = $80000000;</code> | ||
+ | | Used by MMC_CMD_ERASE | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC voltage value''' <code> MMC_VDD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_VDD_165_195 = $00000080;</code> | ||
+ | | VDD voltage 1.65 - 1.95 | ||
+ | |- | ||
+ | | <code>MMC_VDD_20_21 = $00000100;</code> | ||
+ | | VDD voltage 2.0 ~ 2.1 | ||
+ | |- | ||
+ | | <code>MMC_VDD_21_22 = $00000200;</code> | ||
+ | | VDD voltage 2.1 ~ 2.2 | ||
+ | |- | ||
+ | | <code>MMC_VDD_22_23 = $00000400;</code> | ||
+ | | VDD voltage 2.2 ~ 2.3 | ||
+ | |- | ||
+ | | <code>MMC_VDD_23_24 = $00000800;</code> | ||
+ | | VDD voltage 2.3 ~ 2.4 | ||
+ | |- | ||
+ | | <code>MMC_VDD_24_25 = $00001000;</code> | ||
+ | | VDD voltage 2.4 ~ 2.5 | ||
+ | |- | ||
+ | | <code>MMC_VDD_25_26 = $00002000;</code> | ||
+ | | VDD voltage 2.5 ~ 2.6 | ||
+ | |- | ||
+ | | <code>MMC_VDD_26_27 = $00004000;</code> | ||
+ | | VDD voltage 2.6 ~ 2.7 | ||
+ | |- | ||
+ | | <code>MMC_VDD_27_28 = $00008000;</code> | ||
+ | | VDD voltage 2.7 ~ 2.8 | ||
+ | |- | ||
+ | | <code>MMC_VDD_28_29 = $00010000;</code> | ||
+ | | VDD voltage 2.8 ~ 2.9 | ||
+ | |- | ||
+ | | <code>MMC_VDD_29_30 = $00020000;</code> | ||
+ | | VDD voltage 2.9 ~ 3.0 | ||
+ | |- | ||
+ | | <code>MMC_VDD_30_31 = $00040000;</code> | ||
+ | | VDD voltage 3.0 ~ 3.1 | ||
+ | |- | ||
+ | | <code>MMC_VDD_31_32 = $00080000;</code> | ||
+ | | VDD voltage 3.1 ~ 3.2 | ||
+ | |- | ||
+ | | <code>MMC_VDD_32_33 = $00100000;</code> | ||
+ | | VDD voltage 3.2 ~ 3.3 | ||
+ | |- | ||
+ | | <code>MMC_VDD_33_34 = $00200000;</code> | ||
+ | | VDD voltage 3.3 ~ 3.4 | ||
+ | |- | ||
+ | | <code>MMC_VDD_34_35 = $00400000;</code> | ||
+ | | VDD voltage 3.4 ~ 3.5 | ||
+ | |- | ||
+ | | <code>MMC_VDD_35_36 = $00800000;</code> | ||
+ | | VDD voltage 3.5 ~ 3.6 | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC switch mode value''' <code> MMC_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>MMC_SWITCH_MODE_CMD_SET = $00;</code> | ||
+ | | Change the command set | ||
+ | |- | ||
+ | | <code>MMC_SWITCH_MODE_SET_BITS = $01;</code> | ||
+ | | Set bits in EXT_CSD byte addressed by index which are 1 in value field | ||
+ | |- | ||
+ | | <code>MMC_SWITCH_MODE_CLEAR_BITS = $02;</code> | ||
+ | | Clear bits in EXT_CSD byte addressed by index, which are 1 in value field | ||
+ | |- | ||
+ | | <code>MMC_SWITCH_MODE_WRITE_BYTE = $03;</code> | ||
+ | | Set target byte to value | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC EXT_CSD field''' <code> EXT_CSD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_MODE_EN = 15;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_FLUSH_CACHE = 32;</code> | ||
+ | | W | ||
+ | |- | ||
+ | | <code>EXT_CSD_CACHE_CTRL = 33;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_OFF_NOTIFICATION = 34;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_FAILURE_INDEX = 35;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_CMD_STATUS = 36;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_EXP_EVENTS_STATUS = 54;/code> | ||
+ | | RO, 2 bytes | ||
+ | |- | ||
+ | | <code>EXT_CSD_EXP_EVENTS_CTRL = 56;</code> | ||
+ | | R/W, 2 bytes | ||
+ | |- | ||
+ | | <code>EXT_CSD_DATA_SECTOR_SIZE = 61;</code> | ||
+ | | R | ||
+ | |- | ||
+ | | <code>EXT_CSD_ENH_START_ADDR = 136;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_ENH_SIZE_MULT = 140;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_GP_SIZE_MULT = 143;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_SETTING_COMPLETED = 155;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE = 156;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_MAX_ENH_SIZE_MULT = 157;</code> | ||
+ | | R | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_SUPPORT = 160;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_HPI_MGMT = 161;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_RST_N_FUNCTION = 162;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_BKOPS_EN = 163;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_BKOPS_START = 164;</code> | ||
+ | | W | ||
+ | |- | ||
+ | | <code>EXT_CSD_SANITIZE_START = 165;</code> | ||
+ | | W | ||
+ | |- | ||
+ | | <code>EXT_CSD_WR_REL_PARAM = 166;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_WR_REL_SET = 167;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_RPMB_MULT = 168;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_FW_CONFIG = 169;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_WP = 173;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_ERASE_GROUP_DEF = 175;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_BUS_CONDITIONS = 177;</code> | ||
+ | | R/W/E | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_CONFIG = 179;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_ERASED_MEM_CONT = 181;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_BUS_WIDTH = 183;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_STROBE_SUPPORT = 184</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_HS_TIMING = 185;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_CLASS = 187;</code> | ||
+ | | R/W | ||
+ | |- | ||
+ | | <code>EXT_CSD_REV = 192;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_STRUCTURE = 194;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE = 196;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_DRIVER_STRENGTH = 197;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_OUT_OF_INTERRUPT_TIME = 198;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_SWITCH_TIME = 199;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_52_195 = 200;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_26_195 = 201;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_52_360 = 202;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_26_360 = 203;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_CNT = 212;</code> | ||
+ | | RO, 4 bytes | ||
+ | |- | ||
+ | | <code>EXT_CSD_S_A_TIMEOUT = 217;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_REL_WR_SEC_C = 222;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_HC_WP_GRP_SIZE = 221;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_ERASE_TIMEOUT_MULT = 223;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_HC_ERASE_GRP_SIZE = 224;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_SIZE_MULT = 226;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_TRIM_MULT = 229;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_ERASE_MULT = 230;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_FEATURE_SUPPORT = 231;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_TRIM_MULT = 232;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_200_195 = 236;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_200_360 = 237;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_DDR_52_195 = 238;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_DDR_52_360 = 239;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_BKOPS_STATUS = 246;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_OFF_LONG_TIME = 247;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_GENERIC_CMD6_TIME = 248;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_CACHE_SIZE = 249;</code> | ||
+ | | RO, 4 bytes | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_DDR_200_360 = 253;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_FIRMWARE_VERSION = 254;</code> | ||
+ | | RO, 8 bytes | ||
+ | |- | ||
+ | | <code>EXT_CSD_PRE_EOL_INFO = 267;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A = 268;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B = 269;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_DEPTH = 307;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_SUPPORT = 308;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_SUPPORTED_MODE = 493;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_TAG_UNIT_SIZE = 498;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_DATA_TAG_SUPPORT = 499;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_MAX_PACKED_WRITES = 500;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_MAX_PACKED_READS = 501;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_BKOPS_SUPPORT = 502;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | | <code>EXT_CSD_HPI_FEATURES = 503;</code> | ||
+ | | RO | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC EXT_CSD field definition''' <code> EXT_CSD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE_ENH_4 = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE_ENH_3 = $08;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE_ENH_2 = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE_ENH_1 = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ATTRIBUTE_ENH_USR = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_EXT_ATTRIBUTE_EN = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_ENH_ATTRIBUTE_EN = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PARTITION_PARTITIONING_EN = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_WR_REL_PARAM_EN = (1 shl 2);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_WR_REL_PARAM_EN_RPMB_REL_WR = (1 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_WP_B_PWR_WP_DIS = $40;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_WP_B_PERM_WP_DIS = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_WP_B_PERM_WP_EN = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_BOOT_WP_B_PWR_WP_EN = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_CONFIG_ACC_MASK = $07;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_CONFIG_ACC_BOOT0 = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_CONFIG_ACC_RPMB = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_CONFIG_ACC_GP0 = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_SETTING_COMPLETED = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PART_SUPPORT_PART_EN = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMD_SET_NORMAL = (1 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMD_SET_SECURE = (1 shl 1);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMD_SET_CPSECURE = (1 shl 2);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS_26 = (1 shl 0);</code> | ||
+ | | Card can run at 26MHz | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS_52 = (1 shl 1);</code> | ||
+ | | Card can run at 52MHz | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS = (EXT_CSD_CARD_TYPE_HS_26 or EXT_CSD_CARD_TYPE_HS_52);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_DDR_1_8V = (1 shl 2);</code> | ||
+ | | Card can run at 52MHz / DDR mode @1.8V or 3V I/O | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_DDR_1_2V = (1 shl 3);</code> | ||
+ | | Card can run at 52MHz / DDR mode @1.2V I/O | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_DDR_52 = (EXT_CSD_CARD_TYPE_DDR_1_8V or EXT_CSD_CARD_TYPE_DDR_1_2V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS200_1_8V = (1 shl 4);</code> | ||
+ | | Card can run at 200MHz | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS200_1_2V = (1 shl 5);</code> | ||
+ | | Card can run at 200MHz / SDR mode @1.2V I/O | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS200 = (EXT_CSD_CARD_TYPE_HS200_1_8V or EXT_CSD_CARD_TYPE_HS200_1_2V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS400_1_8V = (1 shl 6);</code> | ||
+ | | Card can run at 200MHz DDR, 1.8V | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS400_1_2V = (1 shl 7);</code> | ||
+ | | Card can run at 200MHz DDR, 1.2V | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS400 = (EXT_CSD_CARD_TYPE_HS400_1_8V or EXT_CSD_CARD_TYPE_HS400_1_2V);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CARD_TYPE_HS400ES = (1 shl 8);</code> | ||
+ | | Card can run at HS400ES | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_BUS_WIDTH_1 = 0;</code> | ||
+ | | Card is in 1 bit mode | ||
+ | |- | ||
+ | | <code>EXT_CSD_BUS_WIDTH_4 = 1;</code> | ||
+ | | Card is in 4 bit mode | ||
+ | |- | ||
+ | | <code>EXT_CSD_BUS_WIDTH_8 = 2;</code> | ||
+ | | Card is in 8 bit mode | ||
+ | |- | ||
+ | | <code>EXT_CSD_DDR_BUS_WIDTH_4 = 5;</code> | ||
+ | | Card is in 4 bit DDR mode | ||
+ | |- | ||
+ | | <code>EXT_CSD_DDR_BUS_WIDTH_8 = 6;</code> | ||
+ | | Card is in 8 bit DDR mode | ||
+ | |- | ||
+ | | <code>EXT_CSD_BUS_WIDTH_STROBE = 1 shl 7;</code> | ||
+ | | Enhanced strobe mode | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_TIMING_BC = 0;</code> | ||
+ | | Backwards compatility | ||
+ | |- | ||
+ | | <code>EXT_CSD_TIMING_HS = 1;</code> | ||
+ | | High speed | ||
+ | |- | ||
+ | | <code>EXT_CSD_TIMING_HS200 = 2;</code> | ||
+ | | HS200 | ||
+ | |- | ||
+ | | <code>EXT_CSD_TIMING_HS400 = 3;</code> | ||
+ | | HS400 | ||
+ | |- | ||
+ | | <code>EXT_CSD_DRV_STR_SHIFT = 4;</code> | ||
+ | | Driver Strength shift | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_ER_EN = 1 shl 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_BD_BLK_EN = 1 shl 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_GB_CL_EN = 1 shl 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_SEC_SANITIZE = 1 shl 6;</code> | ||
+ | | v4.5 only | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_RST_N_EN_MASK = $03;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_RST_N_ENABLED = 1;</code> | ||
+ | | RST_n is enabled on card | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_NO_POWER_NOTIFICATION = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_ON = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_OFF_SHORT = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_POWER_OFF_LONG = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_8BIT_MASK = $F0;</code> | ||
+ | | 8 bit PWR CLS | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_4BIT_MASK = $0F;</code> | ||
+ | | 8 bit PWR CLS | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_8BIT_SHIFT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_PWR_CL_4BIT_SHIFT = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_EVENT_EN = 1 shl 3;</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;">'''MMC EXT_CSD exception event status field''' <code> EXT_CSD_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_URGENT_BKOPS = 1 shl 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_DYNCAP_NEEDED = 1 shl 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_SYSPOOL_EXHAUSTED = 1 shl 2;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_FAILURE = 1 shl 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_GENERIC_ERROR = 1 shl 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_PACKED_INDEXED_ERROR = 1 shl 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;">'''MMC EXT_CSD BKOPS status level''' <code> EXT_CSD_BKOPS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_BKOPS_LEVEL_2 = $02;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC EXT_CSD BKOPS mode''' <code> EXT_CSD_*_BKOPS_ </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_MANUAL_BKOPS_MASK = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_AUTO_BKOPS_MASK = $02;</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;">'''MMC EXT_CSD command queue''' <code> EXT_CSD_CMDQ_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_MODE_ENABLED = 1 shl 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_DEPTH_MASK = $1F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EXT_CSD_CMDQ_SUPPORTED = 1 shl 0;</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;">'''MMC EXT_CSD high speed max''' <code> MMC_HIGH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_HIGH_26_MAX_DTR = 26000000;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>MMC_HIGH_52_MAX_DTR = 52000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_HIGH_DDR_MAX_DTR = 52000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_HS200_MAX_DTR = 200000000;</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;">'''MMC EXT_CSD minimum partition switch timeout''' <code> MMC_MIN_PART_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_MIN_PART_SWITCH_TIME = 300;</code> | ||
+ | | style="width: 50%;"|Milliseconds | ||
+ | |- | ||
+ | |} | ||
+ | </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;">'''MMC miscellaneous''' <code> MMCPART_*, MMC_MAX_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMCPART_NOAVAILABLE = ($ff);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>PART_ACCESS_MASK = ($07);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PART_SUPPORT = ($01);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ENHNCD_SUPPORT = ($02);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PART_ENH_ATTRIB = ($1f);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Maximum block size for MMC'' | ||
+ | |- | ||
+ | | <code>MMC_MAX_BLOCK_LEN = 512;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Maximum block count for MMC'' | ||
+ | |- | ||
+ | | <code>MMC_MAX_BLOCK_COUNT = 65535;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''The number of MMC physical partitions. These consist of: boot partitions (2), general purpose partitions (4) and RPMB partition (1) in MMC v4.4'' | ||
+ | |- | ||
+ | | <code>MMC_NUM_BOOT_PARTITION = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_NUM_GP_PARTITION = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_NUM_PHY_PARTITION = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Timeouts'' | ||
+ | |- | ||
+ | | <code>MMC_DEFAULT_CMD6_TIMEOUT_MS = 500;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_MIN_CACHE_EN_TIMEOUT_MS = 1600;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Sizes'' | ||
+ | |- | ||
+ | | <code>MMC_FIRMWARE_VERSION_LEN = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Version specific features'' | ||
+ | |- | ||
+ | | <code>MMC_DISCARD_FEATURE = $01;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Busy Poll Commands'' | ||
+ | |- | ||
+ | | <code>MMC_BUSY_CMD6 = 0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUSY_ERASE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_BUSY_HPI = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Erase/Trim/Discard Arguments'' | ||
+ | |- | ||
+ | | <code>MMC_ERASE_ARG = $00000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SECURE_ERASE_ARG = $80000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TRIM_ARG = $00000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_DISCARD_ARG = $00000003;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SECURE_TRIM1_ARG = $80000001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SECURE_TRIM2_ARG = $80008000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_SECURE_ARGS = $80000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MMC_TRIM_ARGS = $00008001;</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;">'''MMC logging''' <code> MMC_LOG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>MMC_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;</code> | ||
+ | | MMC debugging messages | ||
+ | |- | ||
+ | | <code>MMC_LOG_LEVEL_INFO = LOG_LEVEL_INFO;</code> | ||
+ | | MMC informational messages, such as a device being attached or detached | ||
+ | |- | ||
+ | | <code>MMC_LOG_LEVEL_WARN = LOG_LEVEL_WARN;</code> | ||
+ | | MMC warning messages | ||
+ | |- | ||
+ | | <code>MMC_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;</code> | ||
+ | | MMC error messages | ||
+ | |- | ||
+ | | <code>MMC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;</code> | ||
+ | | 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''' <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)''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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 status register (SSR) value''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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 configuration register (SCR) value''' <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''' <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''' <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''' <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''' <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''' <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''' <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 function state''' <code> SDIO_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_STATE_DETACHED = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_STATE_DETACHING = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_STATE_ATTACHING = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_STATE_ATTACHED = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_STATE_MAX = 3;</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 state name''' <code> SDIO_STATE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_STATE_NAMES:array[SDIO_STATE_DETACHED..SDIO_STATE_MAX] of String = (</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>'SDIO_STATE_DETACHED',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDIO_STATE_DETACHING',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDIO_STATE_ATTACHING',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDIO_STATE_ATTACHED');</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 status''' <code> SDIO_STATUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_STATUS_UNBOUND = 0;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_STATUS_BOUND = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_STATUS_MAX = 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;">'''SDIO function status name''' <code> SDIO_STATUS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_STATUS_NAMES:array[SDIO_STATUS_UNBOUND..SDIO_STATUS_MAX] of String = (</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>'SDIO_STATUS_UNBOUND',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDIO_STATUS_BOUND');</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 command''' <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''' <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)''' <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''' <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''' <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''' <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''' <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''' <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''' <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''' <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)''' <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;">'''SDIO function class''' <code> SDIO_CLASS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_NONE = $00;</code> | ||
+ | | style="width: 50%;"|Not a SDIO standard interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_UART = $01;</code> | ||
+ | | Standard UART interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_BT_A = $02;</code> | ||
+ | | Type-A BlueTooth std interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_BT_B = $03;</code> | ||
+ | | Type-B BlueTooth std interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_GPS = $04;</code> | ||
+ | | GPS standard interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_CAMERA = $05;</code> | ||
+ | | Camera standard interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_PHS = $06;</code> | ||
+ | | PHS standard interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_WLAN = $07;</code> | ||
+ | | WLAN interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_ATA = $08;</code> | ||
+ | | Embedded SDIO-ATA std interface | ||
+ | |- | ||
+ | | <code>SDIO_CLASS_BT_AMP = $09;</code> | ||
+ | | Type-A Bluetooth AMP interface | ||
+ | |- | ||
+ | |} | ||
+ | </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 vendor''' <code> SDIO_VENDOR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_STE = $0020;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_INTEL = $0089;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_CGUYS = $0092;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_TI = $0097;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_ATHEROS = $0271;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_BROADCOM = $02d0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_MARVELL = $02df;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_MEDIATEK = $037a;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_MICROCHIP_WILC = $0296;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_SIANO = $039a;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_RSI = $041b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_VENDOR_ID_TI_WL1251 = $104c;</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 device''' <code> SDIO_DEVICE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_STE_CW1200 = $2280;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX = $1402;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200WIFI = $1403;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200TOP = $1404;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200GPS = $1405;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200BT = $1406;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 = $1407;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_CGUYS_EW_CG1102GC = $0004;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_TI_WL1271 = $4076;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6003_00 = $0300;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6003_01 = $0301;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6004_00 = $0400;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6004_01 = $0401;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6004_02 = $0402;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6004_18 = $0418;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6004_19 = $0419;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_AR6005 = $050A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_ATHEROS_QCA9377 = $0701;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_NINTENDO_WII = $044b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43241 = $4324;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4329 = $4329;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4330 = $4330;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4334 = $4334;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4335_4339 = $4335;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4339 = $4339;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4345 = $4345;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4354 = $4354;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359 = $4355;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4356 = $4356;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_4359 = $4359;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373 = $4373;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012 = $a804;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43143 = $a887;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43340 = $a94c;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43341 = $a94d;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43362 = $a962;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43364 = $a9a4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43430 = $a9a6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_BROADCOM_43455 = $a9bf;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_LIBERTAS = $9103;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8688_WLAN = $9104;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8688_BT = $9105;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8786_WLAN = $9116;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8787_WLAN = $9119;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8787_BT = $911a;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8787_BT_AMP = $911b;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8797_F0 = $9128;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8797_WLAN = $9129;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8797_BT = $912a;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8897_WLAN = $912d;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8897_BT = $912e;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8887_F0 = $9134;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8887_WLAN = $9135;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8887_BT = $9136;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8801_WLAN = $9139;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8997_F0 = $9140;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8997_WLAN = $9141;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8997_BT = $9142;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8977_WLAN = $9145;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8977_BT = $9146;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8987_WLAN = $9149;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MARVELL_8987_BT = $914a;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MEDIATEK_MT7663 = $7663;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MEDIATEK_MT7668 = $7668;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_MICROCHIP_WILC1000 = $5347;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_NOVA_B0 = $0201;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_NICE = $0202;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_VEGA_A0 = $0300;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_VENICE = $0301;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_MING = $0302;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_PELE = $0500;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_RIO = $0600;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_DENVER_2160 = $0700;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_DENVER_1530 = $0800;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_NOVA_A0 = $1100;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_SIANO_STELLAR = $5347;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_DEVICE_ID_TI_WL1251 = $9066;</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 CIS tuple code''' <code> CISTPL_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>CISTPL_NULL = $00;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>CISTPL_CHECKSUM = $10;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_VERS_1 = $15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_ALTSTR = $16;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_MANFID = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_FUNCID = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_FUNCE = $22;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_SDIO_STD = $91;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_SDIO_EXT = $92;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CISTPL_END = $FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_MAX_FUNCTIONS = 7;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDIO_READ_CIS_TIMEOUT_MS = (10 * 1000);</code> | ||
+ | | 10 seconds | ||
+ | |- | ||
+ | |} | ||
+ | </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''' <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%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_MMC = 1;</code> | ||
+ | | An MMC specification host controller | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_SD = 2;</code> | ||
+ | | An SD specification host controller | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_MMCI = 3;</code> | ||
+ | | An MMCI specification host controller | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_TYPE_MAX = 3;</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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDHCI_TYPE_MMC',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDHCI_TYPE_SD',</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>'SDHCI_TYPE_MMCI');</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''' <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''' <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> | ||
+ | | Host Controller supports SDMA specification | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_ADMA = $00000002;</code> | ||
+ | | Host Controller supports ADMA specification | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_SPI = $00000004;</code> | ||
+ | | Host Controller uses SPI interface | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_CRC_ENABLE = $00000008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_NON_STANDARD = $00000010;</code> | ||
+ | | Host Controller uses a non standard interface (not supporting SDHCI register layout) | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_AUTO_CMD12 = $00000020;</code> | ||
+ | | Host Controller supports Auto CMD12 (Stop Transmission) | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_AUTO_CMD23 = $00000040;</code> | ||
+ | | Host Controller supports Auto CMD23 (Set Block Count) | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_64_BIT_DMA = $00000080;</code> | ||
+ | | Host Controller supports 64-bit ADMA | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_EXTERNAL_DMA = $00000100;</code> | ||
+ | | Host Controller requires external DMA engine to perform transfers | ||
+ | |- | ||
+ | | <code>SDHCI_FLAG_BUS_ADDRESSES = $00000200;</code> | ||
+ | | Host Controller requires use of bus addresses for SDMA/ADMA transfers | ||
+ | |- | ||
+ | |} | ||
+ | </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''' <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_ARGUMENT2 = SDHCI_DMA_ADDRESS;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_32BIT_BLK_CNT = SDHCI_DMA_ADDRESS;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <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_AUTO_CMD_STATUS = $3C;</code> | ||
+ | | {SDHCI_ACMD12_ERR | ||
+ | |- | ||
+ | | <code>SDHCI_HOST_CONTROL2 = $3E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA_ADDRESS_HI = $5C;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''5D-65 reserved'' | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_SDR12 = $66;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_SDR25 = $68;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_SDR50 = $6A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_SDR104 = $6C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_DDR50 = $6E;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''6F-73 reserved'' | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_FOR_HS400 = $74;</code> | ||
+ | | Non-standard | ||
+ | |- | ||
+ | |colspan="2"|''75-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''' <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_AUTO_SEL = SDHCI_TRNS_AUTO_CMD12 or SDHCI_TRNS_AUTO_CMD23;</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''' <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''' <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''' <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> | ||
+ | | SDHCI_CD_STABLE | ||
+ | |- | ||
+ | | <code>SDHCI_CARD_DETECT_PIN_LEVEL = $00040000;</code> | ||
+ | | SDHCI_CD_LVL | ||
+ | |- | ||
+ | | <code>SDHCI_WRITE_PROTECT = $00080000;</code> | ||
+ | | Set if Write Enabled/Clear if Write Protected | ||
+ | |- | ||
+ | | <code>SDHCI_DATA_LEVEL_MASK = $00F00000;</code> | ||
+ | | SDHCI_DATA_LVL_MASK | ||
+ | |- | ||
+ | | <code>SDHCI_DATA_0_LEVEL_MASK = $00100000;</code> | ||
+ | | SDHCI_DATA_0_LVL_MASK | ||
+ | |- | ||
+ | | <code>SDHCI_CMD_LEVEL = $01000000;</code> | ||
+ | | SDHCI_CMD_LVL | ||
+ | |- | ||
+ | |} | ||
+ | </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''' <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_ADMA3 = $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''' <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''' <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''' <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_PROG_CLOCK_MODE = $0020;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_CARD_EN = $0004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_PLL_EN = $0008;</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''' <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''' <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_RETUNE = $00001000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_INT_CQE = $00004000;</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_AUTO_CMD_ERR= $01000000;</code> | ||
+ | | SDHCI_INT_ACMD12ERR | ||
+ | |- | ||
+ | | <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 or SDHCI_INT_AUTO_CMD_ERR);</code> | ||
+ | |- | ||
+ | |colspan="2"|<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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CQE_INT_ERR_MASK = (SDHCI_INT_ADMA_ERROR or SDHCI_INT_BUS_POWER or SDHCI_INT_DATA_END_BIT or SDHCI_INT_DATA_CRC or SDHCI_INT_DATA_TIMEOUT or SDHCI_INT_INDEX or SDHCI_INT_END_BIT or SDHCI_INT_CRC or SDHCI_INT_TIMEOUT);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CQE_INT_MASK = (SDHCI_CQE_INT_ERR_MASK or SDHCI_INT_CQE);</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 auto CMD status value''' <code> SDHCI_AUTO_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_AUTO_CMD_TIMEOUT = $00000002;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_AUTO_CMD_CRC = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_AUTO_CMD_END_BIT = $00000008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_AUTO_CMD_INDEX = $00000010;</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 control 2 value''' <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_UHS_MASK = $0007;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_UHS_SDR12 = $0000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_UHS_SDR25 = $0001;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_UHS_SDR50 = $0002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_UHS_SDR104 = $0003;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_UHS_DDR50 = $0004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_HS400 = $0005;</code> | ||
+ | | Non-standard | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_VDD_180 = $0008;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DRV_TYPE_MASK = $0030;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DRV_TYPE_B = $0000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DRV_TYPE_A = $0010;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DRV_TYPE_C = $0020;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_DRV_TYPE_D = $0030;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_EXEC_TUNING = $0040;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_TUNED_CLK = $0080;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CMD23_ENABLE = $0800;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_V4_MODE = $1000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_64BIT_ADDR = $2000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CTRL_PRESET_VAL_ENABLE = $8000;</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''' <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_V4 = $08000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_64BIT = $10000000;</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 1 value''' <code> SDHCI_SUPPORT_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_SUPPORT_SDR50 = $00000001;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_SUPPORT_SDR104 = $00000002;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SUPPORT_DDR50 = $00000004;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DRIVER_TYPE_A = $00000010;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DRIVER_TYPE_C = $00000020;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_DRIVER_TYPE_D = $00000040;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_RETUNING_TIMER_COUNT_MASK = $00000F00;</code> | ||
+ | | GENMASK(11,8) | ||
+ | |- | ||
+ | | <code>SDHCI_USE_SDR50_TUNING = $00002000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_RETUNING_MODE_MASK = $0000C000;</code> | ||
+ | | GENMASK(15,14) | ||
+ | |- | ||
+ | | <code>SDHCI_CLOCK_MUL_MASK = $00FF0000;</code> | ||
+ | | GENMASK(23,16) | ||
+ | |- | ||
+ | | <code>SDHCI_CAN_DO_ADMA3 = $08000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SUPPORT_HS400 = $80000000;</code> | ||
+ | | Non-standard | ||
+ | |- | ||
+ | |} | ||
+ | </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 max current value''' <code> SDHCI_MAX_CURRENT_* </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_CURRENT_LIMIT = $000000FF;</code> | ||
+ | | style="width: 50%;"|GENMASK(7,0) | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CURRENT_330_MASK = $000000FF;</code> | ||
+ | | GENMASK(7,0) | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CURRENT_300_MASK = $0000FF00;</code> | ||
+ | | GENMASK(15,8) | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CURRENT_180_MASK = $00FF0000;</code> | ||
+ | | GENMASK(23,16) | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_CURRENT_MULTIPLIER = 4;</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 preset value''' <code> SDHCI_PRESET_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_DRV_MASK = $0000C000;</code> | ||
+ | | style="width: 50%;"|GENMASK(15,14) | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_DRV_SHIFT = 14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_CLKGEN_SEL = 1 shl 10;</code> | ||
+ | | BIT(10) | ||
+ | |- | ||
+ | | <code>SDHCI_PRESET_SDCLK_FREQ_MASK = $000003FF;</code> | ||
+ | | GENMASK(9,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;">'''SDHCI host version value''' <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> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_400 = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_410 = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_SPEC_420 = 5;</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''' <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''' <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 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"| | ||
+ | |- | ||
+ | | <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 | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_BROKEN_64_BIT_DMA = (1 shl 9);</code> | ||
+ | | Controller does not support 64-bit DMA | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD = (1 shl 10);</code> | ||
+ | | Need clear transfer mode register before send cmd | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 = (1 shl 11);</code> | ||
+ | | Capability register bit-63 indicates HS400 support | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_TUNING_WORK_AROUND = (1 shl 12);</code> | ||
+ | | Forced tuned clock | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_SUPPORT_SINGLE = (1 shl 13);</code> | ||
+ | | Disable the block count for single block transactions | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_ACMD23_BROKEN = (1 shl 14);</code> | ||
+ | | Controller broken with using ACMD23 | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN = (1 shl 15);</code> | ||
+ | | Broken Clock divider zero in controller | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_RSP_136_HAS_CRC = (1 shl 16);</code> | ||
+ | | Controller has CRC in 136 bit Command Response | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_DISABLE_HW_TIMEOUT = (1 shl 17);</code> | ||
+ | | Disable HW timeout if the requested timeout is more than the maximum obtainable timeout | ||
+ | |- | ||
+ | | <code>SDHCI_QUIRK2_USE_32BIT_BLK_CNT = (1 shl 18);</code> | ||
+ | | 32-bit block count may not support eMMC where upper bits of CMD23 are used for other purposes. Support 16-bit block count by default otherwise, SDHCI_QUIRK2_USE_32BIT_BLK_CNT can be selected to use 32-bit block count | ||
+ | |- | ||
+ | |} | ||
+ | </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''' <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%;"|Default to 512K boundary | ||
+ | |- | ||
+ | | <code>SDHCI_DEFAULT_BOUNDARY_ARG = 7;</code> | ||
+ | | (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12) | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADMA2 32-bit DMA descriptor size''' <code> SDHCI_ADMA2_32_DESC_SIZE* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_32_DESC_SIZE = 8;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADMA2 data alignment''' <code> SDHCI_ADMA2_ALIGN* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_ALIGN = 4;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_MASK = (SDHCI_ADMA2_ALIGN - 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 ADMA2 descriptor alignment''' <code> SDHCI_ADMA2_DESC_ALIGN* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ALIGN = 8;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADMA2 64-bit DMA descriptor size''' <code> SDHCI_ADMA2_64_DESC_SIZE* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_64_DESC_SIZE = 12;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_64_DESC_V4_SIZE = 16;</code> | ||
+ | | Use 128-bit descriptor, if Host Version 4 Enable is set in the Host Control 2 register | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADMA2 descriptor attributes''' <code> SDHCI_ADMA2_DESC_ATTR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_VALID = $01;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_END = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_INT = $04;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_NOP = $00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_TRAN = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_ATTR_LINK = $30;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_TRAN_VALID = SDHCI_ADMA2_DESC_ATTR_TRAN or SDHCI_ADMA2_DESC_ATTR_VALID;</code> | ||
+ | | 0x21 | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_NOP_END_VALID = SDHCI_ADMA2_DESC_ATTR_NOP or SDHCI_ADMA2_DESC_ATTR_END or SDHCI_ADMA2_DESC_ATTR_VALID;</code> | ||
+ | | 0x3 | ||
+ | |- | ||
+ | | <code>SDHCI_ADMA2_DESC_END = SDHCI_ADMA2_DESC_ATTR_END;</code> | ||
+ | | 0x2 | ||
+ | |- | ||
+ | |} | ||
+ | </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 maximum segments''' <code> SDHCI_MAX_SEGS* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Assuming a 512KB maximum request size and a minimum 4KB page size | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SDHCI_MAX_SEGS = 128;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |||
+ | |} | ||
+ | </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''' <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%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | |||
− | + | '''MMC command''' | |
− | + | ||
− | '' | + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> |
+ | <code>PMMCCommand = ^TMMCCommand;</code> | ||
+ | |||
+ | <code>TMMCCommand = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Command Properties'' | ||
+ | |- | ||
+ | | <code>Command:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Argument:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ResponseType:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Response:array[0..3] of LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Status:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Data:PMMCData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Timeout:LongWord;</code> | ||
+ | | Milliseconds | ||
+ | |- | ||
+ | |colspan="2"|''Host Properties'' | ||
+ | |- | ||
+ | | <code>DataCompleted:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BusyCompleted:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TuningCompleted:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CommandCompleted:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMMCData = ^TMMCData;</code> | ||
+ | |||
+ | <code>TMMCData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Data Properties'' | ||
+ | |- | ||
+ | | <code>Data:Pointer;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Flags:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BlockSize:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BlockCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Host Properties'' | ||
+ | |- | ||
+ | | <code>BlockOffset:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BlocksRemaining:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BytesRemaining:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BytesTransfered:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card identification data (CID)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMMCCardIdentificationData = ^TMMCCardIdentificationData;</code> | ||
+ | |||
+ | <code>TMMCCardIdentificationData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: See: Section 5.2 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>ManufacturerId:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>OEMId:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ProductName:array[0..7] of Char;</code> | ||
+ | | Max 0 to 6, 1 extra for null terminator | ||
+ | |- | ||
+ | | <code>ProductRevision:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HardwareRevision:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FirmwareRevision:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ProductSerialNumber:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ManufacturingMonth:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ManufacturingYear:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CRC:Byte;</code> | ||
+ | | CRC7 checksum | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card specific erase data (CSD)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TMMCCardSpecificSDEraseData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: See: Section 5.3 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for CSD) | ||
+ | |- | ||
+ | | <code>EraseBlockEnable:Boolean;</code> | ||
+ | | Erase single block enable | ||
+ | |- | ||
+ | | <code>SectorSize:Byte;</code> | ||
+ | | Erase sector size | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card specific MMC22 erase data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TMMCCardSpecificMMC22EraseData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>SectorSize:Byte;</code> | ||
+ | | Erase sector size | ||
+ | |- | ||
+ | | <code>EraseGroupSize:Byte;</code> | ||
+ | | Erase group size | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card specific MMC31 erase data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TMMCCardSpecificMMC31EraseData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>EraseGroupSize:Byte;</code> | ||
+ | | Erase group size | ||
+ | |- | ||
+ | | <code>EraseGroupMultiplier:Byte;</code> | ||
+ | | Erase group size multiplier | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card specific erase data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TMMCCardSpecificEraseData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>case Integer of</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>0:(MMC22:TMMCCardSpecificMMC22EraseData);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>1:(MMC31:TMMCCardSpecificMMC31EraseData);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>2:(SD:TMMCCardSpecificSDEraseData);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC card specific data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMMCCardSpecificData = ^TMMCCardSpecificData;</code> | ||
+ | |||
+ | <code>TMMCCardSpecificData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Card Values'' | ||
+ | |- | ||
+ | | <code>CSDStructure:Byte;</code> | ||
+ | | CSD structure version | ||
+ | |- | ||
+ | | <code>SpecVersion:Byte;</code> | ||
+ | | System specification version (MMC/eMMC Only) | ||
+ | |- | ||
+ | | <code>TAAC:Byte;</code> | ||
+ | | Data read access-time-1 | ||
+ | |- | ||
+ | | <code>NSAC:Byte;</code> | ||
+ | | Data read access-time-2 in CLK cycles (NSAC*100) | ||
+ | |- | ||
+ | | <code>TransferSpeed:Byte;</code> | ||
+ | | Max. data transfer rate | ||
+ | |- | ||
+ | | <code>CCC:Word;</code> | ||
+ | | Card command classes | ||
+ | |- | ||
+ | | <code>ReadBlockLength:Byte;</code> | ||
+ | | Max. read data block length | ||
+ | |- | ||
+ | | <code>ReadBlockPartial:Boolean;</code> | ||
+ | | Partial blocks for read allowed | ||
+ | |- | ||
+ | | <code>WriteBlockMisalign:Boolean;</code> | ||
+ | | Write block misalignment | ||
+ | |- | ||
+ | | <code>ReadBlockMisalign:Boolean;</code> | ||
+ | | Read block misalignment | ||
+ | |- | ||
+ | | <code>DSRImplemented:Boolean;</code> | ||
+ | | DSR implemented | ||
+ | |- | ||
+ | | <code>DeviceSize:LongWord;</code> | ||
+ | | Device size | ||
+ | |- | ||
+ | | <code>VDDReadCurrentMin:Byte;</code> | ||
+ | | Max. read current @VDD min | ||
+ | |- | ||
+ | | <code>VDDReadCurrentMax:Byte;</code> | ||
+ | | Max. read current @VDD max | ||
+ | |- | ||
+ | | <code>VDDWriteCurrentMin:Byte;</code> | ||
+ | | Max. write current @VDD min | ||
+ | |- | ||
+ | | <code>VDDWriteCurrentMax:Byte;</code> | ||
+ | | Max. write current @VDD max | ||
+ | |- | ||
+ | | <code>DeviceSizeMultiplier:Byte;</code> | ||
+ | | Device size multiplier | ||
+ | |- | ||
+ | | <code>Erase:TMMCCardSpecificEraseData;</code> | ||
+ | | Erase group details | ||
+ | |- | ||
+ | | <code>WriteProtectGroupSize:Byte;</code> | ||
+ | | Write protect group size | ||
+ | |- | ||
+ | | <code>WriteProtectGroupEnable:Boolean;</code> | ||
+ | | Write protect group enable | ||
+ | |- | ||
+ | | <code>DefaultECC:Byte;</code> | ||
+ | | Manufacturer default ECC (MMC/eMMC Only) | ||
+ | |- | ||
+ | | <code>ReadToWriteFactor:Byte;</code> | ||
+ | | Write speed factor | ||
+ | |- | ||
+ | | <code>WriteBlockLength:Byte;</code> | ||
+ | | Max. write data block length | ||
+ | |- | ||
+ | | <code>WriteBlockPartial:Boolean;</code> | ||
+ | | Partial blocks for write allowed | ||
+ | |- | ||
+ | | <code>ContentProtectApplication:Boolean;</code> | ||
+ | | Content protection application (MMC/eMMC Only) | ||
+ | |- | ||
+ | | <code>FileFormatGroup:Byte;</code> | ||
+ | | File format group | ||
+ | |- | ||
+ | | <code>CopyFlag:Boolean;</code> | ||
+ | | Copy flag | ||
+ | |- | ||
+ | | <code>PermanentWriteProtect:Boolean;</code> | ||
+ | | Permanent write protection | ||
+ | |- | ||
+ | | <code>TemporaryWriteProtect:Boolean;</code> | ||
+ | | Temporary write protection | ||
+ | |- | ||
+ | | <code>FileFormat:Byte;</code> | ||
+ | | File format | ||
+ | |- | ||
+ | | <code>ECC:Byte;</code> | ||
+ | | ECC code (MMC/eMMC Only) | ||
+ | |- | ||
+ | | <code>CRC:Byte;</code> | ||
+ | | CRC | ||
+ | |- | ||
+ | |colspan="2"|''Calculated Values'' | ||
+ | |- | ||
+ | | <code>DataAccessTime:LongWord;</code> | ||
+ | | In Nanoseconds | ||
+ | |- | ||
+ | | <code>DataAccessClocks:Word;</code> | ||
+ | | In Clock cycles | ||
+ | |- | ||
+ | | <code>DataTransferRate:LongWord;</code> | ||
+ | | In Hz | ||
+ | |- | ||
+ | | <code>EraseSize:LongWord;</code> | ||
+ | | In Sectors | ||
+ | |- | ||
+ | | <code>BlockSize:LongWord;</code> | ||
+ | | "Normalized" Block Size | ||
+ | |- | ||
+ | | <code>BlockCount:LongWord;</code> | ||
+ | | In "Normalized" Blocks | ||
+ | |- | ||
+ | | <code>BlockShift:LongWord;</code> | ||
+ | | "Normalized" Block Shift | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC extended card specific data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMMCExtendedCardSpecificData = ^TMMCExtendedCardSpecificData;</code> | ||
+ | |||
+ | <code>TMMCExtendedCardSpecificData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Card Values'' | ||
+ | |- | ||
+ | | <code>Revision:Byte;</code> | ||
+ | | style="width: 50%;"|Extended CSD revision (192) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>CacheControl:Byte;</code> | ||
+ | | Control to turn the Cache ON/OFF (33) | ||
+ | |- | ||
+ | | <code>PowerOffNotification:Byte;</code> | ||
+ | | Power Off Notification (34) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PartitionSupport:Byte;</code> | ||
+ | | Partitioning Support (160) | ||
+ | |- | ||
+ | | <code>HardwareResetFunction:Byte;</code> | ||
+ | | H/W reset function (162]) | ||
+ | |- | ||
+ | | <code>WriteReliabilityParameter:Byte;</code> | ||
+ | | Write reliability parameter register (166]) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>RPMBSizeMult:Byte;</code> | ||
+ | | RPMB Size Multiplier (168) | ||
+ | |- | ||
+ | | <code>EraseGroupDef:Byte;</code> | ||
+ | | High-density erase group definition (175) | ||
+ | |- | ||
+ | | <code>PartConfig:Byte;</code> | ||
+ | | Partition configuration (179) | ||
+ | |- | ||
+ | | <code>ErasedMemoryContent:Byte;</code> | ||
+ | | Erased memory content (181) | ||
+ | |- | ||
+ | | <code>StrobeSupport:Byte;</code> | ||
+ | | Strobe Support (184) | ||
+ | |- | ||
+ | | <code>CSDStructure:Byte;</code> | ||
+ | | CSD STRUCTURE (194) | ||
+ | |- | ||
+ | | <code>CardType:Byte;</code> | ||
+ | | Device type (196) | ||
+ | |- | ||
+ | | <code>DriverStrength:Byte;</code> | ||
+ | | I/O Driver Strength (197) | ||
+ | |- | ||
+ | | <code>OutOfInterruptTime:Byte;</code> | ||
+ | | Out-of-interrupt busy timing (198) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>SectorCount:array[0..3] of Byte;</code> | ||
+ | | Sector Count (212)(4 bytes) | ||
+ | |- | ||
+ | | <code>SATimeout:Byte;</code> | ||
+ | | Sleep/awake timeout (217) | ||
+ | |- | ||
+ | | <code>HCEraseGapSize:Byte;</code> | ||
+ | | High-capacity write protect group size (221) | ||
+ | |- | ||
+ | | <code>ReliableSectors:Byte;</code> | ||
+ | | Reliable write sector count (222) | ||
+ | |- | ||
+ | | <code>EraseTimeoutMult:Byte;</code> | ||
+ | | High-capacity erase timeout (223) | ||
+ | |- | ||
+ | | <code>HCEraseGrpSize:Byte;</code> | ||
+ | | High-capacity erase unit size (224) | ||
+ | |- | ||
+ | | <code>SecTRIMMult:Byte;</code> | ||
+ | | Secure TRIM Multiplier (229) | ||
+ | |- | ||
+ | | <code>SecEraseMult:Byte;</code> | ||
+ | | Secure Erase Multiplier (230) | ||
+ | |- | ||
+ | | <code>SecFeatureSupport:Byte;</code> | ||
+ | | Secure Feature support (231) | ||
+ | |- | ||
+ | | <code>TRIMMult:Byte;</code> | ||
+ | | TRIM Multiplier (232) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PowerClass52MHz195:Byte;</code> | ||
+ | | Power class for 52 MHz at 1.95 V (200) | ||
+ | |- | ||
+ | | <code>PowerClass26MHz195:Byte;</code> | ||
+ | | Power class for 26 MHz at 1.95 V (201) | ||
+ | |- | ||
+ | | <code>PowerClass52MHz360:Byte;</code> | ||
+ | | Power class for 52 MHz at 3.6 V (202) | ||
+ | |- | ||
+ | | <code>PowerClass26MHz360:Byte;</code> | ||
+ | | Power class for 26 MHz at 3.6 V (203) | ||
+ | |- | ||
+ | | <code>PowerClass200MHz195:Byte;</code> | ||
+ | | Power class for 200MHz, at VCCQ = 1.3V, VCC = 3.6V (236) | ||
+ | |- | ||
+ | | <code>PowerClass200MHz360:Byte;</code> | ||
+ | | Power class for 200MHz at VCCQ = 1.95V, VCC = 3.6V (237) | ||
+ | |- | ||
+ | | <code>PowerClassDDR52MHz195:Byte;</code> | ||
+ | | Power class for 52MHz, DDR at VCC = 1.95V (238) | ||
+ | |- | ||
+ | | <code>PowerClassDDR52MHz360:Byte;</code> | ||
+ | | Power class for 52MHz, DDR at VCC = 3.6V (239) | ||
+ | |- | ||
+ | | <code>PowerClassDDR200MHz360:Byte;</code> | ||
+ | | Power class for 200MHz, DDR at VCC = 3.6V (253) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>BKOPSStatus:Byte;</code> | ||
+ | | Background operations status (246) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FirmwareVersion:array[0..MMC_FIRMWARE_VERSION_LEN - 1] of Byte;</code> | ||
+ | | (254) (8 bytes) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>PreEndOfLifeInfo:Byte;</code> | ||
+ | | Pre EOL information (267) | ||
+ | |- | ||
+ | | <code>DeviceLifetimeEstimateA:Byte;</code> | ||
+ | | Device life time estimation type A (268) | ||
+ | |- | ||
+ | | <code>DeviceLifetimeEstimateB:Byte;</code> | ||
+ | | Device life time estimation type B (269) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>MaxPackedWrites:Byte;</code> | ||
+ | | Max packed write commands (500) | ||
+ | |- | ||
+ | | <code>MaxPackedReads:Byte;</code> | ||
+ | | Max packed read commands (501) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Calculated Values'' | ||
+ | |- | ||
+ | | <code>Sectors:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SleepAwakeTime:LongWord;</code> | ||
+ | | 100ns units | ||
+ | |- | ||
+ | | <code>PartitionSwitchTime:LongWord;</code> | ||
+ | | ms | ||
+ | |- | ||
+ | | <code>GenericCMD6Time:LongWord;</code> | ||
+ | | 10ms units | ||
+ | |- | ||
+ | | <code>PowerOffLongTime:LongWord;</code> | ||
+ | | ms | ||
+ | |- | ||
+ | | <code>HCEraseSize:LongWord;</code> | ||
+ | | Sectors | ||
+ | |- | ||
+ | | <code>HCEraseTimeout:LongWord;</code> | ||
+ | | Milliseconds | ||
+ | |- | ||
+ | | <code>DataSectorSize:LongWord;</code> | ||
+ | | 512 bytes or 4KB | ||
+ | |- | ||
+ | | <code>DataTagUnitSize:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HSMaxRate:LongWord;</code> | ||
+ | | Hz | ||
+ | |- | ||
+ | | <code>HS200MaxRate:LongWord;</code> | ||
+ | | Hz | ||
+ | |- | ||
+ | | <code>AvailableTypes:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BootPartitionSize:UInt64;</code> | ||
+ | | Bytes | ||
+ | |- | ||
+ | | <code>EnhancedAreaOffset:UInt64;</code> | ||
+ | | Bytes | ||
+ | |- | ||
+ | | <code>EnhancedAreaSize:UInt64;</code> | ||
+ | | KB | ||
+ | |- | ||
+ | | <code>CacheSize:LongWord;</code> | ||
+ | | KB | ||
+ | |- | ||
+ | | <code>PartitionSettingCompleted:Boolean;</code> | ||
+ | | Enable Bit | ||
+ | |- | ||
+ | | <code>TRIMTimeout:LongWord;</code> | ||
+ | | Milliseconds | ||
+ | |- | ||
+ | | <code>PartitionSizes:array[0..MMC_NUM_GP_PARTITION - 1] of UInt64;</code> | ||
+ | | Bytes | ||
+ | |- | ||
+ | | <code>BootReadOnlySupport:LongWord;</code> | ||
+ | | Read Only Lock Support | ||
+ | |- | ||
+ | | <code>BootReadOnlyLockable:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FieldFirmwareUpdate:Boolean;</code> | ||
+ | | Firmware upgrade support | ||
+ | |- | ||
+ | | <code>CommandQueueSupport:Boolean;</code> | ||
+ | | Command Queue supported | ||
+ | |- | ||
+ | | <code>CommandQueueDepth:LongWord;</code> | ||
+ | | Command Queue depth | ||
+ | |- | ||
+ | | <code>BackgroundOperations:Boolean;</code> | ||
+ | | BKOPS Supported | ||
+ | |- | ||
+ | | <code>ManualBKOPSEnable:Boolean;</code> | ||
+ | | Manual BKOPS Supported | ||
+ | |- | ||
+ | | <code>AutoBKOPSEnable:Boolean;</code> | ||
+ | | Auto BKOPS Supported | ||
+ | |- | ||
+ | | <code>HPI:Boolean;</code> | ||
+ | | HPI (High Priority Interrupt) Supported | ||
+ | |- | ||
+ | | <code>HPIEnable:Boolean;</code> | ||
+ | | HPI Enabled | ||
+ | |- | ||
+ | | <code>HPICommand:LongWord;</code> | ||
+ | | CMD used as HPI | ||
+ | |- | ||
+ | | <code>RPMBSize:UInt64;</code> | ||
+ | | Bytes | ||
+ | |- | ||
+ | | <code>EnhancedRPMBSupport:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ErasedByte:Byte;</code> | ||
+ | | Value after Erase | ||
+ | |- | ||
+ | | <code>FeatureSupport:LongWord;</code> | ||
+ | | Version specific features (eg MMC_DISCARD_FEATURE) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SD status data (SSR)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDStatusData = ^TSDStatusData;</code> | ||
+ | |||
+ | <code>TSDStatusData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for MMC Device) | ||
+ | |- | ||
+ | |colspan="2"|''Card Values'' | ||
+ | |- | ||
+ | | <code>BusWidth:Byte;</code> | ||
+ | | Shows the currently defined data bus width that was defined by SET_BUS_WIDTH command | ||
+ | |- | ||
+ | | <code>SecuredMode:Boolean;</code> | ||
+ | | Card is in Secured Mode of operation (refer to the "Part 3 Security Specification") | ||
+ | |- | ||
+ | | <code>CardType:Word;</code> | ||
+ | | In the future, the 8 LSBs will be used to define different variations of an SD Memory Card (Each bit will define different SD Types). The 8 MSBs will be used to define SD Cards that do not comply with the Physical Layer Specification | ||
+ | |- | ||
+ | | <code>ProtectedSize:LongWord;</code> | ||
+ | | Size of protected area | ||
+ | |- | ||
+ | | <code>SpeedClass:Byte;</code> | ||
+ | | Speed Class of the card | ||
+ | |- | ||
+ | | <code>PerformanceMove:Byte;</code> | ||
+ | | Performance of move indicated by 1 [MB/s] step | ||
+ | |- | ||
+ | | <code>EraseSize:Word;</code> | ||
+ | | Number of AUs to be erased at a time | ||
+ | |- | ||
+ | | <code>EraseTimeout:Byte;</code> | ||
+ | | Timeout value for erasing areas specified by UNIT_OF_ERASE_AU | ||
+ | |- | ||
+ | | <code>EraseOffset:Byte;</code> | ||
+ | | Fixed offset value added to erase time | ||
+ | |- | ||
+ | | <code>UHSSpeedGrade:Byte;</code> | ||
+ | | Speed Grade for UHS mode | ||
+ | |- | ||
+ | |colspan="2"|''Calculated Values'' | ||
+ | |- | ||
+ | | <code>AllocationUnitSize:Byte;</code> | ||
+ | | Size of Allocation Unit | ||
+ | |- | ||
+ | | <code>UHSAllocationUnitSize:Byte;</code> | ||
+ | | Size of Allocation Unit for UHS mode | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SD switch data''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDSwitchData = ^TSDSwitchData;</code> | ||
+ | |||
+ | <code>TSDSwitchData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"|''Card Values'' | ||
+ | |- | ||
+ | | <code>MaximumCurrent:Word;</code> | ||
+ | | Maximum Current/Power Consumption | ||
+ | |- | ||
+ | | <code>Group6Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 6 | ||
+ | |- | ||
+ | | <code>Group5Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 5 | ||
+ | |- | ||
+ | | <code>Group4Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 4 | ||
+ | |- | ||
+ | | <code>Group3Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 3 | ||
+ | |- | ||
+ | | <code>Group2Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 2 | ||
+ | |- | ||
+ | | <code>Group1Support:Word;</code> | ||
+ | | Support Bits of Functions in Function Group 1 | ||
+ | |- | ||
+ | | <code>Group6Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 6 | ||
+ | |- | ||
+ | | <code>Group5Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 5 | ||
+ | |- | ||
+ | | <code>Group4Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 4 | ||
+ | |- | ||
+ | | <code>Group3Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 3 | ||
+ | |- | ||
+ | | <code>Group2Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 2 | ||
+ | |- | ||
+ | | <code>Group1Selection:Byte;</code> | ||
+ | | Function Selection of Function Group 1 | ||
+ | |- | ||
+ | | <code>StructureVersion:Byte;</code> | ||
+ | | Data Structure Version | ||
+ | |- | ||
+ | | <code>Group6BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 6 | ||
+ | |- | ||
+ | | <code>Group5BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 5 | ||
+ | |- | ||
+ | | <code>Group4BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 4 | ||
+ | |- | ||
+ | | <code>Group3BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 3 | ||
+ | |- | ||
+ | | <code>Group2BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 2 | ||
+ | |- | ||
+ | | <code>Group1BusyStatus:Word;</code> | ||
+ | | Busy Status of functions in group 1 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SD configuration data (SCR)''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDConfigurationData = ^TSDConfigurationData;</code> | ||
+ | |||
+ | <code>TSDConfigurationData = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for MMC Device) | ||
+ | |- | ||
+ | |colspan="2"|''Card Values'' | ||
+ | |- | ||
+ | | <code>SCRStructure:Byte;</code> | ||
+ | | SCR Structure version | ||
+ | |- | ||
+ | | <code>SpecVersion:Byte;</code> | ||
+ | | SD Memory Card - Spec. Version | ||
+ | |- | ||
+ | | <code>DataAfterErase:Byte;</code> | ||
+ | | Data status after erases | ||
+ | |- | ||
+ | | <code>Security:Byte;</code> | ||
+ | | CPRM Security Support | ||
+ | |- | ||
+ | | <code>BusWidths:Byte;</code> | ||
+ | | DAT Bus widths supported | ||
+ | |- | ||
+ | | <code>SpecVersion3:Boolean;</code> | ||
+ | | Spec. Version 3.00 or higher | ||
+ | |- | ||
+ | | <code>ExtendedSecurity:Byte;</code> | ||
+ | | Extended Security Support | ||
+ | |- | ||
+ | | <code>SpecVersion4:Boolean;</code> | ||
+ | | Spec. Version 4.00 or higher | ||
+ | |- | ||
+ | | <code>CommandSupport:Byte;</code> | ||
+ | | Command Support bits | ||
+ | |- | ||
+ | |colspan="2"|''Calculated Values'' | ||
+ | |- | ||
+ | | <code>ErasedByte:Byte;</code> | ||
+ | | Value after Erase | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC device types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PMMCDevice = ^TMMCDevice;</code> | ||
+ | |||
+ | <code>TMMCDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this MMC | ||
+ | |- | ||
+ | |colspan="2"|''MMC Properties'' | ||
+ | |- | ||
+ | | <code>MMCId:LongWord;</code> | ||
+ | | Unique Id of this MMC in the MMC table | ||
+ | |- | ||
+ | | <code>MMCState:LongWord;</code> | ||
+ | | MMC state (eg MMC_STATE_INSERTED) | ||
+ | |- | ||
+ | | <code>DeviceInitialize:TMMCDeviceInitialize;</code> | ||
+ | | A Device specific DeviceInitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceDeinitialize:TMMCDeviceDeinitialize;</code> | ||
+ | | A Device specific DeviceDeinitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceGetCardDetect:TMMCDeviceGetCardDetect;</code> | ||
+ | | A Device specific DeviceGetCardDetect method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceGetWriteProtect:TMMCDeviceGetWriteProtect;</code> | ||
+ | | A Device specific DeviceGetWriteProtect method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSendCommand:TMMCDeviceSendCommand;</code> | ||
+ | | A Device specific DeviceSendCommand method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetIOS:TMMCDeviceSetIOS;</code> | ||
+ | | A Device specific DeviceSetIOS method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>CommandCount:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CommandErrors:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Device lock | ||
+ | |- | ||
+ | | <code>Version:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Clock:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Timing:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BusWidth:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>DriverType:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SignalVoltage:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Voltages:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Capabilities:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Capabilities2:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EraseSize:LongWord;</code> | ||
+ | | Erase Size in Sectors | ||
+ | |- | ||
+ | | <code>EraseShift:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>EraseArgument:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>PreferredEraseSize:LongWord;</code> | ||
+ | | Preferred Erase Size in Sectors | ||
+ | |- | ||
+ | | <code>EnhancedStrobe:LongBool;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Register Properties'' | ||
+ | |- | ||
+ | |colspan="2"|See: Table 3-2: SD Memory Card Registers of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>InterfaceCondition:LongWord;</code> | ||
+ | | Interface Condition Result | ||
+ | |- | ||
+ | | <code>OperationCondition:LongWord;</code> | ||
+ | | Operation Condition Register (OCR) See: Section 5.1 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>RelativeCardAddress:LongWord;</code> | ||
+ | | Relative Card Address (RCA) (Word) See: Section 5.4 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>CardSpecific:array[0..3] of LongWord;</code> | ||
+ | | Card Specific Data (CSD) See: Section 5.3 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>CardIdentification:array[0..3] of LongWord;</code> | ||
+ | | Card Identification Data (CID) See: Section 5.2 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>ExtendedCardSpecific:PByte;</code> | ||
+ | | Extended Card Specific Data (EXTCSD) See: Section 7.4 of Embedded Multi-Media Card (eMMC) Electrical Standard 5.1 | ||
+ | |- | ||
+ | | <code>CardStatus:LongWord;</code> | ||
+ | | Card Status Register (CSR) See: Section 4.10.1 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>DriverStage:LongWord;</code> | ||
+ | | Driver Stage Register (DSR) (Word) See: Section 5.5 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>SDStatus:array[0..15] of LongWord;</code> | ||
+ | | SD Status Register (SSR) See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>SDSwitch:array[0..15] of LongWord;</code> | ||
+ | | SD Switch Status See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | | <code>SDConfiguration:array[0..3] of LongWord;</code> | ||
+ | | SD Configuration Register (SCR) See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 | ||
+ | |- | ||
+ | |colspan="2"|''Configuration Properties'' | ||
+ | |- | ||
+ | |colspan="2"|Note: 16 bytes instead of 8 to allow correct operation of MMCExtractBits, offset handled by SDDeviceSendSDConfiguration. | ||
+ | |- | ||
+ | | <code>CardSpecificData:TMMCCardSpecificData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>CardIdentificationData:TMMCCardIdentificationData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ExtendedCardSpecificData:TMMCExtendedCardSpecificData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDStatusData:TSDStatusData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDSwitchData:TSDSwitchData;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>SDConfigurationData:TSDConfigurationData;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''SDIO Properties'' | ||
+ | |- | ||
+ | | <code>CCCR:PSDIOCCCR;</code> | ||
+ | | SDIO Common Card Register Information | ||
+ | |- | ||
+ | | <code>CIS:PSDIOCIS;</code> | ||
+ | | SDIO Common CIS (Card Information Structure) Information | ||
+ | |- | ||
+ | | <code>Tuples:PSDIOTuple;</code> | ||
+ | | SDIO CIS (Card Information Structure) tuples on this MMC | ||
+ | |- | ||
+ | | <code>SDIOCount:LongWord;</code> | ||
+ | | SDIO function count for this MMC (Where Applicable) | ||
+ | |- | ||
+ | | <code>SDIOFunctions:array[0..SDIO_MAX_FUNCTIONS - 1] of PSDIOFunction;</code> | ||
+ | | SDIO functions on this MMC (Where Applicable) | ||
+ | |- | ||
+ | | <code>SDIOInterruptFunction:PSDIOFunction;</code> | ||
+ | | SDIO function for all interrupts (If only one interrupt is registered) | ||
+ | |- | ||
+ | |colspan="2"|''Storage Properties'' | ||
+ | |- | ||
+ | | <code>Storage:PStorageDevice;</code> | ||
+ | | The Storage entry for this MMC (Where Applicable) | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PMMCDevice;</code> | ||
+ | | Previous entry in MMC table | ||
+ | |- | ||
+ | | <code>Next:PMMCDevice;</code> | ||
+ | | Next entry in MMC table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''MMC enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCEnumerate = function(MMC:PMMCDevice; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device initialize''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceInitialize = function(MMC:PMMCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device deinitialize''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceDeinitialize = function(MMC:PMMCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device get card detect''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceGetCardDetect = function(MMC:PMMCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device get write protect''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceGetWriteProtect = function(MMC:PMMCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device send command''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceSendCommand = function(MMC:PMMCDevice; Command:PMMCCommand):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''MMC device set IOS''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TMMCDeviceSetIOS = function(MMC:PMMCDevice):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO CCCR''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDIOCCCR = ^TSDIOCCCR;</code> | ||
+ | |||
+ | <code>TSDIOCCCR = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''SDIO Properties'' | ||
+ | |- | ||
+ | | <code>CCCRVersion:Byte;</code> | ||
+ | | style="width: 50%;"|CCCR (Card Common Control Register) Version (00h) | ||
+ | |- | ||
+ | | <code>SDIOVersion:Byte;</code> | ||
+ | | SDIO Specification Version (00h) | ||
+ | |- | ||
+ | | <code>SDVersion:Byte;</code> | ||
+ | | SD Specification Version (04h) | ||
+ | |- | ||
+ | | <code>CCCRCapabilities:Byte;</code> | ||
+ | | CCCR Capabilities Register (08h) | ||
+ | |- | ||
+ | | <code>CCCRPowerControl:Byte;</code> | ||
+ | | CCCR Power Control Register (12h) | ||
+ | |- | ||
+ | | <code>CCCRBusSpeed:Byte;</code> | ||
+ | | CCCR Bus Speed Select Register (13h) | ||
+ | |- | ||
+ | | <code>CCCRUHSSupport:Byte;</code> | ||
+ | | CCCR UHS-I Support Register (14h) | ||
+ | |- | ||
+ | | <code>CCCRDriverStrength:Byte;</code> | ||
+ | | CCCR Driver Strength Register (15h) | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>MultiBlock:Boolean;</code> | ||
+ | | Card Capability Multi Block Transfer (SMB) | ||
+ | |- | ||
+ | | <code>LowSpeed:Boolean;</code> | ||
+ | | Card Capability Low Speed Card (LSC) | ||
+ | |- | ||
+ | | <code>WideBus:Boolean;</code> | ||
+ | | Card Capability 4-bit Mode for Low Speed Card (4BLS) | ||
+ | |- | ||
+ | | <code>HighPower:Boolean;</code> | ||
+ | | Support Master Power Control (SMPC) | ||
+ | |- | ||
+ | | <code>HighSpeed:Boolean;</code> | ||
+ | | Support High Speed (SHS) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDIO CIS''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDIOCIS = ^TSDIOCIS;</code> | ||
+ | |||
+ | <code>TSDIOCIS = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Vendor:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Device:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>BlockSize:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>MaxClock:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDIO tuple''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDIOTuple = ^TSDIOTuple;</code> | ||
+ | |||
+ | <code>TSDIOTuple = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Next:PSDIOTuple;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Code:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Size:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Data:array[0..0] of Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDIO function interrupt handler''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDIOInterruptHandler = procedure(Func:PSDIOFunction);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO function enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDIOFunctionEnumerate = function(Func:PSDIOFunction; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO function''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>FSDIOFunction = ^TSDIOFunction;</code> | ||
+ | |||
+ | <code>TSDIOFunction = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Function Properties'' | ||
+ | |- | ||
+ | | <code>SDIOState:LongWord;</code> | ||
+ | | SDIO function state (eg SDIO_STATE_ATTACHED) | ||
+ | |- | ||
+ | | <code>SDIOStatus:LongWord;</code> | ||
+ | | SDIO function status (eg SDIO_STATUS_BOUND) | ||
+ | |- | ||
+ | | <code>MMC:PMMCDevice;</code> | ||
+ | | The MMC device for this function | ||
+ | |- | ||
+ | | <code>Number:LongWord;</code> | ||
+ | | The function number | ||
+ | |- | ||
+ | | <code>ClassId:Byte;</code> | ||
+ | | Standard class Id | ||
+ | |- | ||
+ | | <code>VendorId:Word;</code> | ||
+ | | Vendor Id | ||
+ | |- | ||
+ | | <code>DeviceId:Word;</code> | ||
+ | | Device Id | ||
+ | |- | ||
+ | | <code>BlockSize:LongWord;</code> | ||
+ | | Current block size | ||
+ | |- | ||
+ | | <code>MaxBlockSize:LongWord;</code> | ||
+ | | Maximum block size | ||
+ | |- | ||
+ | | <code>EnableTimeout:LongWord;</code> | ||
+ | | Function enable timeout | ||
+ | |- | ||
+ | | <code>Handler:TSDIOInterruptHandler;</code> | ||
+ | | Interrupt handler for this function | ||
+ | |- | ||
+ | | <code>DMABuffer:Pointer;</code> | ||
+ | | DMA compatible buffer for small reads and writes | ||
+ | |- | ||
+ | | <code>Tuples:PSDIOTuple;</code> | ||
+ | | CIS (Card Information Structure) tuples for this function | ||
+ | |- | ||
+ | | <code>Driver:PSDIODriver;</code> | ||
+ | | Driver this function is bound to, if any | ||
+ | |- | ||
+ | | <code>DriverData:Pointer;</code> | ||
+ | | Private data for the driver of this SDIO device | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDIO driver enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDIODriverEnumerate = function(Driver:PSDIODriver;Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO driver bind callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDIODriverBind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO driver unbind callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDIODriverUnbind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDIO driver''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDIODriver = ^TSDIODriver;</code> | ||
+ | |||
+ | <code>TSDIODriver = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Driver:TDriver;</code> | ||
+ | | style="width: 50%;"|The Driver entry for this SDIO Driver | ||
+ | |- | ||
+ | |colspan="2"|''SDIO Properties'' | ||
+ | |- | ||
+ | | <code>DriverBind:TSDIODriverBind;</code> | ||
+ | | A Driver specific DriverBind method implementing the standard SDIO driver interface | ||
+ | |- | ||
+ | | <code>DriverUnbind:TSDIODriverUnbind;</code> | ||
+ | | A Driver specific DriverUnbind method implementing the standard SDIO driver interface | ||
+ | |- | ||
+ | |colspan="2"|''Interface Properties'' | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Driver lock | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PSDIODriver;</code> | ||
+ | | Previous entry in Driver table | ||
+ | |- | ||
+ | | <code>Next:PSDIODriver;</code> | ||
+ | | Next entry in Driver table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDHCI ADMA2 32-bit descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDHCIADMA2Descriptor32 = ^TSDHCIADMA2Descriptor32;</code> | ||
+ | |||
+ | <code>TSDHCIADMA2Descriptor32 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: ADMA2 Descriptor Format - SD Host Controller Simplified Specification Version 4.20 | ||
+ | |- | ||
+ | | <code>Command:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Len:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Address:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDHCI ADMA2 64-bit descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDHCIADMA2Descriptor64 = ^TSDHCIADMA2Descriptor64;</code> | ||
+ | |||
+ | <code>TSDHCIADMA2Descriptor64 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See: ADMA2 Descriptor Format - SD Host Controller Simplified Specification Version 4.20 | ||
+ | |- | ||
+ | |colspan="2"|Note: 12-byte descriptor can't always be 8-byte aligned | ||
+ | |- | ||
+ | | <code>Command:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Len:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>AddressLow:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>AddressHigh:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDHCI ADMA2 64-bit V4 descriptor''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDHCIADMA2Descriptor64v4 = ^TSDHCIADMA2Descriptor64v4;</code> | ||
+ | |||
+ | <code>TSDHCIADMA2Descriptor64v4 = packed record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>Command:Word;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Len:Word;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>AddressLow:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>AddressHigh:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Reserved:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDHCI host types''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSDHCIHost = ^TSDHCIHost;</code> | ||
+ | |||
+ | <code>TSDHCIHost = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Device Properties'' | ||
+ | |- | ||
+ | | <code>Device:TDevice;</code> | ||
+ | | The Device entry for this SDHCI | ||
+ | |- | ||
+ | |colspan="2"|''SDHCI Properties'' | ||
+ | |- | ||
+ | | <code>SDHCIId:LongWord;</code> | ||
+ | | Unique Id of this SDHCI in the SDHCI table | ||
+ | |- | ||
+ | | <code>SDHCIState:LongWord;</code> | ||
+ | | SDHCI state (eg SDHCI_STATE_ENABLED) | ||
+ | |- | ||
+ | | <code>HostStart:TSDHCIHostStart;</code> | ||
+ | | A Host specific HostStart method implementing a standard SDHCI host interface | ||
+ | |- | ||
+ | | <code>HostStop:TSDHCIHostStop;</code> | ||
+ | | A Host specific HostStop method implementing a standard SDHCI host interface | ||
+ | |- | ||
+ | | <code>HostLock:TSDHCIHostLock;</code> | ||
+ | | A Host specific HostLock method implementing a standard SDHCI host interface | ||
+ | |- | ||
+ | | <code>HostUnlock:TSDHCIHostUnlock;</code> | ||
+ | | A Host specific HostUnlock method implementing a standard SDHCI host interface | ||
+ | |- | ||
+ | | <code>HostSignal:TSDHCIHostSignal;</code> | ||
+ | | A Host specific HostSignal method implementing a standard SDHCI host interface | ||
+ | |- | ||
+ | | <code>HostReadByte:TSDHCIHostReadByte;</code> | ||
+ | | A Host specific HostReadByte method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostReadWord:TSDHCIHostReadWord;</code> | ||
+ | | A Host specific HostReadWord method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostReadLong:TSDHCIHostReadLong;</code> | ||
+ | | A Host specific HostReadLong method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostWriteByte:TSDHCIHostWriteByte;</code> | ||
+ | | A Host specific HostWriteByte method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostWriteWord:TSDHCIHostWriteWord;</code> | ||
+ | | A Host specific HostWriteWord method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostWriteLong:TSDHCIHostWriteLong;</code> | ||
+ | | A Host specific HostWriteLong method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostReset:TSDHCIHostReset;</code> | ||
+ | | A Host specific HostReset method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostHardwareReset:TSDHCIHostHardwareReset;</code> | ||
+ | | A Host specific HostHardwareReset method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetPower:TSDHCIHostSetPower;</code> | ||
+ | | A Host specific HostSetPower method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetClock:TSDHCIHostSetClock;</code> | ||
+ | | A Host specific HostSetClock method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetTiming:TSDHCIHostSetTiming;</code> | ||
+ | | A Host specific HostSetTiming method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetBusWidth:TSDHCIHostSetBusWidth;</code> | ||
+ | | A Host specific HostSetBusWidth method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetClockDivider:TSDHCIHostSetClockDivider;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HostSetControlRegister:TSDHCIHostSetControlRegister;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>HostPrepareDMA:TSDHCIHostPrepareDMA;</code> | ||
+ | | A Host specific HostPrepareDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostStartDMA:TSDHCIHostStartDMA;</code> | ||
+ | | A Host specific HostStartDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostStopDMA:TSDHCIHostStopDMA;</code> | ||
+ | | A Host specific HostStopDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostSetupCardIRQ:TSDHCIHostSetupCardIRQ;</code> | ||
+ | | A Host specific HostSetupCardIRQ method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>HostCompleteCardIRQ:TSDHCIHostCompleteCardIRQ;</code> | ||
+ | | A Host specific HostCompleteCardIRQ method implementing a standard SDHCI host interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceInitialize:TMMCDeviceInitialize;</code> | ||
+ | | A Device specific DeviceInitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceDeinitialize:TMMCDeviceDeinitialize;</code> | ||
+ | | A Device specific DeviceDeinitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceGetCardDetect:TMMCDeviceGetCardDetect;</code> | ||
+ | | A Device specific DeviceGetCardDetect method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceGetWriteProtect:TMMCDeviceGetWriteProtect;</code> | ||
+ | | A Device specific DeviceGetWriteProtect method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSendCommand:TMMCDeviceSendCommand;</code> | ||
+ | | A Device specific DeviceSendCommand method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | | <code>DeviceSetIOS:TMMCDeviceSetIOS;</code> | ||
+ | | A Device specific DeviceSetIOS method implementing a standard MMC device interface (Or nil if the default method is suitable) | ||
+ | |- | ||
+ | |colspan="2"|''Driver Properties'' | ||
+ | |- | ||
+ | | <code>Spin:TSpinHandle;</code> | ||
+ | | Host lock (Spin) for use by interrupt handlers | ||
+ | |- | ||
+ | | <code>Lock:TMutexHandle;</code> | ||
+ | | Host lock (Mutex) for use by other functions | ||
+ | |- | ||
+ | | <code>Address:Pointer;</code> | ||
+ | | Host register base address | ||
+ | |- | ||
+ | | <code>Version:LongWord;</code> | ||
+ | | Host version information | ||
+ | |- | ||
+ | | <code>Quirks:LongWord;</code> | ||
+ | | Host quirks/bugs flags | ||
+ | |- | ||
+ | | <code>Quirks2:LongWord;</code> | ||
+ | | Host additional quirks/bugs flags | ||
+ | |- | ||
+ | | <code>Clock:LongWord;</code> | ||
+ | | Host current clock | ||
+ | |- | ||
+ | | <code>Power:LongWord;</code> | ||
+ | | Host current power | ||
+ | |- | ||
+ | | <code>Timing:LongWord;</code> | ||
+ | | Host current timing | ||
+ | |- | ||
+ | | <code>BusWidth:LongWord;</code> | ||
+ | | Host current bus width | ||
+ | |- | ||
+ | | <code>Interrupts:LongWord;</code> | ||
+ | | Host interrupts to be handled | ||
+ | |- | ||
+ | | <code>Voltages:LongWord;</code> | ||
+ | | Host configured voltage flags | ||
+ | |- | ||
+ | | <code>Capabilities:LongWord;</code> | ||
+ | | Host configured capabilities flags | ||
+ | |- | ||
+ | | <code>Capabilities2:LongWord;</code> | ||
+ | | Host configured additional capabilities flags | ||
+ | |- | ||
+ | | <code>TimeoutFrequency:LongWord;</code> | ||
+ | | Host configured timeout clock frequency (KHz) | ||
+ | |- | ||
+ | | <code>MinimumFrequency:LongWord;</code> | ||
+ | | Host configured minimum frequency (Hz) | ||
+ | |- | ||
+ | | <code>MaximumFrequency:LongWord;</code> | ||
+ | | Host configured maximum frequency (Hz) | ||
+ | |- | ||
+ | | <code>MaximumBlockSize:LongWord;</code> | ||
+ | | Host configured maximum block size | ||
+ | |- | ||
+ | | <code>MaximumBlockCount:LongWord;</code> | ||
+ | | Host configured maximum block count | ||
+ | |- | ||
+ | | <code>MaximumRequestSize:LongWord;</code> | ||
+ | | Host configured maximum request size | ||
+ | |- | ||
+ | | <code>MaximumBusyTimeout:LongWord;</code> | ||
+ | | Host configured maximum busy timeout (Milliseconds) | ||
+ | |- | ||
+ | | <code>MinimumDMASize:LongWord;</code> | ||
+ | | Minimum size for DMA read or write (Use PIO if less) | ||
+ | |- | ||
+ | | <code>MaximumPIOBlocks:LongWord;</code> | ||
+ | | Maximum blocks for PIO read or write (Use DMA if greater) | ||
+ | |- | ||
+ | | <code>PresetEnabled:LongBool;</code> | ||
+ | | Version 3.00 Preset Values Enabled (If applicable) | ||
+ | |- | ||
+ | | <code>CardIRQEnabled:LongBool;</code> | ||
+ | | SDIO card interrupt is enabled | ||
+ | |- | ||
+ | | <code>CardIRQWorker:TWorkerHandle;</code> | ||
+ | | SDIO card interrupt current worker | ||
+ | |- | ||
+ | | <code>CardIRQDevice:PMMCDevice;</code> | ||
+ | | SDIO card interrupt device | ||
+ | |- | ||
+ | | <code>CardIRQCount:LongWord;</code> | ||
+ | | SDIO card interrupt function registered count | ||
+ | |- | ||
+ | | <code>Command:PMMCCommand;</code> | ||
+ | | Currently processing command | ||
+ | |- | ||
+ | | <code>Wait:TSemaphoreHandle;</code> | ||
+ | | Command completed semaphore | ||
+ | |- | ||
+ | | <code>UseDMA:LongBool;</code> | ||
+ | | Use DMA for the current data transfer | ||
+ | |- | ||
+ | | <code>DMAData:TDMAData;</code> | ||
+ | | External DMA data descriptor for current request (If applicable) | ||
+ | |- | ||
+ | | <code>DMAWait:TSemaphoreHandle;</code> | ||
+ | | External DMA completed semaphore | ||
+ | |- | ||
+ | | <code>DMASlave:LongWord;</code> | ||
+ | | External DMA slave (DREQ) Id for this device (If applicable) | ||
+ | |- | ||
+ | | <code>DMABuffer:Pointer;</code> | ||
+ | | DMA bounce buffer for the current request (If applicable) | ||
+ | |- | ||
+ | | <code>DMADirection:LongWord;</code> | ||
+ | | DMA data direction for current request (If applicable) | ||
+ | |- | ||
+ | | <code>SDMABoundary:LongWord;</code> | ||
+ | | SDMA buffer boundary argument | ||
+ | |- | ||
+ | | <code>ADMATable:PSDHCIADMA2Descriptor64v4;</code> | ||
+ | | ADMA descriptors for current request (If applicable) | ||
+ | |- | ||
+ | | <code>ADMABuffer:Pointer;</code> | ||
+ | | ADMA alignment buffers for the current request (If applicable) | ||
+ | |- | ||
+ | | <code>ADMATableSize:LongWord;</code> | ||
+ | | ADMA descriptor table size in bytes (If applicable) | ||
+ | |- | ||
+ | | <code>ADMATableCount:LongWord;</code> | ||
+ | | ADMA descriptor table entry count (If applicable) | ||
+ | |- | ||
+ | | <code>ADMABufferSize:LongWord;</code> | ||
+ | | ADMA alignment buffers size in bytes (If applicable) | ||
+ | |- | ||
+ | | <code>ADMADescriptorSize:LongWord;</code> | ||
+ | | ADMA descriptor size in bytes (If applicable) | ||
+ | |- | ||
+ | |colspan="2"|''Configuration Properties'' | ||
+ | |- | ||
+ | | <code>PresetVoltages:LongWord;</code> | ||
+ | | Host predefined voltage flags | ||
+ | |- | ||
+ | | <code>PresetCapabilities:LongWord;</code> | ||
+ | | Host predefined capabilities flags | ||
+ | |- | ||
+ | | <code>PresetCapabilities2:LongWord;</code> | ||
+ | | Host predefined additional capabilities flags | ||
+ | |- | ||
+ | | <code>ClockMinimum:LongWord;</code> | ||
+ | | Host predefined minimum clock frequency | ||
+ | |- | ||
+ | | <code>ClockMaximum:LongWord;</code> | ||
+ | | Host predefined maximum clock frequency | ||
+ | |- | ||
+ | | <code>DriverStageRegister:LongWord;</code> | ||
+ | | Host predefined driver stage register (DSR) | ||
+ | |- | ||
+ | | <code>EnableV4Mode:LongBool;</code> | ||
+ | | Enable SDHCI version 4 protocol support | ||
+ | |- | ||
+ | |colspan="2"|''Statistics Properties'' | ||
+ | |- | ||
+ | | <code>RequestCount:LongWord;</code> | ||
+ | | Number of requests that have been submitted to this host | ||
+ | |- | ||
+ | | <code>RequestErrors:LongWord;</code> | ||
+ | | Number of requests that have failed on this host | ||
+ | |- | ||
+ | | <code>DataRequestCount:LongWord;</code> | ||
+ | | Number of data requests that have been submitted to this host | ||
+ | |- | ||
+ | | <code>CommandRequestCount:LongWord;</code> | ||
+ | | Number of command requests that have been submitted to this host | ||
+ | |- | ||
+ | | <code>PIODataTransferCount:LongWord;</code> | ||
+ | | Number of data requests that have been submitted for PIO transfer on this host | ||
+ | |- | ||
+ | | <code>DMADataTransferCount:LongWord;</code> | ||
+ | | Number of data requests that have been submitted for DMA transfer on this host | ||
+ | |- | ||
+ | | <code>InterruptCount:LongWord;</code> | ||
+ | | Number of interrupt requests received by the host | ||
+ | |- | ||
+ | | <code>DataInterruptCount:LongWord;</code> | ||
+ | | Number of data interrupt requests received by the host | ||
+ | |- | ||
+ | | <code>CommandInterruptCount:LongWord;</code> | ||
+ | | Number of command interrupt requests received by the host | ||
+ | |- | ||
+ | |colspan="2"|''Internal Properties'' | ||
+ | |- | ||
+ | | <code>Prev:PSDHCIHost;</code> | ||
+ | | Previous entry in SDHCI table | ||
+ | |- | ||
+ | | <code>Next:PSDHCIHost;</code> | ||
+ | | Next entry in SDHCI table | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''SDHCI enumeration callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIEnumerate = function(SDHCI:PSDHCIHost; Data:Pointer):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI notification callback''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCINotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host start''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostStart = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host stop''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostStop = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host lock''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostLock = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host unlock''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostUnlock = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host signal''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSignal = function(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host read byte''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostReadByte = function(SDHCI:PSDHCIHost; Reg:LongWord):Byte;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host read word''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostReadWord = function(SDHCI:PSDHCIHost; Reg:LongWord):Word;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host read long''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostReadLong = function(SDHCI:PSDHCIHost; Reg:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host write byte''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostWriteByte = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host write word''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostWriteWord = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host write long''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostWriteLong = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord);</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host reset''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostReset = function(SDHCI:PSDHCIHost; Mask:Byte):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host hardware reset''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostHardwareReset = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host set power''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetPower = function(SDHCI:PSDHCIHost; Power:Word):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host set clock''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetClock = function(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host set timing''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetTiming = function(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host bus width''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetBusWidth = function(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host set clock divider''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetClockDivider = function(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host set control register''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetControlRegister = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host prepare DMA''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostPrepareDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host start DMA''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostStartDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host stop DMA''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostStopDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host setup card IRQ''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostSetupCardIRQ = function(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SDHCI host complete card IRQ''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TSDHCIHostCompleteCardIRQ = function(SDHCI:PSDHCIHost):LongWord;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Function declarations === | === Function declarations === | ||
Line 36: | Line 7,288: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">procedure MMCInit;</pre> | <pre style="border: 0; padding-bottom:0px;">procedure MMCInit;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Performs basic initialization of the MMC/SD core, after this devices, hosts and drivers can be registered however nothing will work until MMCStart is called</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 52: | Line 7,304: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 64: | Line 7,316: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 76: | Line 7,328: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 91: | Line 7,343: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 103: | Line 7,355: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 115: | Line 7,367: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 127: | Line 7,379: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 139: | Line 7,391: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! ''' | + | ! Note |
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSetTiming(MMC:PMMCDevice; Timing:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
| None documented | | None documented | ||
|- | |- | ||
Line 151: | Line 7,415: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Reference |
| Section 3.4 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | | Section 3.4 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | ||
|- | |- | ||
Line 163: | Line 7,427: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 175: | Line 7,439: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 187: | Line 7,451: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! '''Note''' | + | ! Note |
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceStopTransmission(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSelectCard(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDeselectCard(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Modifies an Extended CSD register for the specificed MMC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! MMC | ||
+ | | The MMC Device to modify | ||
+ | |- | ||
+ | ! Setting | ||
+ | | The Extended CSD command set (eg EXT_CSD_CMD_SET_NORMAL) | ||
+ | |- | ||
+ | ! Index | ||
+ | | The index of the Extended CSD register to be set | ||
+ | |- | ||
+ | ! Value | ||
+ | | The value to be set in the Extended CSD register | ||
+ | |- | ||
+ | ! Timeout | ||
+ | | Command timeout in milliseconds | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSwitchEx(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout,Timing:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Modifies an Extended CSD register for the specificed MMC device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! MMC | ||
+ | | The MMC Device to modify | ||
+ | |- | ||
+ | ! Setting | ||
+ | | The Extended CSD command set (eg EXT_CSD_CMD_SET_NORMAL) | ||
+ | |- | ||
+ | ! Index | ||
+ | | The index of the Extended CSD register to be set | ||
+ | |- | ||
+ | ! Value | ||
+ | | The value to be set in the Extended CSD register | ||
+ | |- | ||
+ | ! Timeout | ||
+ | | Command timeout in milliseconds | ||
+ | |- | ||
+ | ! Timing | ||
+ | | New timing to enable after change (eg MMC_TIMING_MMC_HS) | ||
+ | |- | ||
+ | ! SendStatus | ||
+ | | Use the MMC_CMD_SEND_STATUS command to poll for busy | ||
+ | |- | ||
+ | ! RetryCRCError | ||
+ | | Retry if CRC error occurs when polling for busy | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDevicePollForBusy(MMC:PMMCDevice; Timeout,Command:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Poll the specified MMC device for command completion using busy status</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDevicePollForBusyEx(MMC:PMMCDevice; Timeout,Command:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Poll the specified MMC device for command completion using busy status</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 128-bit response, decode to our card CSD structure</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCardIdentification(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendAllCardIdentification(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 128-bit response, decode to our card CID structure</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceGetExtendedCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendExtendedCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDecodeExtendedCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSetRelativeAddress(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSPISetCRC(MMC:PMMCDevice; Enable:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSPIReadOperationCondition(MMC:PMMCDevice; HighCapacity:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceInsert(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceRemove(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceInitialize(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Reference | ||
+ | | Section 3.6 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDeinitialize(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceGetWriteProtect(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceSetIOS(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceCreate:PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new MMC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new MMC entry or nil if MMC could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceCreateEx(Size:LongWord):PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new MMC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size in bytes to allocate for new MMC (Including the MMC entry) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new MMC entry or nil if MMC could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDestroy(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing MMC entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceRegister(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new MMC in the MMC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceDeregister(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a MMC from the MMC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceFind(MMCId:LongWord):PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceFindByDevice(Device:PDevice):PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find an MMC/SD device by the matching DeviceData property</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Device | ||
+ | | The device entry to match with the DeviceData value | ||
+ | |- | ||
+ | ! Return | ||
+ | | The MMC/SD device matched or nil if none found | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceFindByName(const Name:String):PMMCDevice; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceFindByDescription(const Description:String):PMMCDevice; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceEnumerate(Callback:TMMCEnumerate; Data:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceNotification(MMC:PMMCDevice; Callback:TMMCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SD functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSwitch(MMC:PMMCDevice; Mode,Group:Integer; Value:Byte; Buffer:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Buffer | ||
+ | | Buffer must point to a 64 byte buffer for Switch Status information | ||
+ | |- | ||
+ | ! Note | ||
+ | | See 4.3.10 of SD Physical Layer Simplified Specification V4.10 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSwitchHighspeed(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See Table 4-30 in Section 4.7.4 of SD Physical Layer Simplified Specification V4.10 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendInterfaceCondition(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See 4.3.13 of SD Physical Layer Simplified Specification V4.10. | ||
+ | CMD8 (SEND_IF_COND) must be invoked to support SD 2.0 cards. The card must be in Idle State before issuing this command. This command will fail harmlessly for SD 1.0 cards. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See 4.2.3.1 of SD Physical Layer Simplified Specification V4.10 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceGetCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 128-bit response, decode to our card CSD structure</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceGetCardIdentification(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 128-bit response, decode to our card CID structure</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendSDStatus(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceDecodeSDStatus(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendSDSwitch(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceDecodeSDSwitch(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendSDConfiguration(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceDecodeSDConfiguration(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Given a 64-bit response, decode to our card SCR structure</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendRelativeAddress(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDDeviceSendApplicationCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SDIO functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReset(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See SDIO Simplified Specification V2.0, 4.4 Reset for SDIO | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceEnableWideBus(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceDisableWideBus(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceEnableHighspeed(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceSwitchHighspeed(MMC:PMMCDevice; Enable:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadWriteDirect(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Input:Byte; Output:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadWriteExtended(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Increment:Boolean; Buffer:Pointer; BlockCount,BlockSize:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadByte(MMC:PMMCDevice; Address:LongWord; Output:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for reading a single byte from Function 0</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceWriteByte(MMC:PMMCDevice; Address:LongWord; Input:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for writing a single byte to Function 0</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadCCCR(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadFBR(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadCIS(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadCommonCIS(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceReadFunctionCIS(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceProcessInterrupts(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceRegisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceDeregisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceBindFunctions(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Attempt to bind SDIO functions on an MMC device to one of the registered drivers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! MMC | ||
+ | | The MMC device to attempt to bind a driver to | ||
+ | |- | ||
+ | ! Return | ||
+ | | MMC_STATUS_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceUnbindFunctions(MMC:PMMCDevice; Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Unbind SDIO functions on an MMC device from a driver</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! MMC | ||
+ | | The MMC device to unbind a driver from | ||
+ | |- | ||
+ | ! Driver | ||
+ | | The driver to unbind the MMC device from (nil to unbind from current driver) | ||
+ | |- | ||
+ | ! Return | ||
+ | | MMC_STATUS_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionAllocate(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionRelease(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionFind(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionFindById(MMC:PMMCDevice; VendorId,DeviceId:Word):PSDIOFunction;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionEnumerate(MMC:PMMCDevice; Callback:TSDIOFunctionEnumerate; Data:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionBind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionUnbind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionEnable(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionDisable(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionSetBlockSize(Func:PSDIOFunction; BlockSize:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionReadWriteExtended(Func:PSDIOFunction; Write:Boolean; Address:LongWord; Increment:Boolean; Buffer:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an SDIO read or write to the specified function at the specified address</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Handles splitting any size read or write into multiple IO_RW_EXTENDED requests, accounting for maximum block sizes. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionRead(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for reading multiple bytes from an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionWrite(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for writing multiple bytes to an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionReadByte(Func:PSDIOFunction; Address:LongWord; Output:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for reading a single byte from an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionWriteByte(Func:PSDIOFunction; Address:LongWord; Input:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for writing a single byte to an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionWriteReadByte(Func:PSDIOFunction; Address:LongWord; Input:Byte; Output:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for performing a read after write (RAW) operation on an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionReadWord(Func:PSDIOFunction; Address:LongWord; Output:PWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for reading a single word from an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionWriteWord(Func:PSDIOFunction; Address:LongWord; Input:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for writing a single word to an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionReadLong(Func:PSDIOFunction; Address:LongWord; Output:PLongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for reading a single longword from an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionWriteLong(Func:PSDIOFunction; Address:LongWord; Input:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Wrapper for writing a single longword to an SDIO function</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionRegisterInterrupt(Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionDeregisterInterrupt(Func:PSDIOFunction):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOHostDispatchInterrupt(SDHCI:PSDHCIHost; IRQ,FIQ:Boolean):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SDHCI driver functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverCreate:PSDIODriver;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new SDIO Driver entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new Driver entry or nil if driver could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverCreateEx(Size:LongWord):PSDIODriver;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new SDIO Driver entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size in bytes to allocate for new driver (Including the driver entry) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new Driver entry or nil if driver could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverDestroy(Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing SDIO Driver entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverRegister(Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new Driver in the SDIO Driver table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverDeregister(Driver:PSDIODriver):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a Driver from the SDIO Driver table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverFind(DriverId:LongWord):PSDIODriver;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by Id in the SDIO Driver table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverFindByName(const Name:String):PSDIODriver; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Find a driver by name in the Driver table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverEnumerate(Callback:TSDIODriverEnumerate;Data:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SDHCI functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostReset(SDHCI:PSDHCIHost; Mask:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default software reset function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Reference | ||
+ | | Section 3.3 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostHardwareReset(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default hardware reset function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set power function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Reference | ||
+ | | Section 3.3 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | ||
+ | |- | ||
+ | ! Power | ||
+ | | A shift value to indicate the first available value in the Voltages mask. Caller can use FirstBitSet(SDHCI.Voltages) - 1 to obtain the value of Power. If there are no values set then Power will be -1 ($FFFF) to indicate nothing or unknown. | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetClock(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set clock function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Reference | ||
+ | | Section 3.2 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetTiming(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set timing function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetBusWidth(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set bus width function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostPrepareDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default DMA transfer prepare function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStartDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default DMA transfer start function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStopDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default DMA transfer stop function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostCompleteDMA(Request:PDMARequest);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default DMA request completion callback for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetupCardIRQ(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default Card IRQ setup function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostCompleteCardIRQ(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default Card IRQ completion function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostTransferPIO(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default PIO transfer function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostTransferDMA(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default DMA transfer function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostFinishCommand(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default finish command function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called by Interrupt Command handler when an SDHCI_INT_RESPONSE is received | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostFinishData(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default finish data function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called by Interrupt Data handler when data is received | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostCommandInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord; var ReturnMask:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default command interrupt processing function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called by SDHCI controller interrupt handler when a command interrupt is received | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostDataInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default data interrupt processing function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called by SDHCI controller interrupt handler when a data interrupt is received | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStart(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default host start function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called automatically to start each registered SDHCI controller when required | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStop(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default host stop function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called automatically to stop each registered SDHCI controller when required | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostLock(SDHCI:PSDHCIHost):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default host lock function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostUnlock(SDHCI:PSDHCIHost):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default host unlock function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSignal(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default host semaphore signal function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default read byte function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default read word function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default read longword function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default write byte function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default write word function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default write longword function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetClockDivider(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set clock divider function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostSetControlRegister(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Default set control register function for SDHCI host controllers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostGetADMAAddress(SDHCI:PSDHCIHost):PtrUInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the DMA address of the ADMA table for the current request</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostSetADMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the address of the transfer data in the Advanced DMA (ADMA) registers</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostGetSDMAAddress(SDHCI:PSDHCIHost; Command:PMMCCommand):PtrUInt;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the DMA address of the transfer data for the current request</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostSetSDMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the address of the transfer data in the Simple DMA (SDMA) register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure SDHCIHostWriteADMADescriptor(SDHCI:PSDHCIHost; var Descriptor:Pointer; Command,Len:Word; Address:PtrUInt);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Write the properties to an ADMA descriptor</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, may be used by SDHCI drivers. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostCreate:PSDHCIHost;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new SDHCI entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new SDHCI entry or nil if SDHCI could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostCreateEx(Size:LongWord):PSDHCIHost;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create a new SDHCI entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size in bytes to allocate for new SDHCI (Including the SDHCI entry) | ||
+ | |- | ||
+ | ! Return | ||
+ | | Pointer to new SDHCI entry or nil if SDHCI could not be created | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostDestroy(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Destroy an existing SDHCI entry</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostRegister(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Register a new SDHCI in the SDHCI table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostDeregister(SDHCI:PSDHCIHost):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Deregister a SDHCI from the SDHCI table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostFind(SDHCIId:LongWord):PSDHCIHost;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostEnumerate(Callback:TSDHCIEnumerate; Data:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostNotification(SDHCI:PSDHCIHost; Callback:TSDHCINotification; Data:Pointer; Notification,Flags:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''MMC helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCGetCount:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current MMC count</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceCheck(MMC:PMMCDevice):PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied MMC is in the MMC table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCIsSD(MMC:PMMCDevice):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCIsSDIO(MMC:PMMCDevice):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCGetSDHCI(MMC:PMMCDevice):PSDHCIHost; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCGetCIDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract a CID field value from the 128 bit Card Identification register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCGetCSDValue(MMC:PMMCDevice; Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract a CSD field value from the 128 bit Card Specific register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCExtractBits(Buffer:Pointer; Start,Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Start | ||
+ | | Start is the starting bit to extract | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size is the number of bits to extract | ||
+ | |- | ||
+ | ! Note | ||
+ | | Start is the LSB so to extract 8 bits from 127 to 120 then Start would be 120 and Size would be 8 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCExtractBitsEx(Buffer:Pointer; Length,Start,Size:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Length | ||
+ | | Length is the size of the buffer in LongWords | ||
+ | |- | ||
+ | ! Start | ||
+ | | Start is the starting bit to extract | ||
+ | |- | ||
+ | ! Size | ||
+ | | Size is the number of bits to extract | ||
+ | |- | ||
+ | ! Note | ||
+ | | Start is the LSB so to extract 8 bits from 127 to 120 then Start would be 120 and Size would be 8. For a 128 bit buffer (16 bytes) Length would be 4. For a 512 bit buffer (64 bytes) Length would be 16. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCIsMultiCommand(Command:Word):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCIsNonRemovable(MMC:PMMCDevice):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCHasExtendedCSD(MMC:PMMCDevice):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCHasSetBlockCount(MMC:PMMCDevice):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCHasAutoBlockCount(MMC:PMMCDevice):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCHasAutoCommandStop(MMC:PMMCDevice):Boolean; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCStatusToString(Status:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC status code into a string describing it</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCVersionToString(Version:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC version into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCTimingToString(Timing:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC timing into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCBusWidthToString(BusWidth:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC bus width into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDriverTypeToString(DriverType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC driver type into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCSignalVoltageToString(SignalVoltage:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an MMC signal voltage into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceTypeToString(MMCType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceStateToString(MMCState:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCDeviceStateToNotification(State:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device state value into the notification code for device notifications</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure MMCLog(Level:LongWord; MMC:PMMCDevice; const AText:String);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure MMCLogInfo(MMC:PMMCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure MMCLogWarn(MMC:PMMCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure MMCLogError(MMC:PMMCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure MMCLogDebug(MMC:PMMCDevice; const AText:String); inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SD helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetMaxClock(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Determine the Maximum Clock (DTR) for the current card</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetCIDValue(MMC:PMMCDevice; Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract a CID field value from the 128 bit Card Identification register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetCSDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract a CSD field value from the 128 bit Card Specific register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetSCRValue(MMC:PMMCDevice; Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract an SCR field value from the 64 bit SD Configuration register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetSSRValue(MMC:PMMCDevice; Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract an SCR field value from the 512 bit SD Status register</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDGetSwitchValue(MMC:PMMCDevice; Value:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Extract a Switch field value from the 512 bit SD Switch status</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDVersionToString(Version:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an SD version into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDBusWidthToString(BusWidth:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an SD bus width into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SDIO helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverGetCount:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current SDIO driver count</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODriverCheck(Driver:PSDIODriver):PSDIODriver;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied SDIO Driver is in the driver table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIODeviceGetMaxClock(MMC:PMMCDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Determine the Maximum Clock (DTR) for the current SDIO device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionGetMMC(Func:PSDIOFunction):PMMCDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionGetSDHCI(Func:PSDIOFunction):PSDHCIHost;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOVersionToString(Version:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translates an SDIO version into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionStateToString(SDIOState:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionStatusToString(SDIOStatus:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIOFunctionStateToNotification(State:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device state value into the notification code for device notifications</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">SDIOFunctionStatusToNotification(Status:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Device status value into the notification code for device notifications</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''SDHCI helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIGetCount:LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current SDHCI count</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostCheck(SDHCI:PSDHCIHost):PSDHCIHost;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if the supplied SDHCI is in the SDHCI table</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIIsSPI(SDHCI:PSDHCIHost):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHasDMA(SDHCI:PSDHCIHost):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHasCMD23(SDHCI:PSDHCIHost):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIAutoCMD12(SDHCI:PSDHCIHost):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIAutoCMD23(SDHCI:PSDHCIHost):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIGetVersion(SDHCI:PSDHCIHost):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIGetCommand(Command:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIMakeCommand(Command,Flags:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIMakeBlockSize(DMA,BlockSize:Word):Word;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIVersionToString(Version:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translate an SDHCI version into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIPowerToString(Power:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Translate an SDHCI power value into a string</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIDeviceTypeToString(SDHCIType:LongWord):String; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostTypeToString(SDHCIType:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIDeviceStateToString(SDHCIState:LongWord):String; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStateToString(SDHCIState:LongWord):String;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDHCIHostStateToNotification(State:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Convert a Host state value into the notification code for device notifications</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''MMC storage functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCStorageDeviceErase(Storage:PStorageDevice; const Start,Count:Int64):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function MMCStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | '''SDIO macro replacement functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function SDIO_FBR_BASE(Number:LongWord):LongWord; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
| None documented | | None documented | ||
|- | |- |
Latest revision as of 06:56, 14 August 2024
Return to Unit Reference
Description
Ultibo MMC/SD/SDIO 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.
A fully standards compliant SDHCI host controller needs only a procedure to register it with the SD/MMC core and it can operate using the standard functions provided in this unit, any deviations from the standard will require custom functions to be provided to override the standard functionality.
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 normally 2 tier (ie Host and Device) whereas the USB interface is 3 tier (Host, Device and Driver) however SDIO support adds a driver model to encapsulate support for device functions which can provide a variety of functionality including WiFi, Bluetooth, Ethernet and others.
Constants
MMC_*
MMC_NAME_PREFIX = 'MMC';
|
Name prefix for MMC Devices |
MMC_DEVICE_DESCRIPTION = 'MMC/SD Device';
|
Description of MMC/SD device |
MMC_STORAGE_DESCRIPTION = 'MMC/SD Storage Device';
|
Description of MMC/SD storage device |
MMC_STATUS_TIMER_INTERVAL = 1000;
|
|
MMC_DEFAULT_BLOCKSIZE = 512;
|
|
MMC_DEFAULT_BLOCKSHIFT = 9;
|
MMC_TYPE_*
MMC_TYPE_NONE = 0;
|
|
MMC_TYPE_MMC = 1;
|
An MMC specification card |
MMC_TYPE_SD = 2;
|
An SD specification card |
MMC_TYPE_SDIO = 3;
|
An SDIO specification card |
MMC_TYPE_SD_COMBO = 4;
|
An SD/SDIO combination card |
MMC_TYPE_MAX = 4;
|
MMC_STATE_*
MMC_STATE_EJECTED = 0;
|
|
MMC_STATE_INSERTED = 1;
|
|
MMC_STATE_MAX = 1;
|
MMC_FLAG_*
MMC_FLAG_NONE = $00000000;
|
|
MMC_FLAG_CARD_PRESENT = $00000001;
|
Card is present |
MMC_FLAG_WRITE_PROTECT = $00000002;
|
Card is write protected |
MMC_FLAG_HIGH_CAPACITY = $00000004;
|
High Capacity (SDHC) |
MMC_FLAG_EXT_CAPACITY = $00000008;
|
Extended Capacity (SDXC) |
MMC_FLAG_UHS_I = $00000010;
|
Ultra High Speed (UHS-I) |
MMC_FLAG_UHS_II = $00000020;
|
Ultra High Speed (UHS-II) |
MMC_FLAG_BLOCK_ADDRESSED = $00000040;
|
Block Addressed (SDHC/SDXC and others) |
MMC_FLAG_AUTO_BLOCK_COUNT = $00000080;
|
Controller supports Auto CMD23 (Set Block Count) |
MMC_FLAG_AUTO_COMMAND_STOP = $00000100;
|
Controller supports Auto CMD12 (Stop Transmission) |
MMC_FLAG_DDR_MODE = $00000200;
|
Device supports DDR mode |
MMC_FLAG_NON_REMOVABLE = $00000400;
|
Device is non removable, only check for presence once. |
MMC_STATUS_*
MMC_STATUS_SUCCESS = 0;
|
Function successful |
MMC_STATUS_TIMEOUT = 1;
|
The operation timed out |
MMC_STATUS_NO_MEDIA = 2;
|
No media present in device |
MMC_STATUS_HARDWARE_ERROR = 3;
|
Hardware error of some form occurred |
MMC_STATUS_INVALID_DATA = 4;
|
Invalid data was received |
MMC_STATUS_INVALID_PARAMETER = 5;
|
An invalid parameter was passed to the function |
MMC_STATUS_INVALID_SEQUENCE = 6;
|
Invalid sequence encountered |
MMC_STATUS_OUT_OF_MEMORY = 7;
|
No memory available for operation |
MMC_STATUS_UNSUPPORTED_REQUEST = 8;
|
The request is unsupported |
MMC_STATUS_NOT_PROCESSED = 9;
|
The MMC transfer has not yet been processed |
MMC_STATUS_OPERATION_FAILED = 10;
|
The operation was not able to be completed |
MMC_STATUS_DEVICE_DETACHED = 11;
|
SDIO device was detached |
MMC_STATUS_DEVICE_UNSUPPORTED = 12;
|
SDIO device is unsupported by the driver |
MMC_STATUS_NOT_BOUND = 13;
|
SDIO device is not bound to a driver |
MMC_STATUS_ALREADY_BOUND = 14;
|
SDIO device is already bound to a driver |
MMC_STATUS_NOT_READY = 15;
|
The device is not ready yet, retry again later. |
SDIO_VERSION_*, SD_VERSION_*, MMC_VERSION_*
SDIO_VERSION_SDIO = $00040000;
|
|
SDIO_VERSION_1_00 = (SDIO_VERSION_SDIO or $0100);
|
|
SDIO_VERSION_1_10 = (SDIO_VERSION_SDIO or $010a);
|
|
SDIO_VERSION_1_20 = (SDIO_VERSION_SDIO or $0114);
|
|
SDIO_VERSION_2_00 = (SDIO_VERSION_SDIO or $0200);
|
|
SDIO_VERSION_3_00 = (SDIO_VERSION_SDIO or $0300);
|
|
SD_VERSION_SD = $00020000;
|
|
SD_VERSION_1_0 = (SD_VERSION_SD or $0100);
|
|
SD_VERSION_1_10 = (SD_VERSION_SD or $010a);
|
|
SD_VERSION_2 = (SD_VERSION_SD or $0200);
|
|
SD_VERSION_3 = (SD_VERSION_SD or $0300);
|
|
SD_VERSION_4 = (SD_VERSION_SD or $0400);
|
|
MMC_VERSION_MMC = $00010000;
|
|
MMC_VERSION_1_2 = (MMC_VERSION_MMC or $0102);
|
|
MMC_VERSION_1_4 = (MMC_VERSION_MMC or $0104);
|
|
MMC_VERSION_2_2 = (MMC_VERSION_MMC or $0202);
|
|
MMC_VERSION_3 = (MMC_VERSION_MMC or $0300);
|
|
MMC_VERSION_4 = (MMC_VERSION_MMC or $0400);
|
|
MMC_VERSION_4_1 = (MMC_VERSION_MMC or $0401);
|
|
MMC_VERSION_4_2 = (MMC_VERSION_MMC or $0402);
|
|
MMC_VERSION_4_3 = (MMC_VERSION_MMC or $0403);
|
|
MMC_VERSION_4_41 = (MMC_VERSION_MMC or $0429);
|
|
MMC_VERSION_4_5 = (MMC_VERSION_MMC or $0405);
|
|
MMC_VERSION_5_0 = (MMC_VERSION_MMC or $0500);
|
|
MMC_VERSION_UNKNOWN = (MMC_VERSION_MMC);
|
MMC_CAP_*
From: /include/linux/mmc/host.h | |
MMC_CAP_4_BIT_DATA = (1 shl 0);
|
Can the host do 4 bit transfers |
MMC_CAP_MMC_HIGHSPEED = (1 shl 1);
|
Can do MMC high-speed timing |
MMC_CAP_SD_HIGHSPEED = (1 shl 2);
|
Can do SD high-speed timing |
MMC_CAP_SDIO_IRQ = (1 shl 3);
|
Can signal pending SDIO IRQs |
MMC_CAP_SPI = (1 shl 4);
|
Talks only SPI protocols |
MMC_CAP_NEEDS_POLL = (1 shl 5);
|
Needs polling for card-detection |
MMC_CAP_8_BIT_DATA = (1 shl 6);
|
Can the host do 8 bit transfers |
MMC_CAP_AGGRESSIVE_PM = (1 shl 7);
|
Suspend = (e)MMC/SD at idle |
MMC_CAP_NONREMOVABLE = (1 shl 8);
|
Nonremovable eg. eMMC |
MMC_CAP_WAIT_WHILE_BUSY = (1 shl 9);
|
Waits while card is busy |
MMC_CAP_3_3V_DDR = (1 shl 11);
|
Host supports eMMC DDR 3.3V |
MMC_CAP_1_8V_DDR = (1 shl 12);
|
Host supports eMMC DDR 1.8V |
MMC_CAP_1_2V_DDR = (1 shl 13);
|
Host supports eMMC DDR 1.2V |
MMC_CAP_DDR = (MMC_CAP_3_3V_DDR or MMC_CAP_1_8V_DDR or MMC_CAP_1_2V_DDR);
|
|
MMC_CAP_POWER_OFF_CARD = (1 shl 14);
|
Can power off after boot |
MMC_CAP_BUS_WIDTH_TEST = (1 shl 15);
|
CMD14/CMD19 bus width ok |
MMC_CAP_UHS_SDR12 = (1 shl 16);
|
Host supports UHS SDR12 mode |
MMC_CAP_UHS_SDR25 = (1 shl 17);
|
Host supports UHS SDR25 mode |
MMC_CAP_UHS_SDR50 = (1 shl 18);
|
Host supports UHS SDR50 mode |
MMC_CAP_UHS_SDR104 = (1 shl 19);
|
Host supports UHS SDR104 mode |
MMC_CAP_UHS_DDR50 = (1 shl 20);
|
Host supports UHS DDR50 mode |
MMC_CAP_UHS = (MMC_CAP_UHS_SDR12 or MMC_CAP_UHS_SDR25 or MMC_CAP_UHS_SDR50 or MMC_CAP_UHS_SDR104 or MMC_CAP_UHS_DDR50);
|
|
MMC_CAP_SYNC_RUNTIME_PM = (1 shl 21);
|
Synced runtime PM suspends |
MMC_CAP_NEED_RSP_BUSY = (1 shl 22);
|
Commands with R1B can't use R1 |
MMC_CAP_DRIVER_TYPE_A = (1 shl 23);
|
Host supports Driver Type A |
MMC_CAP_DRIVER_TYPE_C = (1 shl 24);
|
Host supports Driver Type C |
MMC_CAP_DRIVER_TYPE_D = (1 shl 25);
|
Host supports Driver Type D |
MMC_CAP_DONE_COMPLETE = (1 shl 27);
|
RW reqs can be completed within mmc_request_done() |
MMC_CAP_CD_WAKE = (1 shl 28);
|
Enable card detect wake |
MMC_CAP_CMD_DURING_TFR = (1 shl 29);
|
Commands during data transfer |
MMC_CAP_CMD23 = (1 shl 30);
|
CMD23 supported |
MMC_CAP_HW_RESET = (1 shl 31);
|
Reset the eMMC card via RST_n |
MMC_CAP2_*
From: /include/linux/mmc/host.h | |
MMC_CAP2_BOOTPART_NOACC = (1 shl 0);
|
Boot partition no access |
MMC_CAP2_FULL_PWR_CYCLE = (1 shl 2);
|
Can do full power cycle |
MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND = (1 shl 3);
|
Can do full power cycle in suspend |
MMC_CAP2_HS200_1_8V_SDR = (1 shl 5);
|
Can support HS200 1.8V |
MMC_CAP2_HS200_1_2V_SDR = (1 shl 6);
|
Can support HS200 1.2V |
MMC_CAP2_HS200 = (MMC_CAP2_HS200_1_8V_SDR or MMC_CAP2_HS200_1_2V_SDR);
|
|
MMC_CAP2_CD_ACTIVE_HIGH = (1 shl 10);
|
Card-detect signal active high |
MMC_CAP2_RO_ACTIVE_HIGH = (1 shl 11);
|
Write-protect signal active high |
MMC_CAP2_NO_PRESCAN_POWERUP = (1 shl 14);
|
Don't power up before scan |
MMC_CAP2_HS400_1_8V = (1 shl 15);
|
Can support HS400 1.8V |
MMC_CAP2_HS400_1_2V = (1 shl 16);
|
Can support HS400 1.2V |
MMC_CAP2_HS400 = (MMC_CAP2_HS400_1_8V or MMC_CAP2_HS400_1_2V);
|
|
MMC_CAP2_HSX00_1_8V = (MMC_CAP2_HS200_1_8V_SDR or MMC_CAP2_HS400_1_8V);
|
|
MMC_CAP2_HSX00_1_2V = (MMC_CAP2_HS200_1_2V_SDR or MMC_CAP2_HS400_1_2V);
|
|
MMC_CAP2_SDIO_IRQ_NOTHREAD = (1 shl 17);
|
Don't create a thread to poll for SDIO IRQ |
MMC_CAP2_NO_WRITE_PROTECT = (1 shl 18);
|
No physical write protect pin, assume that card is always read-write |
MMC_CAP2_NO_SDIO = (1 shl 19);
|
Do not send SDIO commands during initialization |
MMC_CAP2_HS400_ES = (1 shl 20);
|
Host supports enhanced strobe |
MMC_CAP2_NO_SD = (1 shl 21);
|
Do not send SD commands during initialization |
MMC_CAP2_NO_MMC = (1 shl 22);
|
Do not send = (e)MMC commands during initialization |
MMC_CAP2_CQE = (1 shl 23);
|
Has eMMC command queue engine |
MMC_CAP2_CQE_DCMD = (1 shl 24);
|
CQE can issue a direct command |
MMC_CAP2_AVOID_3_3V = (1 shl 25);
|
Host must negotiate down from 3.3V |
MMC_CAP2_MERGE_CAPABLE = (1 shl 26);
|
Host can merge a segment over the segment size |
MMC_DATA_*
MMC_DATA_READ = 1;
|
|
MMC_DATA_WRITE = 2;
|
MMC_BUS_WIDTH_*
MMC_BUS_WIDTH_1 = 0;
|
|
MMC_BUS_WIDTH_4 = 2;
|
|
MMC_BUS_WIDTH_8 = 3;
|
MMC_BUS_SPEED_*
MMC_BUS_SPEED_DEFAULT = 0;
|
|
MMC_BUS_SPEED_HS26 = 26000000;
|
|
MMC_BUS_SPEED_HS52 = 52000000;
|
|
MMC_BUS_SPEED_DDR = 52000000;
|
|
MMC_BUS_SPEED_HS200 = 200000000;
|
MMC_TIMING_*
From: /include/linux/mmc/host.h | |
MMC_TIMING_LEGACY = 0;
|
|
MMC_TIMING_MMC_HS = 1;
|
|
MMC_TIMING_SD_HS = 2;
|
|
MMC_TIMING_UHS_SDR12 = 3;
|
|
MMC_TIMING_UHS_SDR25 = 4;
|
|
MMC_TIMING_UHS_SDR50 = 5;
|
|
MMC_TIMING_UHS_SDR104 = 6;
|
|
MMC_TIMING_UHS_DDR50 = 7;
|
|
MMC_TIMING_MMC_DDR52 = 8;
|
|
MMC_TIMING_MMC_HS200 = 9;
|
|
MMC_TIMING_MMC_HS400 = 10;
|
MMC_SIGNAL_VOLTAGE_*
From: /include/linux/mmc/host.h | |
MMC_SIGNAL_VOLTAGE_330 = 0;
|
|
MMC_SIGNAL_VOLTAGE_180 = 1;
|
|
MMC_SIGNAL_VOLTAGE_120 = 2;
|
MMC_SET_DRIVER_TYPE_*
From: /include/linux/mmc/host.h | |
MMC_SET_DRIVER_TYPE_B = 0;
|
|
MMC_SET_DRIVER_TYPE_A = 1;
|
|
MMC_SET_DRIVER_TYPE_C = 2;
|
|
MMC_SET_DRIVER_TYPE_D = 3;
|
MMC_CMD_*
From: /include/linux/mmc/mmc.h | |
Class 1 | |
MMC_CMD_GO_IDLE_STATE = 0;
|
|
MMC_CMD_SEND_OP_COND = 1;
|
|
MMC_CMD_ALL_SEND_CID = 2;
|
|
MMC_CMD_SET_RELATIVE_ADDR = 3;
|
|
MMC_CMD_SET_DSR = 4;
|
|
MMC_CMD_SLEEP_AWAKE = 5;
|
|
MMC_CMD_SWITCH = 6;
|
|
MMC_CMD_SELECT_CARD = 7;
|
|
MMC_CMD_SEND_EXT_CSD = 8;
|
|
MMC_CMD_SEND_CSD = 9;
|
|
MMC_CMD_SEND_CID = 10;
|
|
MMC_CMD_READ_DAT_UNTIL_STOP = 11;
|
|
MMC_CMD_STOP_TRANSMISSION = 12;
|
|
MMC_CMD_SEND_STATUS = 13;
|
|
MMC_CMD_BUS_TEST_R = 14;
|
|
MMC_CMD_GO_INACTIVE_STATE = 15;
|
|
MMC_CMD_BUS_TEST_W = 19;
|
|
MMC_CMD_SPI_READ_OCR = 58;
|
|
MMC_CMD_SPI_CRC_ON_OFF = 59;
|
|
Class 2 | |
MMC_CMD_SET_BLOCKLEN = 16;
|
|
MMC_CMD_READ_SINGLE_BLOCK = 17;
|
|
MMC_CMD_READ_MULTIPLE_BLOCK = 18;
|
|
MMC_CMD_SEND_TUNING_BLOCK = 19;
|
|
MMC_CMD_SEND_TUNING_BLOCK_HS200 = 21;
|
|
Class 3 | |
MMC_CMD_WRITE_DAT_UNTIL_STOP = 20;
|
|
Class 4 | |
MMC_CMD_SET_BLOCK_COUNT = 23;
|
|
MMC_CMD_WRITE_SINGLE_BLOCK = 24;
|
|
MMC_CMD_WRITE_MULTIPLE_BLOCK = 25;
|
|
MMC_CMD_PROGRAM_CID = 26;
|
|
MMC_CMD_PROGRAM_CSD = 27;
|
|
Class 6 | |
MMC_CMD_SET_WRITE_PROT = 28;
|
|
MMC_CMD_CLR_WRITE_PROT = 29;
|
|
MMC_CMD_SEND_WRITE_PROT = 30;
|
|
Class 5 | |
MMC_CMD_ERASE_GROUP_START = 35;
|
|
MMC_CMD_ERASE_GROUP_END = 36;
|
|
MMC_CMD_ERASE = 38;
|
|
Class 9 | |
MMC_CMD_FAST_IO = 39;
|
|
MMC_CMD_GO_IRQ_STATE = 40;
|
|
Class 7 | |
MMC_CMD_LOCK_UNLOCK = 42;
|
|
Class 8 | |
MMC_CMD_APP_CMD = 55;
|
|
MMC_CMD_GEN_CMD = 56;
|
|
MMC_CMD_RES_MAN = 62;
|
|
MMC_CMD62_ARG1 = $EFAC62EC;
|
|
MMC_CMD62_ARG2 = $00CBAEA7;
|
MMC_RSP_*
From: /include/linux/mmc/mmc.h | |
Native | |
MMC_RSP_PRESENT = (1 shl 0);
|
|
MMC_RSP_136 = (1 shl 1);
|
136 bit response |
MMC_RSP_CRC = (1 shl 2);
|
Expect valid crc |
MMC_RSP_BUSY = (1 shl 3);
|
Card may send busy |
MMC_RSP_OPCODE = (1 shl 4);
|
Response contains opcode |
These are the native response types, and correspond to valid bit patterns of the above flags. One additional valid pattern is all zeros, which means we don't expect a response. | |
MMC_RSP_NONE = (0);
|
|
MMC_RSP_R1 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);
|
|
MMC_RSP_R1B = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE or MMC_RSP_BUSY);
|
|
MMC_RSP_R2 = (MMC_RSP_PRESENT or MMC_RSP_136 or MMC_RSP_CRC);
|
|
MMC_RSP_R3 = (MMC_RSP_PRESENT);
|
|
MMC_RSP_R4 = (MMC_RSP_PRESENT);
|
|
MMC_RSP_R5 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);
|
|
MMC_RSP_R6 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);
|
|
MMC_RSP_R7 = (MMC_RSP_PRESENT or MMC_RSP_CRC or MMC_RSP_OPCODE);
|
MMC_CMD_*
MMC_CMD_MASK = (3 shl 5);
|
|
MMC_CMD_AC = (0 shl 5);
|
Addressed Command, no Data |
MMC_CMD_ADTC = (1 shl 5);
|
Addressed Data Transfer Command |
MMC_CMD_BC = (2 shl 5);
|
Broadcast Command, no Response |
MMC_CMD_BCR = (3 shl 5);
|
Broadcast Command with Response |
MMC_RSP_SPI_*
MMC_RSP_SPI_S1 = (1 shl 7);
|
One status byte |
MMC_RSP_SPI_S2 = (1 shl 8);
|
Second byte |
MMC_RSP_SPI_B4 = (1 shl 9);
|
Four data bytes |
MMC_RSP_SPI_BUSY = (1 shl 10);
|
Card may send busy |
These are the SPI response types for MMC, SD, and SDIO cards. Commands return R1, with maybe more info. Zero is an error type, callers must always provide the appropriate MMC_RSP_SPI_Rx flags. | |
MMC_RSP_SPI_R1 = (MMC_RSP_SPI_S1);
|
|
MMC_RSP_SPI_R1B = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_BUSY);
|
|
MMC_RSP_SPI_R2 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_S2);
|
|
MMC_RSP_SPI_R3 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);
|
|
MMC_RSP_SPI_R4 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);
|
|
MMC_RSP_SPI_R5 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_S2);
|
|
MMC_RSP_SPI_R7 = (MMC_RSP_SPI_S1 or MMC_RSP_SPI_B4);
|
MMC_RSP_R1_*, MMC_RSP_R2_*
R1 - MMC status in R1, for native mode (SPI bits are different) | |
MMC_RSP_R1_OUT_OF_RANGE = (1 shl 31);
|
|
MMC_RSP_R1_ADDRESS_ERROR = (1 shl 30);
|
|
MMC_RSP_R1_BLOCK_LEN_ERROR = (1 shl 29);
|
|
MMC_RSP_R1_ERASE_SEQ_ERROR = (1 shl 28);
|
|
MMC_RSP_R1_ERASE_PARAM = (1 shl 27);
|
|
MMC_RSP_R1_WP_VIOLATION = (1 shl 26);
|
|
MMC_RSP_R1_CARD_IS_LOCKED = (1 shl 25);
|
|
MMC_RSP_R1_LOCK_UNLOCK_FAILED = (1 shl 24);
|
|
MMC_RSP_R1_COM_CRC_ERROR = (1 shl 23);
|
|
MMC_RSP_R1_ILLEGAL_COMMAND = (1 shl 22);
|
|
MMC_RSP_R1_CARD_ECC_FAILED = (1 shl 21);
|
|
MMC_RSP_R1_CC_ERROR = (1 shl 20);
|
|
MMC_RSP_R1_ERROR = (1 shl 19);
|
|
MMC_RSP_R1_UNDERRUN = (1 shl 18);
|
|
MMC_RSP_R1_OVERRUN = (1 shl 17);
|
|
MMC_RSP_R1_CID_CSD_OVERWRITE = (1 shl 16);
|
|
MMC_RSP_R1_WP_ERASE_SKIP = (1 shl 15);
|
|
MMC_RSP_R1_CARD_ECC_DISABLED = (1 shl 14);
|
|
MMC_RSP_R1_ERASE_RESET = (1 shl 13);
|
|
MMC_RSP_R1_READY_FOR_DATA = (1 shl 8);
|
|
MMC_RSP_R1_SWITCH_ERROR = (1 shl 7);
|
|
MMC_RSP_R1_EXCEPTION_EVENT = (1 shl 6);
|
|
MMC_RSP_R1_APP_CMD = (1 shl 5);
|
|
MMC_RSP_R1_AKE_SEQ_ERROR = (1 shl 3);
|
|
R1 SPI - MMC/SD in SPI mode reports R1 status always, and R2 for SEND_STATUS. R1 is the low order byte, R2 is the next highest byte, when present. | |
MMC_RSP_R1_SPI_IDLE = (1 shl 0);
|
|
MMC_RSP_R1_SPI_ERASE_RESET = (1 shl 1);
|
|
MMC_RSP_R1_SPI_ILLEGAL_COMMAND = (1 shl 2);
|
|
MMC_RSP_R1_SPI_COM_CRC = (1 shl 3);
|
|
MMC_RSP_R1_SPI_ERASE_SEQ = (1 shl 4);
|
|
MMC_RSP_R1_SPI_ADDRESS = (1 shl 5);
|
|
MMC_RSP_R1_SPI_PARAMETER = (1 shl 6);
|
|
R1 bit 7 is always zero | |
R2 SPI - See above | |
MMC_RSP_R2_SPI_CARD_LOCKED = (1 shl 8);
|
|
MMC_RSP_R2_SPI_WP_ERASE_SKIP = (1 shl 9);
|
Or lock/unlock fail |
MMC_RSP_R2_SPI_LOCK_UNLOCK_FAIL = MMC_RSP_R2_SPI_WP_ERASE_SKIP;
|
|
MMC_RSP_R2_SPI_ERROR = (1 shl 10);
|
|
MMC_RSP_R2_SPI_CC_ERROR = (1 shl 11);
|
|
MMC_RSP_R2_SPI_CARD_ECC_ERROR = (1 shl 12);
|
|
MMC_RSP_R2_SPI_WP_VIOLATION = (1 shl 13);
|
|
MMC_RSP_R2_SPI_ERASE_PARAM = (1 shl 14);
|
|
MMC_RSP_R2_SPI_OUT_OF_RANGE = (1 shl 15);
|
Or CSD overwrite |
MMC_RSP_R2_SPI_CSD_OVERWRITE = MMC_RSP_R2_SPI_OUT_OF_RANGE;
|
MMC_OCR_*
See: Section 5.1 of SD Physical Layer Simplified Specification V4.10 | |
MMC_OCR_BUSY = $80000000;
|
Busy Status - 0 = Initializing/1 = Initialization Complete |
MMC_OCR_HCS = $40000000;
|
Card Capacity Status - 0 = SDSC/1 = SDHC or SDXC |
MMC_OCR_UHS_II = $20000000;
|
UHS-II Card Status - 0 = Non UHS-II Card/1 = UHS-II Card |
MMC_OCR_S18A = $01000000;
|
Switching to 1.8V Accepted - 0 = Continue current voltage signaling/1 = Ready for switching signal voltage |
MMC_OCR_VOLTAGE_MASK = $007FFF80;
|
|
MMC_OCR_ACCESS_MODE = $60000000;
|
MMC_CARD_STATUS_*
See: Section 4.10.1 of SD Physical Layer Simplified Specification Version 4.10 | |
Note: These map to the Native mode R1 response values | |
MMC_CARD_STATUS_MASK = not($0206BF7F);
|
|
MMC_CARD_STATUS_ERROR = (1 shl 19);
|
|
MMC_CARD_STATUS_CURRENT_STATE = ($0F shl 9);
|
See MMC_CURRENT_STATE_ definitions below |
MMC_CARD_STATUS_READY_FOR_DATA = (1 shl 8);
|
|
MMC_CARD_STATUS_SWITCH_ERROR = (1 shl 7);
|
MMC_CURRENT_STATE_*
From Card Status Register or R1 Response | |
MMC_CURRENT_STATE_IDLE = (0 shl 9);
|
|
MMC_CURRENT_STATE_READY = (1 shl 9);
|
|
MMC_CURRENT_STATE_IDENT = (2 shl 9);
|
|
MMC_CURRENT_STATE_STBY = (3 shl 9);
|
|
MMC_CURRENT_STATE_TRAN = (4 shl 9);
|
|
MMC_CURRENT_STATE_DATA = (5 shl 9);
|
|
MMC_CURRENT_STATE_RCV = (6 shl 9);
|
|
MMC_CURRENT_STATE_PRG = (7 shl 9);
|
|
MMC_CURRENT_STATE_DIS = (8 shl 9);
|
MMC_CID_*
See: Section 5.2 of SD Physical Layer Simplified Specification Version 4.10 | |
MMC CID Fields | |
MMC_CID_MID = 1;
|
Manufacturer Id |
MMC_CID_OID = 2;
|
OEM/Application Id |
MMC_CID_PNM0 = 3;
|
Product name (Byte 0) |
MMC_CID_PNM1 = 4;
|
Product name (Byte 1) |
MMC_CID_PNM2 = 5;
|
Product name (Byte 2) |
MMC_CID_PNM3 = 6;
|
Product name (Byte 3) |
MMC_CID_PNM4 = 7;
|
Product name (Byte 4) |
MMC_CID_PNM5 = 8;
|
Product name (Byte 5) |
MMC_CID_PNM6 = 9;
|
Product name (Byte 6) |
MMC_CID_PRV = 10;
|
Product revision |
MMC_CID_HRV = 11;
|
Hardware revision |
MMC_CID_FRV = 12;
|
Firmware revision |
MMC_CID_PSN = 13;
|
Product serial number |
MMC_CID_MDT_YEAR = 14;
|
Manufacturing year |
MMC_CID_MDT_MONTH = 15;
|
Manufacturing month |
MMC_CID_CRC = 16;
|
CRC |
MMC_CSD_*
See: Section 5.3 of SD Physical Layer Simplified Specification Version 4.10 | |
MMC CSD Fields | |
MMC_CSD_STRUCTURE = 1;
|
|
MMC_CSD_SPECVER = 2;
|
MMC/eMMC Only |
MMC_CSD_TAAC_UNIT = 3;
|
|
MMC_CSD_TAAC_VALUE = 4;
|
|
MMC_CSD_NSAC = 5;
|
|
MMC_CSD_TRAN_SPEED_UNIT = 6;
|
|
MMC_CSD_TRAN_SPEED_VALUE = 37;
|
|
MMC_CSD_CCC = 7;
|
|
MMC_CSD_READ_BL_LEN = 8;
|
|
MMC_CSD_READ_BL_PARTIAL = 9;
|
|
MMC_CSD_WRITE_BLK_MISALIGN = 10;
|
|
MMC_CSD_READ_BLK_MISALIGN = 11;
|
|
MMC_CSD_DSR_IMP = 12;
|
|
MMC_CSD_C_SIZE = 13;
|
|
MMC_CSD_VDD_R_CURR_MIN = 14;
|
|
MMC_CSD_VDD_R_CURR_MAX = 15;
|
|
MMC_CSD_VDD_W_CURR_MIN = 16;
|
|
MMC_CSD_VDD_W_CURR_MAX = 17;
|
|
MMC_CSD_C_SIZE_MULT = 18;
|
|
MMC_CSD_ERASE_BLK_EN = 19;
|
SD Specification |
MMC_CSD_SECTOR_SIZE = 20;
|
MMC/eMMC Specification/SD Specification |
MMC_CSD_ERASE_GRP_SIZE = 21;
|
MMC/eMMC Specification |
MMC_CSD_ERASE_GRP_MULT = 22;
|
MMC/eMMC Specification |
MMC_CSD_WP_GRP_SIZE = 23;
|
|
MMC_CSD_WP_GRP_ENABLE = 24;
|
|
MMC_CSD_DEFAULT_ECC = 25;
|
MMC/eMMC Only |
MMC_CSD_R2W_FACTOR = 26;
|
|
MMC_CSD_WRITE_BL_LEN = 27;
|
|
MMC_CSD_WRITE_BL_PARTIAL = 28;
|
|
MMC_CSD_CONTENT_PROT_APP = 29;
|
MMC/eMMC Only |
MMC_CSD_FILE_FORMAT_GRP = 30;
|
|
MMC_CSD_COPY = 31;
|
|
MMC_CSD_PERM_WRITE_PROTECT = 32;
|
|
MMC_CSD_TMP_WRITE_PROTECT = 33;
|
|
MMC_CSD_FILE_FORMAT = 34;
|
|
MMC_CSD_ECC = 35;
|
MMC/eMMC Only |
MMC_CSD_CRC = 36;
|
MMC_CSD_STRUCT_*
MMC_CSD_STRUCT_VER_1_0 = 0;
|
Valid for system specification 1.0 - 1.2 |
MMC_CSD_STRUCT_VER_1_1 = 1;
|
Valid for system specification 1.4 - 2.2 |
MMC_CSD_STRUCT_VER_1_2 = 2;
|
Valid for system specification 3.1 - 3.2 - 3.31 - 4.0 - 4.1 |
MMC_CSD_STRUCT_EXT_CSD = 3;
|
Version is coded in CSD_STRUCTURE in EXT_CSD |
MMC_CSD_SPEC_VER_*
MMC_CSD_SPEC_VER_0 = 0;
|
Implements system specification 1.0 - 1.2 |
MMC_CSD_SPEC_VER_1 = 1;
|
Implements system specification 1.4 |
MMC_CSD_SPEC_VER_2 = 2;
|
Implements system specification 2.0 - 2.2 |
MMC_CSD_SPEC_VER_3 = 3;
|
Implements system specification 3.1 - 3.2 - 3.31 |
MMC_CSD_SPEC_VER_4 = 4;
|
Implements system specification 4.0 - 4.1 |
MMC_CSD_TAAC_UNITS*
MMC_CSD_TAAC_UNITS:array[0..7] of LongWord = (
| |
1,
|
|
10,
|
|
100,
|
|
1000,
|
|
10000,
|
|
100000,
|
|
1000000,
|
|
10000000);
|
MMC_CSD_TAAC_VALUES*
MMC_CSD_TAAC_VALUES:array[0..15] of LongWord = (
| |
0,
|
|
10,
|
|
12,
|
|
13,
|
|
15,
|
|
20,
|
|
25,
|
|
30,
|
|
35,
|
|
40,
|
|
45,
|
|
50,
|
|
55,
|
|
60,
|
|
70,
|
|
80);
|
MMC_CCC_*
See: Table 4-21 (Page 68) of SD Physical Layer Simplified Specification V4.10 | |
MMC_CCC_BASIC = (1 shl 0);
|
(Class 0) Basic protocol functions (CMD0,1,2,3,4,7,9,10,12,13,15) (and for SPI, CMD58,59) |
MMC_CCC_STREAM_READ = (1 shl 1);
|
(Class 1) Stream read commands (CMD11) |
MMC_CCC_BLOCK_READ = (1 shl 2);
|
(Class 2) Block read commands (CMD16,17,18) |
MMC_CCC_STREAM_WRITE = (1 shl 3);
|
(Class 3) Stream write commands (CMD20) |
MMC_CCC_BLOCK_WRITE = (1 shl 4);
|
(Class 4) Block write commands (CMD16,24,25,26,27) |
MMC_CCC_ERASE = (1 shl 5);
|
(Class 5) Ability to erase blocks (CMD32,33,34,35,36,37,38,39) |
MMC_CCC_WRITE_PROT = (1 shl 6);
|
(Class 6) Ability to write protect blocks (CMD28,29,30) |
MMC_CCC_LOCK_CARD = (1 shl 7);
|
(Class 7) Ability to lock down card (CMD16,CMD42) |
MMC_CCC_APP_SPEC = (1 shl 8);
|
(Class 8) Application specific (CMD55,56,57,ACMD*) |
MMC_CCC_IO_MODE = (1 shl 9);
|
(Class 9) I/O mode (CMD5,39,40,52,53) |
MMC_CCC_SWITCH = (1 shl 10);
|
(Class 10) High speed switch (CMD6,34,35,36,37,50) |
MMC_CCC_EXTENSION = (1 shl 11);
|
(Class 11) Extension (CMD?) |
MMC_CSD_TRAN_SPEED_UNITS*
MMC_CSD_TRAN_SPEED_UNITS:array[0..7] of LongWord = (
| |
10000,
|
|
100000,
|
|
1000000,
|
|
10000000,
|
|
0,
|
|
0,
|
|
0,
|
|
0);
|
MMC_CSD_TRAN_SPEED_VALUES*
MMC_CSD_TRAN_SPEED_VALUES:array[0..15] of LongWord = (
| |
0,
|
|
10,
|
|
12,
|
|
13,
|
|
15,
|
|
20,
|
|
25,
|
|
30,
|
|
35,
|
|
40,
|
|
45,
|
|
50,
|
|
55,
|
|
60,
|
|
70,
|
|
80);
|
|
SECURE_ERASE = $80000000;
|
Used by MMC_CMD_ERASE |
MMC_VDD_*
MMC_VDD_165_195 = $00000080;
|
VDD voltage 1.65 - 1.95 |
MMC_VDD_20_21 = $00000100;
|
VDD voltage 2.0 ~ 2.1 |
MMC_VDD_21_22 = $00000200;
|
VDD voltage 2.1 ~ 2.2 |
MMC_VDD_22_23 = $00000400;
|
VDD voltage 2.2 ~ 2.3 |
MMC_VDD_23_24 = $00000800;
|
VDD voltage 2.3 ~ 2.4 |
MMC_VDD_24_25 = $00001000;
|
VDD voltage 2.4 ~ 2.5 |
MMC_VDD_25_26 = $00002000;
|
VDD voltage 2.5 ~ 2.6 |
MMC_VDD_26_27 = $00004000;
|
VDD voltage 2.6 ~ 2.7 |
MMC_VDD_27_28 = $00008000;
|
VDD voltage 2.7 ~ 2.8 |
MMC_VDD_28_29 = $00010000;
|
VDD voltage 2.8 ~ 2.9 |
MMC_VDD_29_30 = $00020000;
|
VDD voltage 2.9 ~ 3.0 |
MMC_VDD_30_31 = $00040000;
|
VDD voltage 3.0 ~ 3.1 |
MMC_VDD_31_32 = $00080000;
|
VDD voltage 3.1 ~ 3.2 |
MMC_VDD_32_33 = $00100000;
|
VDD voltage 3.2 ~ 3.3 |
MMC_VDD_33_34 = $00200000;
|
VDD voltage 3.3 ~ 3.4 |
MMC_VDD_34_35 = $00400000;
|
VDD voltage 3.4 ~ 3.5 |
MMC_VDD_35_36 = $00800000;
|
VDD voltage 3.5 ~ 3.6 |
MMC_SWITCH_MODE_*
MMC_SWITCH_MODE_CMD_SET = $00;
|
Change the command set |
MMC_SWITCH_MODE_SET_BITS = $01;
|
Set bits in EXT_CSD byte addressed by index which are 1 in value field |
MMC_SWITCH_MODE_CLEAR_BITS = $02;
|
Clear bits in EXT_CSD byte addressed by index, which are 1 in value field |
MMC_SWITCH_MODE_WRITE_BYTE = $03;
|
Set target byte to value |
EXT_CSD_*
EXT_CSD_CMDQ_MODE_EN = 15;
|
R/W |
EXT_CSD_FLUSH_CACHE = 32;
|
W |
EXT_CSD_CACHE_CTRL = 33;
|
R/W |
EXT_CSD_POWER_OFF_NOTIFICATION = 34;
|
R/W |
EXT_CSD_PACKED_FAILURE_INDEX = 35;
|
RO |
EXT_CSD_PACKED_CMD_STATUS = 36;
|
RO |
EXT_CSD_EXP_EVENTS_STATUS = 54;/code>
|
RO, 2 bytes |
<code>EXT_CSD_EXP_EVENTS_CTRL = 56; | R/W, 2 bytes |
EXT_CSD_DATA_SECTOR_SIZE = 61;
|
R |
EXT_CSD_ENH_START_ADDR = 136;
|
R/W |
EXT_CSD_ENH_SIZE_MULT = 140;
|
R/W |
EXT_CSD_GP_SIZE_MULT = 143;
|
R/W |
EXT_CSD_PARTITION_SETTING_COMPLETED = 155;
|
R/W |
EXT_CSD_PARTITION_ATTRIBUTE = 156;
|
R/W |
EXT_CSD_MAX_ENH_SIZE_MULT = 157;
|
R |
EXT_CSD_PARTITION_SUPPORT = 160;
|
RO |
EXT_CSD_HPI_MGMT = 161;
|
R/W |
EXT_CSD_RST_N_FUNCTION = 162;
|
R/W |
EXT_CSD_BKOPS_EN = 163;
|
R/W |
EXT_CSD_BKOPS_START = 164;
|
W |
EXT_CSD_SANITIZE_START = 165;
|
W |
EXT_CSD_WR_REL_PARAM = 166;
|
RO |
EXT_CSD_WR_REL_SET = 167;
|
R/W |
EXT_CSD_RPMB_MULT = 168;
|
RO |
EXT_CSD_FW_CONFIG = 169;
|
R/W |
EXT_CSD_BOOT_WP = 173;
|
R/W |
EXT_CSD_ERASE_GROUP_DEF = 175;
|
R/W |
EXT_CSD_BOOT_BUS_CONDITIONS = 177;
|
R/W/E |
EXT_CSD_PART_CONFIG = 179;
|
R/W |
EXT_CSD_ERASED_MEM_CONT = 181;
|
RO |
EXT_CSD_BUS_WIDTH = 183;
|
R/W |
EXT_CSD_STROBE_SUPPORT = 184
|
RO |
EXT_CSD_HS_TIMING = 185;
|
R/W |
EXT_CSD_POWER_CLASS = 187;
|
R/W |
EXT_CSD_REV = 192;
|
RO |
EXT_CSD_STRUCTURE = 194;
|
RO |
EXT_CSD_CARD_TYPE = 196;
|
RO |
EXT_CSD_DRIVER_STRENGTH = 197;
|
RO |
EXT_CSD_OUT_OF_INTERRUPT_TIME = 198;
|
RO |
EXT_CSD_PART_SWITCH_TIME = 199;
|
RO |
EXT_CSD_PWR_CL_52_195 = 200;
|
RO |
EXT_CSD_PWR_CL_26_195 = 201;
|
RO |
EXT_CSD_PWR_CL_52_360 = 202;
|
RO |
EXT_CSD_PWR_CL_26_360 = 203;
|
RO |
EXT_CSD_SEC_CNT = 212;
|
RO, 4 bytes |
EXT_CSD_S_A_TIMEOUT = 217;
|
RO |
EXT_CSD_REL_WR_SEC_C = 222;
|
RO |
EXT_CSD_HC_WP_GRP_SIZE = 221;
|
RO |
EXT_CSD_ERASE_TIMEOUT_MULT = 223;
|
RO |
EXT_CSD_HC_ERASE_GRP_SIZE = 224;
|
RO |
EXT_CSD_BOOT_SIZE_MULT = 226;
|
RO |
EXT_CSD_SEC_TRIM_MULT = 229;
|
RO |
EXT_CSD_SEC_ERASE_MULT = 230;
|
RO |
EXT_CSD_SEC_FEATURE_SUPPORT = 231;
|
RO |
EXT_CSD_TRIM_MULT = 232;
|
RO |
EXT_CSD_PWR_CL_200_195 = 236;
|
RO |
EXT_CSD_PWR_CL_200_360 = 237;
|
RO |
EXT_CSD_PWR_CL_DDR_52_195 = 238;
|
RO |
EXT_CSD_PWR_CL_DDR_52_360 = 239;
|
RO |
EXT_CSD_BKOPS_STATUS = 246;
|
RO |
EXT_CSD_POWER_OFF_LONG_TIME = 247;
|
RO |
EXT_CSD_GENERIC_CMD6_TIME = 248;
|
RO |
EXT_CSD_CACHE_SIZE = 249;
|
RO, 4 bytes |
EXT_CSD_PWR_CL_DDR_200_360 = 253;
|
RO |
EXT_CSD_FIRMWARE_VERSION = 254;
|
RO, 8 bytes |
EXT_CSD_PRE_EOL_INFO = 267;
|
RO |
EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A = 268;
|
RO |
EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B = 269;
|
RO |
EXT_CSD_CMDQ_DEPTH = 307;
|
RO |
EXT_CSD_CMDQ_SUPPORT = 308;
|
RO |
EXT_CSD_SUPPORTED_MODE = 493;
|
RO |
EXT_CSD_TAG_UNIT_SIZE = 498;
|
RO |
EXT_CSD_DATA_TAG_SUPPORT = 499;
|
RO |
EXT_CSD_MAX_PACKED_WRITES = 500;
|
RO |
EXT_CSD_MAX_PACKED_READS = 501;
|
RO |
EXT_CSD_BKOPS_SUPPORT = 502;
|
RO |
EXT_CSD_HPI_FEATURES = 503;
|
RO |
EXT_CSD_*
EXT_CSD_PARTITION_ATTRIBUTE_ENH_4 = $10;
|
|
EXT_CSD_PARTITION_ATTRIBUTE_ENH_3 = $08;
|
|
EXT_CSD_PARTITION_ATTRIBUTE_ENH_2 = $04;
|
|
EXT_CSD_PARTITION_ATTRIBUTE_ENH_1 = $02;
|
|
EXT_CSD_PARTITION_ATTRIBUTE_ENH_USR = $01;
|
|
EXT_CSD_PARTITION_EXT_ATTRIBUTE_EN = $04;
|
|
EXT_CSD_PARTITION_ENH_ATTRIBUTE_EN = $02;
|
|
EXT_CSD_PARTITION_PARTITIONING_EN = $01;
|
|
EXT_CSD_WR_REL_PARAM_EN = (1 shl 2);
|
|
EXT_CSD_WR_REL_PARAM_EN_RPMB_REL_WR = (1 shl 4);
|
|
EXT_CSD_BOOT_WP_B_PWR_WP_DIS = $40;
|
|
EXT_CSD_BOOT_WP_B_PERM_WP_DIS = $10;
|
|
EXT_CSD_BOOT_WP_B_PERM_WP_EN = $04;
|
|
EXT_CSD_BOOT_WP_B_PWR_WP_EN = $01;
|
|
EXT_CSD_PART_CONFIG_ACC_MASK = $07;
|
|
EXT_CSD_PART_CONFIG_ACC_BOOT0 = $01;
|
|
EXT_CSD_PART_CONFIG_ACC_RPMB = $03;
|
|
EXT_CSD_PART_CONFIG_ACC_GP0 = $04;
|
|
EXT_CSD_PART_SETTING_COMPLETED = $01;
|
|
EXT_CSD_PART_SUPPORT_PART_EN = $01;
|
|
EXT_CSD_CMD_SET_NORMAL = (1 shl 0);
|
|
EXT_CSD_CMD_SET_SECURE = (1 shl 1);
|
|
EXT_CSD_CMD_SET_CPSECURE = (1 shl 2);
|
|
EXT_CSD_CARD_TYPE_HS_26 = (1 shl 0);
|
Card can run at 26MHz |
EXT_CSD_CARD_TYPE_HS_52 = (1 shl 1);
|
Card can run at 52MHz |
EXT_CSD_CARD_TYPE_HS = (EXT_CSD_CARD_TYPE_HS_26 or EXT_CSD_CARD_TYPE_HS_52);
|
|
EXT_CSD_CARD_TYPE_DDR_1_8V = (1 shl 2);
|
Card can run at 52MHz / DDR mode @1.8V or 3V I/O |
EXT_CSD_CARD_TYPE_DDR_1_2V = (1 shl 3);
|
Card can run at 52MHz / DDR mode @1.2V I/O |
EXT_CSD_CARD_TYPE_DDR_52 = (EXT_CSD_CARD_TYPE_DDR_1_8V or EXT_CSD_CARD_TYPE_DDR_1_2V);
|
|
EXT_CSD_CARD_TYPE_HS200_1_8V = (1 shl 4);
|
Card can run at 200MHz |
EXT_CSD_CARD_TYPE_HS200_1_2V = (1 shl 5);
|
Card can run at 200MHz / SDR mode @1.2V I/O |
EXT_CSD_CARD_TYPE_HS200 = (EXT_CSD_CARD_TYPE_HS200_1_8V or EXT_CSD_CARD_TYPE_HS200_1_2V);
|
|
EXT_CSD_CARD_TYPE_HS400_1_8V = (1 shl 6);
|
Card can run at 200MHz DDR, 1.8V |
EXT_CSD_CARD_TYPE_HS400_1_2V = (1 shl 7);
|
Card can run at 200MHz DDR, 1.2V |
EXT_CSD_CARD_TYPE_HS400 = (EXT_CSD_CARD_TYPE_HS400_1_8V or EXT_CSD_CARD_TYPE_HS400_1_2V);
|
|
EXT_CSD_CARD_TYPE_HS400ES = (1 shl 8);
|
Card can run at HS400ES |
EXT_CSD_BUS_WIDTH_1 = 0;
|
Card is in 1 bit mode |
EXT_CSD_BUS_WIDTH_4 = 1;
|
Card is in 4 bit mode |
EXT_CSD_BUS_WIDTH_8 = 2;
|
Card is in 8 bit mode |
EXT_CSD_DDR_BUS_WIDTH_4 = 5;
|
Card is in 4 bit DDR mode |
EXT_CSD_DDR_BUS_WIDTH_8 = 6;
|
Card is in 8 bit DDR mode |
EXT_CSD_BUS_WIDTH_STROBE = 1 shl 7;
|
Enhanced strobe mode |
EXT_CSD_TIMING_BC = 0;
|
Backwards compatility |
EXT_CSD_TIMING_HS = 1;
|
High speed |
EXT_CSD_TIMING_HS200 = 2;
|
HS200 |
EXT_CSD_TIMING_HS400 = 3;
|
HS400 |
EXT_CSD_DRV_STR_SHIFT = 4;
|
Driver Strength shift |
EXT_CSD_SEC_ER_EN = 1 shl 0;
|
|
EXT_CSD_SEC_BD_BLK_EN = 1 shl 2;
|
|
EXT_CSD_SEC_GB_CL_EN = 1 shl 4;
|
|
EXT_CSD_SEC_SANITIZE = 1 shl 6;
|
v4.5 only |
EXT_CSD_RST_N_EN_MASK = $03;
|
|
EXT_CSD_RST_N_ENABLED = 1;
|
RST_n is enabled on card |
EXT_CSD_NO_POWER_NOTIFICATION = 0;
|
|
EXT_CSD_POWER_ON = 1;
|
|
EXT_CSD_POWER_OFF_SHORT = 2;
|
|
EXT_CSD_POWER_OFF_LONG = 3;
|
|
EXT_CSD_PWR_CL_8BIT_MASK = $F0;
|
8 bit PWR CLS |
EXT_CSD_PWR_CL_4BIT_MASK = $0F;
|
8 bit PWR CLS |
EXT_CSD_PWR_CL_8BIT_SHIFT = 4;
|
|
EXT_CSD_PWR_CL_4BIT_SHIFT = 0;
|
|
EXT_CSD_PACKED_EVENT_EN = 1 shl 3;
|
EXT_CSD_*
EXT_CSD_URGENT_BKOPS = 1 shl 0;
|
|
EXT_CSD_DYNCAP_NEEDED = 1 shl 1;
|
|
EXT_CSD_SYSPOOL_EXHAUSTED = 1 shl 2;
|
|
EXT_CSD_PACKED_FAILURE = 1 shl 3;
|
|
EXT_CSD_PACKED_GENERIC_ERROR = 1 shl 0;
|
|
EXT_CSD_PACKED_INDEXED_ERROR = 1 shl 1;
|
EXT_CSD_BKOPS_*
EXT_CSD_BKOPS_LEVEL_2 = $02;
|
EXT_CSD_*_BKOPS_
EXT_CSD_MANUAL_BKOPS_MASK = $01;
|
|
EXT_CSD_AUTO_BKOPS_MASK = $02;
|
EXT_CSD_CMDQ_*
EXT_CSD_CMDQ_MODE_ENABLED = 1 shl 0;
|
|
EXT_CSD_CMDQ_DEPTH_MASK = $1F;
|
|
EXT_CSD_CMDQ_SUPPORTED = 1 shl 0;
|
MMC_HIGH_*
MMC_HIGH_26_MAX_DTR = 26000000;
|
|
MMC_HIGH_52_MAX_DTR = 52000000;
|
|
MMC_HIGH_DDR_MAX_DTR = 52000000;
|
|
MMC_HS200_MAX_DTR = 200000000;
|
MMC_MIN_PART_*
MMC_MIN_PART_SWITCH_TIME = 300;
|
Milliseconds |
MMCPART_*, MMC_MAX_*
MMCPART_NOAVAILABLE = ($ff);
|
|
PART_ACCESS_MASK = ($07);
|
|
PART_SUPPORT = ($01);
|
|
ENHNCD_SUPPORT = ($02);
|
|
PART_ENH_ATTRIB = ($1f);
|
|
Maximum block size for MMC | |
MMC_MAX_BLOCK_LEN = 512;
|
|
Maximum block count for MMC | |
MMC_MAX_BLOCK_COUNT = 65535;
|
|
The number of MMC physical partitions. These consist of: boot partitions (2), general purpose partitions (4) and RPMB partition (1) in MMC v4.4 | |
MMC_NUM_BOOT_PARTITION = 2;
|
|
MMC_NUM_GP_PARTITION = 4;
|
|
MMC_NUM_PHY_PARTITION = 7;
|
|
Timeouts | |
MMC_DEFAULT_CMD6_TIMEOUT_MS = 500;
|
|
MMC_MIN_CACHE_EN_TIMEOUT_MS = 1600;
|
|
Sizes | |
MMC_FIRMWARE_VERSION_LEN = 8;
|
|
Version specific features | |
MMC_DISCARD_FEATURE = $01;
|
|
Busy Poll Commands | |
MMC_BUSY_CMD6 = 0;
|
|
MMC_BUSY_ERASE = 1;
|
|
MMC_BUSY_HPI = 2;
|
|
Erase/Trim/Discard Arguments | |
MMC_ERASE_ARG = $00000000;
|
|
MMC_SECURE_ERASE_ARG = $80000000;
|
|
MMC_TRIM_ARG = $00000001;
|
|
MMC_DISCARD_ARG = $00000003;
|
|
MMC_SECURE_TRIM1_ARG = $80000001;
|
|
MMC_SECURE_TRIM2_ARG = $80008000;
|
|
MMC_SECURE_ARGS = $80000000;
|
|
MMC_TRIM_ARGS = $00008001;
|
MMC_LOG_*
MMC_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG;
|
MMC debugging messages |
MMC_LOG_LEVEL_INFO = LOG_LEVEL_INFO;
|
MMC informational messages, such as a device being attached or detached |
MMC_LOG_LEVEL_WARN = LOG_LEVEL_WARN;
|
MMC warning messages |
MMC_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR;
|
MMC error messages |
MMC_LOG_LEVEL_NONE = LOG_LEVEL_NONE;
|
No MMC messages |
SD_*
SD_DEFAULT_BLOCKSIZE = 512;
|
|
SD_DEFAULT_BLOCKSHIFT = 9;
|
SD_BUS_WIDTH_*
SD_BUS_WIDTH_1 = 0;
|
|
SD_BUS_WIDTH_4 = 2;
|
SD_BUS_SPEED_*
SD_BUS_SPEED_DEFAULT = 25000000;
|
|
SD_BUS_SPEED_HS = 50000000;
|
|
SD_BUS_SPEED_UHS_SDR12 = 25000000;
|
|
SD_BUS_SPEED_UHS_SDR25 = 50000000;
|
|
SD_BUS_SPEED_UHS_DDR50 = 50000000;
|
|
SD_BUS_SPEED_UHS_SDR50 = 100000000;
|
|
SD_BUS_SPEED_UHS_SDR104 = 208000000;
|
SD_CMD_*
From: /include/linux/mmc/sd.h | |
Class 0 | |
SD_CMD_SEND_RELATIVE_ADDR = 3;
|
|
SD_CMD_SEND_IF_COND = 8;
|
|
SD_CMD_SWITCH_VOLTAGE = 11;
|
|
Class 10 | |
SD_CMD_SWITCH = 6;
|
See: 4.3.10 Switch Function Command |
Class 5 | |
SD_CMD_ERASE_WR_BLK_START = 32;
|
|
SD_CMD_ERASE_WR_BLK_END = 33;
|
|
Application commands | |
SD_CMD_APP_SET_BUS_WIDTH = 6;
|
|
SD_CMD_APP_SD_STATUS = 13;
|
|
SD_CMD_APP_SEND_NUM_WR_BLKS = 22;
|
|
SD_CMD_APP_SEND_OP_COND = 41;
|
|
SD_CMD_APP_SEND_SCR = 51;
|
|
SD_CMD_SWITCH argument format: | |
[31] Check (0) or switch (1)
|
|
[30:24] Reserved (0)
|
|
[23:20] Function group 6
|
|
[19:16] Function group 5
|
|
[15:12] Function group 4
|
|
[11:8] Function group 3
|
|
[7:4] Function group 2
|
|
[3:0] Function group 1
|
SD_SWITCH_MODE_*
SD_SWITCH_MODE_CHECK = 0;
|
|
SD_SWITCH_MODE_SWITCH = 1;
|
SD_SWITCH_FUNCTION_GROUP_*
SD_SWITCH_FUNCTION_GROUP_ACCESS = 0;
|
Access Mode |
SD_SWITCH_FUNCTION_GROUP_COMMAND = 1;
|
Command System |
SD_SWITCH_FUNCTION_GROUP_DRIVER = 2;
|
Driver Strength |
SD_SWITCH_FUNCTION_GROUP_POWER = 3;
|
Power Limit |
SD_SWITCH_ACCESS_MODE_*
SD_SWITCH_ACCESS_MODE_DEF = 0;
|
Default SDR12 |
SD_SWITCH_ACCESS_MODE_HS = 1;
|
High Speed SDR25 |
SD_SWITCH_ACCESS_MODE_SDR50 = 2;
|
SDR50 (1.8V only) |
SD_SWITCH_ACCESS_MODE_SDR104 = 3;
|
SDR104 (1.8V only) |
SD_SWITCH_ACCESS_MODE_DDR50 = 4;
|
DDR50 (1.8V only) |
SD_SWITCH_COMMAND_SYSTEM_*
SD_SWITCH_COMMAND_SYSTEM_DEF = 0;
|
Default |
SD_SWITCH_COMMAND_SYSTEM_EC = 1;
|
For eC |
SD_SWITCH_COMMAND_SYSTEM_OTP = 3;
|
OTP |
SD_SWITCH_COMMAND_SYSTEM_ASSD = 4;
|
ASSD |
SD_SWITCH_DRIVER_STRENGTH_*
SD_SWITCH_DRIVER_STRENGTH_DEF = 0;
|
Default Type B |
SD_SWITCH_DRIVER_STRENGTH_TYPE_A = 1;
|
Type A |
SD_SWITCH_DRIVER_STRENGTH_TYPE_C = 2;
|
Type C |
SD_SWITCH_DRIVER_STRENGTH_TYPE_D = 3;
|
Type D |
SD_SWITCH_POWER_LIMIT_*
SD_SWITCH_POWER_LIMIT_DEF = 0;
|
Default 0.72W |
SD_SWITCH_POWER_LIMIT_144 = 1;
|
1.44W |
SD_SWITCH_POWER_LIMIT_216 = 2;
|
2.16W (Embedded only) |
SD_SWITCH_POWER_LIMIT_216 = 2;
|
2.16W (Embedded only) |
SD_SWITCH_POWER_LIMIT_288 = 3;
|
2.88W (Embedded only) |
SD_SWITCH_POWER_LIMIT_180 = 4;
|
1.80W |
SD_SEND_IF_COND_*
SD_SEND_IF_COND_CHECK_PATTERN = $AA;
|
|
SD_SEND_IF_COND_VOLTAGE_MASK = $00FF8000;
|
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 |
SD_CMD_SEND_IF_COND argument format: | |
[31:12] Reserved (0)
|
|
[11:8] Host Voltage Supply Flags
|
|
[7:0] Check Pattern (0xAA)
|
SD_SEND_OP_COND_*
SD_SEND_OP_COND_VOLTAGE_MASK = $00FF8000;
|
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 |
SD_OCR_*
See: Section 5.1 of SD Physical Layer Simplified Specification V4.10 | |
SD_OCR_CCS = $40000000;
|
Card Capacity Status - 0 = SDSC/1 = SDHC or SDXC |
SD_OCR_CCS = $40000000;
|
Card Capacity Status - 0 = SDSC/1 = SDHC or SDXC |
SD_OCR_UHS_II = $20000000;
|
UHS-II Card Status - 0 = Non UHS-II Card/1 = UHS-II Card |
SD_OCR_XPC = $10000000;
|
SDXC Power Control |
SD_OCR_S18A = $01000000;
|
1.8V Switching Accepted |
SD_CSD_STRUCT_*
SD_CSD_STRUCT_VER_1_0 = 0;
|
Standard Capacity |
SD_CSD_STRUCT_VER_2_0 = 1;
|
High Capacity and Extended Capacity |
SD_SSR_*
See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 | |
SD SSR Fields | |
SD_SSR_DAT_BUS_WIDTH = 1;
|
|
SD_SSR_SECURED_MODE = 2;
|
|
SD_SSR_SD_CARD_TYPE = 3;
|
|
SD_SSR_SIZE_OF_PROTECTED_AREA = 4;
|
|
SD_SSR_SPEED_CLASS = 5;
|
|
SD_SSR_PERFORMANCE_MOVE = 6;
|
|
SD_SSR_AU_SIZE = 7;
|
|
SD_SSR_ERASE_SIZE = 8;
|
|
SD_SSR_ERASE_TIMEOUT = 9;
|
|
SD_SSR_ERASE_OFFSET = 10;
|
|
SD_SSR_UHS_SPEED_GRADE = 11;
|
|
SD_SSR_UHS_AU_SIZE = 12;
|
SD_SSR_BUS_WIDTH_*
SD_SSR_BUS_WIDTH_1 = 0;
|
1 (default) |
SD_SSR_BUS_WIDTH_4 = 2;
|
4 bit width |
SD_SSR_CARD_TYPE_*
SD_SSR_CARD_TYPE_RW = $0000;
|
Regular SD RD/WR Card |
SD_SSR_CARD_TYPE_ROM = $0001;
|
SD ROM Card |
SD_SSR_CARD_TYPE_OTP = $0002;
|
OTP |
SD_SSR_SPEED_CLASS_*
SD_SSR_SPEED_CLASS_0 = $00;
|
Class 0 |
SD_SSR_SPEED_CLASS_2 = $01;
|
Class 2 |
SD_SSR_SPEED_CLASS_4 = $02;
|
Class 4 |
SD_SSR_SPEED_CLASS_6 = $03;
|
Class 6 |
SD_SSR_SPEED_CLASS_10 = $04;
|
Class 10 |
SD_SSR_AU_SIZE_*
SD_SSR_AU_SIZE_VALUES:array[0..15] of LongWord = (
| |
0,
|
Not Defined |
$00004000,
|
16 KB |
$00008000,
|
32 KB |
$00010000,
|
64 KB |
$00020000,
|
128 KB |
$00040000,
|
256 KB |
$00080000,
|
512 KB |
$00100000,
|
1 MB |
$00200000,
|
2 MB |
$00400000,
|
4 MB |
$00800000,
|
8 MB |
$00800000 + $00400000,
|
12 MB |
$01000000,
|
16 MB |
$01000000 + $00800000,
|
24 MB |
$02000000,
|
32 MB |
$04000000);
|
64 MB |
SD_SSR_UHS_SPEED_*
SD_SSR_UHS_SPEED_GRADE_0 = 0;
|
Less than 10MB/sec |
SD_SSR_UHS_SPEED_GRADE_1 = 1;
|
10MB/sec and above |
SD_SSR_UHS_AU_SIZE_*
SD_SSR_UHS_AU_SIZE_VALUES:array[0..15] of LongWord = (
| |
0,
|
Not Defined |
0,
|
Not Used |
0,
|
Not Used |
0,
|
Not Used |
0,
|
Not Used |
0,
|
Not Used |
0,
|
Not Used |
$00100000,
|
1 MB |
$00200000,
|
2 MB |
$00400000,
|
4 MB |
$00800000,
|
8 MB |
$00800000 + $00400000,
|
12 MB |
$01000000,
|
16 MB |
$01000000 + $00800000,
|
24 MB |
$02000000,
|
32 MB |
$04000000);
|
64 MB |
SD_SWITCH_*
See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 | |
SD Switch Fields | |
SD_SWITCH_MAXIMUM_CURRENT = 1;
|
|
SD_SWITCH_GROUP6_SUPPORT = 2;
|
|
SD_SWITCH_GROUP5_SUPPORT = 3;
|
|
SD_SWITCH_GROUP4_SUPPORT = 4;
|
|
SD_SWITCH_GROUP3_SUPPORT = 5;
|
|
SD_SWITCH_GROUP2_SUPPORT = 6;
|
|
SD_SWITCH_GROUP1_SUPPORT = 7;
|
|
SD_SWITCH_GROUP6_SELECTION = 8;
|
|
SD_SWITCH_GROUP5_SELECTION = 9;
|
|
SD_SWITCH_GROUP4_SELECTION = 10;
|
|
SD_SWITCH_GROUP3_SELECTION = 11;
|
|
SD_SWITCH_GROUP2_SELECTION = 12;
|
|
SD_SWITCH_GROUP1_SELECTION = 13;
|
|
SD_SWITCH_STRUCT_VERSION = 14;
|
|
SD_SWITCH_GROUP6_BUSY_STATUS = 15;
|
|
SD_SWITCH_GROUP5_BUSY_STATUS = 16;
|
|
SD_SWITCH_GROUP4_BUSY_STATUS = 17;
|
|
SD_SWITCH_GROUP3_BUSY_STATUS = 18;
|
|
SD_SWITCH_GROUP2_BUSY_STATUS = 19;
|
|
SD_SWITCH_GROUP1_BUSY_STATUS = 20;
|
|
SD Switch Access Mode (Bus Speed) Support (Group 1) | |
SD_SWITCH_GROUP1_SDR12 = (1 shl 0);
|
|
SD_SWITCH_GROUP1_HS = (1 shl 1);
|
|
SD_SWITCH_GROUP1_SDR25 = (1 shl 1);
|
|
SD_SWITCH_GROUP1_SDR50 = (1 shl 2);
|
|
SD_SWITCH_GROUP1_SDR104 = (1 shl 3);
|
|
SD_SWITCH_GROUP1_DDR50 = (1 shl 4);
|
|
SD Switch Driver Strength Support (Group 3) | |
SD_SWITCH_GROUP3_TYPE_B = (1 shl 0);
|
|
SD_SWITCH_GROUP3_TYPE_A = (1 shl 1);
|
|
SD_SWITCH_GROUP3_TYPE_C = (1 shl 2);
|
|
SD_SWITCH_GROUP3_TYPE_D = (1 shl 3);
|
|
SD Switch Structure Versions | |
SD_SWITCH_STRUCT_VER_0 = 0;
|
Bits 511:376 are defined (SD_SWITCH_MAXIMUM_CURRENT to SD_SWITCH_GROUP1_SELECTION) |
SD_SWITCH_STRUCT_VER_1 = 1;
|
Bits 511:272 are defined (SD_SWITCH_MAXIMUM_CURRENT to SD_SWITCH_GROUP1_BUSY_STATUS |
SD_SCR_*
See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 | |
SD SCR Fields | |
SD_SCR_STRUCTURE = 1;
|
|
SD_SCR_SD_SPEC = 2;
|
|
SD_SCR_DATA_STAT_AFTER_ERASE = 3;
|
|
SD_SCR_SD_SECURITY = 4;
|
|
SD_SCR_SD_BUS_WIDTHS = 5;
|
|
SD_SCR_SD_SPEC3 = 6;
|
|
SD_SCR_EX_SECURITY = 7;
|
|
SD_SCR_SD_SPEC4 = 8;
|
|
SD_SCR_CMD_SUPPORT = 9;
|
SD_SCR_STRUCT_*
SD_SCR_STRUCT_VER_1_0 = 0;
|
Valid for system specification 1.01 - 4.0 |
SD_SCR_SPEC_VER_*
SD_SCR_SPEC_VER_0 = 0;
|
Implements system specification 1.0 - 1.01 |
SD_SCR_SPEC_VER_1 = 1;
|
Implements system specification 1.10 |
SD_SCR_SPEC_VER_2 = 2;
|
Implements system specification 2.00-4.0X |
SD_SCR_SECURITY_*
SD_SCR_SECURITY_VER_0 = 0;
|
No Security |
SD_SCR_SECURITY_VER_2 = 2;
|
SDSC Card (Security Version 1.01) |
SD_SCR_SECURITY_VER_3 = 3;
|
SDHC Card (Security Version 2.00) |
SD_SCR_SECURITY_VER_4 = 4;
|
SDXC Card (Security Version 3.xx) |
SD_SCR_BUS_WIDTH_*
SD_SCR_BUS_WIDTH_1 = (1 shl 0);
|
1 bit (DAT0) |
SD_SCR_BUS_WIDTH_4 = (1 shl 2); {4 bit (DAT0-3)}
|
4 bit (DAT0-3) |
SD_SCR_EX_SECURITY_*
SD_SCR_EX_SECURITY_VER_0 = 0;
|
Extended Security is not supported |
SD_SCR_*_SUPPORT
SD_SCR_CMD20_SUPPORT = (1 shl 0);
|
Mandatory for SDXC card |
SD_SCR_CMD23_SUPPORT = (1 shl 1);
|
Mandatory for UHS104 card |
SD_SCR_CMD48_49_SUPPORT = (1 shl 2);
|
Optional |
SD_SCR_CMD58_59_SUPPORT = (1 shl 3);
|
Optional (If CMD58/59 is supported, CMD48/49 shall be supported) |
SDIO_STATE_*
SDIO_STATE_DETACHED = 0;
|
|
SDIO_STATE_DETACHING = 1;
|
|
SDIO_STATE_ATTACHING = 2;
|
|
SDIO_STATE_ATTACHED = 3;
|
|
SDIO_STATE_MAX = 3;
|
SDIO_STATE_*
SDIO_STATE_NAMES:array[SDIO_STATE_DETACHED..SDIO_STATE_MAX] of String = (
|
|
'SDIO_STATE_DETACHED',
|
|
'SDIO_STATE_DETACHING',
|
|
'SDIO_STATE_ATTACHING',
|
|
'SDIO_STATE_ATTACHED');
|
SDIO_STATUS_*
SDIO_STATUS_UNBOUND = 0;
|
|
SDIO_STATUS_BOUND = 1;
|
|
SDIO_STATUS_MAX = 1;
|
SDIO_STATUS_*
SDIO_STATUS_NAMES:array[SDIO_STATUS_UNBOUND..SDIO_STATUS_MAX] of String = (
|
|
'SDIO_STATUS_UNBOUND',
|
|
'SDIO_STATUS_BOUND');
|
SDIO_CMD_*
From: /include/linux/mmc/sdio.h | |
SDIO_CMD_SEND_OP_COND = 5;
|
|
SDIO_CMD_RW_DIRECT = 52;
|
|
SDIO_CMD_RW_EXTENDED = 53;
|
|
SDIO_CMD_RW_DIRECT argument format: | |
[31] R/W flag
|
|
[30:28] Function number
|
|
[27] RAW flag
|
|
[25:9] Register address
|
|
[7:0] Data
|
|
SDIO_CMD_RW_EXTENDED argument format: | |
[31] R/W flag
|
|
[30:28] Function number
|
|
[27] Block mode
|
|
[26] Increment address
|
|
[25:9] Register address
|
|
[8:0] Byte/block count
|
SDIO_RSP_*
From: /include/linux/mmc/sdio.h | |
R4 | |
SDIO_RSP_R4_18V_PRESENT = (1 shl 24);
|
|
SDIO_RSP_R4_MEMORY_PRESENT = (1 shl 27);
|
|
R5 | |
SDIO_RSP_R5_COM_CRC_ERROR = (1 shl 15);
|
|
SDIO_RSP_R5_ILLEGAL_COMMAND = (1 shl 14);
|
|
SDIO_RSP_R5_ERROR = (1 shl 11);
|
|
SDIO_RSP_R5_FUNCTION_NUMBER = (1 shl 9);
|
|
SDIO_RSP_R5_OUT_OF_RANGE = (1 shl 8);
|
SDIO_CCCR_*
SDIO_CCCR_CCCR = $00;
|
|
SDIO_CCCR_SD = $01;
|
|
SDIO_CCCR_IOEx = $02;
|
|
SDIO_CCCR_IORx = $03;
|
|
SDIO_CCCR_IENx = $04;
|
Function/Master Interrupt Enable |
SDIO_CCCR_INTx = $05;
|
Function Interrupt Pending |
SDIO_CCCR_ABORT = $06;
|
Function abort/card reset |
SDIO_CCCR_IF = $07;
|
Bus interface controls |
SDIO_CCCR_CAPS = $08;
|
|
SDIO_CCCR_CIS = $09;
|
Common CIS pointer (3 bytes) |
Following 4 regs are valid only if SBS is set | |
SDIO_CCCR_SUSPEND = $0c;
|
|
SDIO_CCCR_SELx = $0d;
|
|
SDIO_CCCR_EXECx = $0e;
|
|
SDIO_CCCR_READYx = $0f;
|
|
SDIO_CCCR_BLKSIZE = $10;
|
|
SDIO_CCCR_POWER = $12;
|
|
SDIO_CCCR_SPEED = $13;
|
|
SDIO_CCCR_UHS = $14;
|
|
SDIO_CCCR_DRIVE_STRENGTH = $15;
|
SDIO_*_REV_*
SDIO CCCR Register values | |
SDIO_CCCR_REV_1_00 = 0;
|
CCCR/FBR Version 1.00 |
SDIO_CCCR_REV_1_10 = 1;
|
CCCR/FBR Version 1.10 |
SDIO_CCCR_REV_1_20 = 2;
|
CCCR/FBR Version 1.20 |
SDIO_CCCR_REV_3_00 = 3;
|
CCCR/FBR Version 3.00 |
SDIO_SDIO_REV_1_00 = 0;
|
SDIO Spec Version 1.00 |
SDIO_SDIO_REV_1_10 = 1;
|
SDIO Spec Version 1.10 |
SDIO_SDIO_REV_1_20 = 2;
|
SDIO Spec Version 1.20 |
SDIO_SDIO_REV_2_00 = 3;
|
SDIO Spec Version 2.00 |
SDIO_SDIO_REV_3_00 = 4;
|
SDIO Spec Version 3.00 |
SDIO CCCR SD Register values | |
SDIO_SD_REV_1_01 = 0;
|
SD Physical Spec Version 1.01 |
SDIO_SD_REV_1_10 = 1;
|
SD Physical Spec Version 1.10 |
SDIO_SD_REV_2_00 = 2;
|
SD Physical Spec Version 2.00 |
SDIO_SD_REV_3_00 = 3;
|
SD Physical Spev Version 3.00 |
SDIO_BUS_*
SDIO CCCR IF Register values | |
SDIO_BUS_WIDTH_MASK = $03;
|
Data bus width setting |
SDIO_BUS_WIDTH_1BIT = $00;
|
|
SDIO_BUS_WIDTH_RESERVED = $01;
|
|
SDIO_BUS_WIDTH_4BIT = $02;
|
|
SDIO_BUS_ECSI = $20;
|
Enable continuous SPI interrupt |
SDIO_BUS_SCSI = $40;
|
Support continuous SPI interrupt |
SDIO_BUS_ASYNC_INT = $20;
|
|
SDIO_BUS_CD_DISABLE = $80;
|
disable pull-up on DAT3 (pin 1) |
SDIO_CCCR_CAP_*
SDIO_CCCR_CAP_SDC = $01;
|
Can do CMD52 while data transfer |
SDIO_CCCR_CAP_SMB = $02;
|
Can do multi-block xfers (CMD53) |
SDIO_CCCR_CAP_SRW = $04;
|
Supports read-wait protocol |
SDIO_CCCR_CAP_SBS = $08;
|
Supports suspend/resume |
SDIO_CCCR_CAP_S4MI = $10;
|
Interrupt during 4-bit CMD53 |
SDIO_CCCR_CAP_E4MI = $20;
|
Enable ints during 4-bit CMD53 |
SDIO_CCCR_CAP_LSC = $40;
|
Low speed card |
SDIO_CCCR_CAP_4BLS = $80;
|
4 bit low speed card |
SDIO_POWER_*
SDIO_POWER_SMPC = $01;
|
Supports Master Power Control |
SDIO_POWER_EMPC = $02;
|
Enable Master Power Control |
SDIO_SPEED_*
SDIO_SPEED_SHS = $01;
|
Supports High-Speed mode |
SDIO_SPEED_BSS_SHIFT = 1;
|
|
SDIO_SPEED_BSS_MASK = (7 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_SDR12 = (0 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_SDR25 = (1 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_SDR50 = (2 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_SDR104 = (3 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_DDR50 = (4 shl SDIO_SPEED_BSS_SHIFT);
|
|
SDIO_SPEED_EHS = SDIO_SPEED_SDR25;
|
Enable High-Speed |
SDIO_UHS_*
SDIO_UHS_SDR50 = $01;
|
|
SDIO_UHS_SDR104 = $02;
|
|
SDIO_UHS_DDR50 = $04;
|
SDIO_DRIVE_*
SDIO_SDTx_MASK = $07;
|
|
SDIO_DRIVE_SDTA = (1 shl 0);
|
|
SDIO_DRIVE_SDTC = (1 shl 1);
|
|
SDIO_DRIVE_SDTD = (1 shl 2);
|
|
SDIO_DRIVE_DTSx_MASK = $03;
|
|
SDIO_DRIVE_DTSx_SHIFT = 4;
|
|
SDIO_DTSx_SET_TYPE_B = (0 shl SDIO_DRIVE_DTSx_SHIFT);
|
|
SDIO_DTSx_SET_TYPE_A = (1 shl SDIO_DRIVE_DTSx_SHIFT);
|
|
SDIO_DTSx_SET_TYPE_C = (2 shl SDIO_DRIVE_DTSx_SHIFT);
|
|
SDIO_DTSx_SET_TYPE_D = (3 shl SDIO_DRIVE_DTSx_SHIFT);
|
SDIO_FBR_*
SDIO_FBR_BASE(f) ((f) * $100)
|
Base of function f's FBRs |
SDIO_FBR_STD_IF = $00;
|
|
SDIO_FBR_STD_IF_EXT = $01;
|
|
SDIO_FBR_POWER = $02;
|
|
SDIO_FBR_CIS = $09;
|
CIS pointer (3 bytes) |
SDIO_FBR_CSA = $0C;
|
CSA pointer (3 bytes) |
SDIO_FBR_BLKSIZE = $10;
|
Block size (2 bytes) |
SDIO FBR IF Register values | |
SDIO_FBR_SUPPORTS_CSA = $40;
|
Supports Code Storage Area |
SDIO_FBR_ENABLE_CSA = $80;
|
Enable Code Storage Area |
SDIO FBR POWER Register values | |
SDIO_FBR_POWER_SPS = $01;
|
Supports Power Selection |
SDIO_FBR_POWER_EPS = $02;
|
Enable (low) Power Selection |
SDIO_CLASS_*
SDIO_CLASS_NONE = $00;
|
Not a SDIO standard interface |
SDIO_CLASS_UART = $01;
|
Standard UART interface |
SDIO_CLASS_BT_A = $02;
|
Type-A BlueTooth std interface |
SDIO_CLASS_BT_B = $03;
|
Type-B BlueTooth std interface |
SDIO_CLASS_GPS = $04;
|
GPS standard interface |
SDIO_CLASS_CAMERA = $05;
|
Camera standard interface |
SDIO_CLASS_PHS = $06;
|
PHS standard interface |
SDIO_CLASS_WLAN = $07;
|
WLAN interface |
SDIO_CLASS_ATA = $08;
|
Embedded SDIO-ATA std interface |
SDIO_CLASS_BT_AMP = $09;
|
Type-A Bluetooth AMP interface |
SDIO_VENDOR_*
SDIO_VENDOR_ID_STE = $0020;
|
|
SDIO_VENDOR_ID_INTEL = $0089;
|
|
SDIO_VENDOR_ID_CGUYS = $0092;
|
|
SDIO_VENDOR_ID_TI = $0097;
|
|
SDIO_VENDOR_ID_ATHEROS = $0271;
|
|
SDIO_VENDOR_ID_BROADCOM = $02d0;
|
|
SDIO_VENDOR_ID_MARVELL = $02df;
|
|
SDIO_VENDOR_ID_MEDIATEK = $037a;
|
|
SDIO_VENDOR_ID_MICROCHIP_WILC = $0296;
|
|
SDIO_VENDOR_ID_SIANO = $039a;
|
|
SDIO_VENDOR_ID_RSI = $041b;
|
|
SDIO_VENDOR_ID_TI_WL1251 = $104c;
|
SDIO_DEVICE_*
SDIO_DEVICE_ID_STE_CW1200 = $2280;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX = $1402;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200WIFI = $1403;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200TOP = $1404;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200GPS = $1405;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200BT = $1406;
|
|
SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 = $1407;
|
|
SDIO_DEVICE_ID_CGUYS_EW_CG1102GC = $0004;
|
|
SDIO_DEVICE_ID_TI_WL1271 = $4076;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6003_00 = $0300;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6003_01 = $0301;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6004_00 = $0400;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6004_01 = $0401;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6004_02 = $0402;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6004_18 = $0418;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6004_19 = $0419;
|
|
SDIO_DEVICE_ID_ATHEROS_AR6005 = $050A;
|
|
SDIO_DEVICE_ID_ATHEROS_QCA9377 = $0701;
|
|
SDIO_DEVICE_ID_BROADCOM_NINTENDO_WII = $044b;
|
|
SDIO_DEVICE_ID_BROADCOM_43241 = $4324;
|
|
SDIO_DEVICE_ID_BROADCOM_4329 = $4329;
|
|
SDIO_DEVICE_ID_BROADCOM_4330 = $4330;
|
|
SDIO_DEVICE_ID_BROADCOM_4334 = $4334;
|
|
SDIO_DEVICE_ID_BROADCOM_4335_4339 = $4335;
|
|
SDIO_DEVICE_ID_BROADCOM_4339 = $4339;
|
|
SDIO_DEVICE_ID_BROADCOM_4345 = $4345;
|
|
SDIO_DEVICE_ID_BROADCOM_4354 = $4354;
|
|
SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359 = $4355;
|
|
SDIO_DEVICE_ID_BROADCOM_4356 = $4356;
|
|
SDIO_DEVICE_ID_BROADCOM_4359 = $4359;
|
|
SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373 = $4373;
|
|
SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012 = $a804;
|
|
SDIO_DEVICE_ID_BROADCOM_43143 = $a887;
|
|
SDIO_DEVICE_ID_BROADCOM_43340 = $a94c;
|
|
SDIO_DEVICE_ID_BROADCOM_43341 = $a94d;
|
|
SDIO_DEVICE_ID_BROADCOM_43362 = $a962;
|
|
SDIO_DEVICE_ID_BROADCOM_43364 = $a9a4;
|
|
SDIO_DEVICE_ID_BROADCOM_43430 = $a9a6;
|
|
SDIO_DEVICE_ID_BROADCOM_43455 = $a9bf;
|
|
SDIO_DEVICE_ID_MARVELL_LIBERTAS = $9103;
|
|
SDIO_DEVICE_ID_MARVELL_8688_WLAN = $9104;
|
|
SDIO_DEVICE_ID_MARVELL_8688_BT = $9105;
|
|
SDIO_DEVICE_ID_MARVELL_8786_WLAN = $9116;
|
|
SDIO_DEVICE_ID_MARVELL_8787_WLAN = $9119;
|
|
SDIO_DEVICE_ID_MARVELL_8787_BT = $911a;
|
|
SDIO_DEVICE_ID_MARVELL_8787_BT_AMP = $911b;
|
|
SDIO_DEVICE_ID_MARVELL_8797_F0 = $9128;
|
|
SDIO_DEVICE_ID_MARVELL_8797_WLAN = $9129;
|
|
SDIO_DEVICE_ID_MARVELL_8797_BT = $912a;
|
|
SDIO_DEVICE_ID_MARVELL_8897_WLAN = $912d;
|
|
SDIO_DEVICE_ID_MARVELL_8897_BT = $912e;
|
|
SDIO_DEVICE_ID_MARVELL_8887_F0 = $9134;
|
|
SDIO_DEVICE_ID_MARVELL_8887_WLAN = $9135;
|
|
SDIO_DEVICE_ID_MARVELL_8887_BT = $9136;
|
|
SDIO_DEVICE_ID_MARVELL_8801_WLAN = $9139;
|
|
SDIO_DEVICE_ID_MARVELL_8997_F0 = $9140;
|
|
SDIO_DEVICE_ID_MARVELL_8997_WLAN = $9141;
|
|
SDIO_DEVICE_ID_MARVELL_8997_BT = $9142;
|
|
SDIO_DEVICE_ID_MARVELL_8977_WLAN = $9145;
|
|
SDIO_DEVICE_ID_MARVELL_8977_BT = $9146;
|
|
SDIO_DEVICE_ID_MARVELL_8987_WLAN = $9149;
|
|
SDIO_DEVICE_ID_MARVELL_8987_BT = $914a;
|
|
SDIO_DEVICE_ID_MEDIATEK_MT7663 = $7663;
|
|
SDIO_DEVICE_ID_MEDIATEK_MT7668 = $7668;
|
|
SDIO_DEVICE_ID_MICROCHIP_WILC1000 = $5347;
|
|
SDIO_DEVICE_ID_SIANO_NOVA_B0 = $0201;
|
|
SDIO_DEVICE_ID_SIANO_NICE = $0202;
|
|
SDIO_DEVICE_ID_SIANO_VEGA_A0 = $0300;
|
|
SDIO_DEVICE_ID_SIANO_VENICE = $0301;
|
|
SDIO_DEVICE_ID_SIANO_MING = $0302;
|
|
SDIO_DEVICE_ID_SIANO_PELE = $0500;
|
|
SDIO_DEVICE_ID_SIANO_RIO = $0600;
|
|
SDIO_DEVICE_ID_SIANO_DENVER_2160 = $0700;
|
|
SDIO_DEVICE_ID_SIANO_DENVER_1530 = $0800;
|
|
SDIO_DEVICE_ID_SIANO_NOVA_A0 = $1100;
|
|
SDIO_DEVICE_ID_SIANO_STELLAR = $5347;
|
|
SDIO_DEVICE_ID_TI_WL1251 = $9066;
|
CISTPL_*
CISTPL_NULL = $00;
|
|
CISTPL_CHECKSUM = $10;
|
|
CISTPL_VERS_1 = $15;
|
|
CISTPL_ALTSTR = $16;
|
|
CISTPL_MANFID = $20;
|
|
CISTPL_FUNCID = $21;
|
|
CISTPL_FUNCE = $22;
|
|
CISTPL_SDIO_STD = $91;
|
|
CISTPL_SDIO_EXT = $92;
|
|
CISTPL_END = $FF;
|
|
SDIO_MAX_FUNCTIONS = 7;
|
|
SDIO_READ_CIS_TIMEOUT_MS = (10 * 1000);
|
10 seconds |
SDHCI_*
SDHCI_NAME_PREFIX = 'SDHCI';
|
Name prefix for SDHCI Devices |
SDHCI_TYPE_*
SDHCI_TYPE_NONE = 0;
|
|
SDHCI_TYPE_MMC = 1;
|
An MMC specification host controller |
SDHCI_TYPE_SD = 2;
|
An SD specification host controller |
SDHCI_TYPE_MMCI = 3;
|
An MMCI specification host controller |
SDHCI_TYPE_MAX = 3;
|
|
SDHCI Type Names | |
SDHCI_TYPE_NAMES:array[SDHCI_TYPE_NONE..SDHCI_TYPE_MAX] of String = (
| |
'SDHCI_TYPE_NONE',
|
|
'SDHCI_TYPE_MMC',
|
|
'SDHCI_TYPE_SD',
|
|
'SDHCI_TYPE_MMCI');
|
SDHCI_STATE_*
SDHCI_STATE_DISABLED = 0;
|
|
SDHCI_STATE_ENABLED = 1;
|
|
SDHCI_STATE_MAX = 1;
|
|
SDHCI State Names | |
SDHCI_STATE_NAMES:array[SDHCI_STATE_DISABLED..SDHCI_STATE_MAX] of String = (
| |
'SDHCI_STATE_DISABLED',
|
|
'SDHCI_STATE_ENABLED');
|
SDHCI_FLAG_*
SDHCI_FLAG_NONE = $00000000;
|
|
SDHCI_FLAG_SDMA = $00000001;
|
Host Controller supports SDMA specification |
SDHCI_FLAG_ADMA = $00000002;
|
Host Controller supports ADMA specification |
SDHCI_FLAG_SPI = $00000004;
|
Host Controller uses SPI interface |
SDHCI_FLAG_CRC_ENABLE = $00000008;
|
|
SDHCI_FLAG_NON_STANDARD = $00000010;
|
Host Controller uses a non standard interface (not supporting SDHCI register layout) |
SDHCI_FLAG_AUTO_CMD12 = $00000020;
|
Host Controller supports Auto CMD12 (Stop Transmission) |
SDHCI_FLAG_AUTO_CMD23 = $00000040;
|
Host Controller supports Auto CMD23 (Set Block Count) |
SDHCI_FLAG_64_BIT_DMA = $00000080;
|
Host Controller supports 64-bit ADMA |
SDHCI_FLAG_EXTERNAL_DMA = $00000100;
|
Host Controller requires external DMA engine to perform transfers |
SDHCI_FLAG_BUS_ADDRESSES = $00000200;
|
Host Controller requires use of bus addresses for SDMA/ADMA transfers |
SDHCI_DMA_*, SDHCI_BLOCK_*
SDHCI_DMA_ADDRESS = $00;
|
|
SDHCI_ARGUMENT2 = SDHCI_DMA_ADDRESS;
|
|
SDHCI_32BIT_BLK_CNT = SDHCI_DMA_ADDRESS;
|
|
SDHCI_BLOCK_SIZE = $04;
|
|
SDHCI_BLOCK_COUNT = $06;
|
|
SDHCI_ARGUMENT = $08;
|
|
SDHCI_TRANSFER_MODE = $0C;
|
|
SDHCI_COMMAND = $0E;
|
|
SDHCI_RESPONSE = $10;
|
|
SDHCI_BUFFER = $20;
|
|
SDHCI_PRESENT_STATE = $24;
|
|
SDHCI_HOST_CONTROL = $28;
|
|
SDHCI_POWER_CONTROL = $29;
|
|
SDHCI_BLOCK_GAP_CONTROL = $2A;
|
|
SDHCI_WAKE_UP_CONTROL = $2B;
|
|
SDHCI_CLOCK_CONTROL = $2C;
|
|
SDHCI_TIMEOUT_CONTROL = $2E;
|
|
SDHCI_SOFTWARE_RESET = $2F;
|
|
SDHCI_INT_STATUS = $30;
|
|
SDHCI_INT_ENABLE = $34;
|
|
SDHCI_SIGNAL_ENABLE = $38;
|
|
SDHCI_AUTO_CMD_STATUS = $3C;
|
{SDHCI_ACMD12_ERR |
SDHCI_HOST_CONTROL2 = $3E;
|
|
SDHCI_CAPABILITIES = $40;
|
|
SDHCI_CAPABILITIES_1 = $44;
|
|
SDHCI_MAX_CURRENT = $48;
|
|
4C-4F reserved for more max current | |
SDHCI_SET_ACMD12_ERROR= $50;
|
|
SDHCI_SET_INT_ERROR = $52;
|
|
SDHCI_ADMA_ERROR = $54;
|
|
55-57 reserved | |
SDHCI_ADMA_ADDRESS = $58;
|
|
SDHCI_ADMA_ADDRESS_HI = $5C;
|
|
5D-65 reserved | |
SDHCI_PRESET_FOR_SDR12 = $66;
|
|
SDHCI_PRESET_FOR_SDR25 = $68;
|
|
SDHCI_PRESET_FOR_SDR50 = $6A;
|
|
SDHCI_PRESET_FOR_SDR104 = $6C;
|
|
SDHCI_PRESET_FOR_DDR50 = $6E;
|
|
6F-73 reserved | |
SDHCI_PRESET_FOR_HS400 = $74;
|
Non-standard |
75-FB reserved | |
SDHCI_SLOT_INT_STATUS = $FC;
|
|
SDHCI_HOST_VERSION = $FE;
|
SDHCI_TRNS_*
SDHCI_TRNS_DMA = $01;
|
|
SDHCI_TRNS_BLK_CNT_EN = $02;
|
|
SDHCI_TRNS_AUTO_CMD12 = $04;
|
SDHCI_TRNS_ACMD12 |
SDHCI_TRNS_AUTO_CMD23 = $08;
|
|
SDHCI_TRNS_AUTO_SEL = SDHCI_TRNS_AUTO_CMD12 or SDHCI_TRNS_AUTO_CMD23;
|
|
SDHCI_TRNS_READ = $10;
|
|
SDHCI_TRNS_MULTI = $20;
|
SDHCI_CMD_*
SDHCI_CMD_RESP_MASK = $03;
|
|
SDHCI_CMD_CRC = $08;
|
|
SDHCI_CMD_INDEX = $10;
|
|
SDHCI_CMD_DATA = $20;
|
|
SDHCI_CMD_ABORTCMD = $C0;
|
SDHCI_CMD_RESP_*
SDHCI_CMD_RESP_NONE = $00;
|
|
SDHCI_CMD_RESP_LONG = $01;
|
|
SDHCI_CMD_RESP_SHORT = $02;
|
|
SDHCI_CMD_RESP_SHORT_BUSY = $03;
|
SDHCI_DATA_*, SDHCI_CARD_*
SDHCI_CMD_INHIBIT = $00000001;
|
|
SDHCI_DATA_INHIBIT = $00000002;
|
|
SDHCI_DOING_WRITE = $00000100;
|
|
SDHCI_DOING_READ = $00000200;
|
|
SDHCI_SPACE_AVAILABLE = $00000400;
|
|
SDHCI_DATA_AVAILABLE = $00000800;
|
|
SDHCI_CARD_PRESENT = $00010000;
|
|
SDHCI_CARD_STATE_STABLE = $00020000;
|
SDHCI_CD_STABLE |
SDHCI_CARD_DETECT_PIN_LEVEL = $00040000;
|
SDHCI_CD_LVL |
SDHCI_WRITE_PROTECT = $00080000;
|
Set if Write Enabled/Clear if Write Protected |
SDHCI_DATA_LEVEL_MASK = $00F00000;
|
SDHCI_DATA_LVL_MASK |
SDHCI_DATA_0_LEVEL_MASK = $00100000;
|
SDHCI_DATA_0_LVL_MASK |
SDHCI_CMD_LEVEL = $01000000;
|
SDHCI_CMD_LVL |
SDHCI_CTRL_*
SDHCI_CTRL_LED = $01;
|
|
SDHCI_CTRL_4BITBUS = $02;
|
|
SDHCI_CTRL_HISPD = $04;
|
|
SDHCI_CTRL_DMA_MASK = $18;
|
|
SDHCI_CTRL_SDMA = $00;
|
|
SDHCI_CTRL_ADMA1 = $08;
|
|
SDHCI_CTRL_ADMA32 = $10;
|
|
SDHCI_CTRL_ADMA64 = $18;
|
|
SDHCI_CTRL_ADMA3 = $18;
|
|
SDHCI_CTRL_8BITBUS = $20;
|
|
SDHCI_CTRL_CD_TEST_INS = $40;
|
|
SDHCI_CTRL_CD_TEST = $80;
|
SDHCI_POWER_*
SDHCI_POWER_ON = $01;
|
|
SDHCI_POWER_180 = $0A;
|
|
SDHCI_POWER_300 = $0C;
|
|
SDHCI_POWER_330 = $0E;
|
SDHCI_WAKE_*
SDHCI_WAKE_ON_INT = $01;
|
|
SDHCI_WAKE_ON_INSERT = $02;
|
|
SDHCI_WAKE_ON_REMOVE = $04;
|
SDHCI_CLOCK_*
SDHCI_DIVIDER_SHIFT = 8;
|
|
SDHCI_DIVIDER_HI_SHIFT = 6;
|
|
SDHCI_DIV_MASK = $FF;
|
|
SDHCI_DIV_MASK_LEN = 8;
|
|
SDHCI_DIV_HI_MASK = $0300;
|
|
SDHCI_PROG_CLOCK_MODE = $0020;
|
|
SDHCI_CLOCK_CARD_EN = $0004;
|
|
SDHCI_CLOCK_PLL_EN = $0008;
|
|
SDHCI_CLOCK_INT_STABLE = $0002;
|
|
SDHCI_CLOCK_INT_EN = $0001;
|
SDHCI_RESET_*
SDHCI_RESET_ALL = $01;
|
|
SDHCI_RESET_CMD = $02;
|
|
SDHCI_RESET_DATA = $04;
|
SDHCI_INT_*
SDHCI_INT_RESPONSE = $00000001;
|
|
SDHCI_INT_DATA_END = $00000002;
|
|
SDHCI_INT_BLK_GAP = $00000004;
|
|
SDHCI_INT_DMA_END = $00000008;
|
|
SDHCI_INT_SPACE_AVAIL = $00000010;
|
|
SDHCI_INT_DATA_AVAIL = $00000020;
|
|
SDHCI_INT_CARD_INSERT = $00000040;
|
|
SDHCI_INT_CARD_REMOVE = $00000080;
|
|
SDHCI_INT_CARD_INT = $00000100;
|
|
SDHCI_INT_RETUNE = $00001000;
|
|
SDHCI_INT_CQE = $00004000;
|
|
SDHCI_INT_ERROR = $00008000;
|
|
SDHCI_INT_TIMEOUT = $00010000;
|
|
SDHCI_INT_CRC = $00020000;
|
|
SDHCI_INT_END_BIT = $00040000;
|
|
SDHCI_INT_INDEX = $00080000;
|
|
SDHCI_INT_DATA_TIMEOUT = $00100000;
|
|
SDHCI_INT_DATA_CRC = $00200000;
|
|
SDHCI_INT_DATA_END_BIT = $00400000;
|
|
SDHCI_INT_BUS_POWER = $00800000;
|
|
SDHCI_INT_AUTO_CMD_ERR= $01000000;
|
SDHCI_INT_ACMD12ERR |
SDHCI_INT_ADMA_ERROR = $02000000;
|
|
SDHCI_INT_NORMAL_MASK = $00007FFF;
|
|
SDHCI_INT_ERROR_MASK = $FFFF8000;
|
|
SDHCI_INT_CMD_MASK = (SDHCI_INT_RESPONSE or SDHCI_INT_TIMEOUT or SDHCI_INT_CRC or SDHCI_INT_END_BIT or SDHCI_INT_INDEX or SDHCI_INT_AUTO_CMD_ERR);
| |
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);
| |
SDHCI_INT_ALL_MASK = (LongWord(-1));
|
|
SDHCI_CQE_INT_ERR_MASK = (SDHCI_INT_ADMA_ERROR or SDHCI_INT_BUS_POWER or SDHCI_INT_DATA_END_BIT or SDHCI_INT_DATA_CRC or SDHCI_INT_DATA_TIMEOUT or SDHCI_INT_INDEX or SDHCI_INT_END_BIT or SDHCI_INT_CRC or SDHCI_INT_TIMEOUT);
|
|
SDHCI_CQE_INT_MASK = (SDHCI_CQE_INT_ERR_MASK or SDHCI_INT_CQE);
|
SDHCI_AUTO_CMD_*
SDHCI_AUTO_CMD_TIMEOUT = $00000002;
|
|
SDHCI_AUTO_CMD_CRC = $00000004;
|
|
SDHCI_AUTO_CMD_END_BIT = $00000008;
|
|
SDHCI_AUTO_CMD_INDEX = $00000010;
|
SDHCI_CTRL_*
SDHCI_CTRL_UHS_MASK = $0007;
|
|
SDHCI_CTRL_UHS_SDR12 = $0000;
|
|
SDHCI_CTRL_UHS_SDR25 = $0001;
|
|
SDHCI_CTRL_UHS_SDR50 = $0002;
|
|
SDHCI_CTRL_UHS_SDR104 = $0003;
|
|
SDHCI_CTRL_UHS_DDR50 = $0004;
|
|
SDHCI_CTRL_HS400 = $0005;
|
Non-standard |
SDHCI_CTRL_VDD_180 = $0008;
|
|
SDHCI_CTRL_DRV_TYPE_MASK = $0030;
|
|
SDHCI_CTRL_DRV_TYPE_B = $0000;
|
|
SDHCI_CTRL_DRV_TYPE_A = $0010;
|
|
SDHCI_CTRL_DRV_TYPE_C = $0020;
|
|
SDHCI_CTRL_DRV_TYPE_D = $0030;
|
|
SDHCI_CTRL_EXEC_TUNING = $0040;
|
|
SDHCI_CTRL_TUNED_CLK = $0080;
|
|
SDHCI_CMD23_ENABLE = $0800;
|
|
SDHCI_CTRL_V4_MODE = $1000;
|
|
SDHCI_CTRL_64BIT_ADDR = $2000;
|
|
SDHCI_CTRL_PRESET_VAL_ENABLE = $8000;
|
SDHCI_*_MASK*, SDHCI_*SHIFT
SDHCI_TIMEOUT_CLK_MASK = $0000003F;
|
|
SDHCI_TIMEOUT_CLK_SHIFT = 0;
|
|
SDHCI_TIMEOUT_CLK_UNIT = $00000080;
|
|
SDHCI_CLOCK_BASE_MASK = $00003F00;
|
|
SDHCI_CLOCK_V3_BASE_MASK = $0000FF00;
|
|
SDHCI_CLOCK_BASE_SHIFT = 8;
|
|
SDHCI_CLOCK_BASE_MULTIPLIER = 1000000;
|
|
SDHCI_MAX_BLOCK_MASK = $00030000;
|
|
SDHCI_MAX_BLOCK_SHIFT = 16;
|
|
SDHCI_CAN_DO_8BIT = $00040000;
|
|
SDHCI_CAN_DO_ADMA2 = $00080000;
|
|
SDHCI_CAN_DO_ADMA1 = $00100000;
|
|
SDHCI_CAN_DO_HISPD = $00200000;
|
|
SDHCI_CAN_DO_SDMA = $00400000;
|
|
SDHCI_CAN_VDD_330 = $01000000;
|
|
SDHCI_CAN_VDD_300 = $02000000;
|
|
SDHCI_CAN_VDD_180 = $04000000;
|
|
SDHCI_CAN_64BIT_V4 = $08000000;
|
|
SDHCI_CAN_64BIT = $10000000;
|
SDHCI_SUPPORT_*
SDHCI_SUPPORT_SDR50 = $00000001;
|
|
SDHCI_SUPPORT_SDR104 = $00000002;
|
|
SDHCI_SUPPORT_DDR50 = $00000004;
|
|
SDHCI_DRIVER_TYPE_A = $00000010;
|
|
SDHCI_DRIVER_TYPE_C = $00000020;
|
|
SDHCI_DRIVER_TYPE_D = $00000040;
|
|
SDHCI_RETUNING_TIMER_COUNT_MASK = $00000F00;
|
GENMASK(11,8) |
SDHCI_USE_SDR50_TUNING = $00002000;
|
|
SDHCI_RETUNING_MODE_MASK = $0000C000;
|
GENMASK(15,14) |
SDHCI_CLOCK_MUL_MASK = $00FF0000;
|
GENMASK(23,16) |
SDHCI_CAN_DO_ADMA3 = $08000000;
|
|
SDHCI_SUPPORT_HS400 = $80000000;
|
Non-standard |
SDHCI_MAX_CURRENT_*
SDHCI_MAX_CURRENT_LIMIT = $000000FF;
|
GENMASK(7,0) |
SDHCI_MAX_CURRENT_330_MASK = $000000FF;
|
GENMASK(7,0) |
SDHCI_MAX_CURRENT_300_MASK = $0000FF00;
|
GENMASK(15,8) |
SDHCI_MAX_CURRENT_180_MASK = $00FF0000;
|
GENMASK(23,16) |
SDHCI_MAX_CURRENT_MULTIPLIER = 4;
|
SDHCI_PRESET_*
SDHCI_PRESET_DRV_MASK = $0000C000;
|
GENMASK(15,14) |
SDHCI_PRESET_DRV_SHIFT = 14;
|
|
SDHCI_PRESET_CLKGEN_SEL = 1 shl 10;
|
BIT(10) |
SDHCI_PRESET_SDCLK_FREQ_MASK = $000003FF;
|
GENMASK(9,0) |
SDHCI_*_VER_*
SDHCI_VENDOR_VER_MASK = $FF00;
|
|
SDHCI_VENDOR_VER_SHIFT = 8;
|
|
SDHCI_SPEC_VER_MASK = $00FF;
|
|
SDHCI_SPEC_VER_SHIFT = 0;
|
|
SDHCI_SPEC_100 = 0;
|
|
SDHCI_SPEC_200 = 1;
|
|
SDHCI_SPEC_300 = 2;
|
|
SDHCI_SPEC_400 = 3;
|
|
SDHCI_SPEC_410 = 4;
|
|
SDHCI_SPEC_420 = 5;
|
SDHCI_MAX_CLOCK_DIV_*
SDHCI_MAX_CLOCK_DIV_SPEC_200 = 256;
|
|
SDHCI_MAX_CLOCK_DIV_SPEC_300 = 2046;
|
SDHCI_QUIRK*
From Linux /include/linux/mmc/sdhci.h | |
SDHCI_QUIRK_CLOCK_BEFORE_RESET = (1 shl 0);
|
Controller doesn't honor resets unless we touch the clock register |
SDHCI_QUIRK_FORCE_DMA = (1 shl 1);
|
Controller has bad caps bits, but really supports DMA |
SDHCI_QUIRK_NO_CARD_NO_RESET = (1 shl 2);
|
Controller doesn't like to be reset when there is no card inserted |
SDHCI_QUIRK_SINGLE_POWER_WRITE = (1 shl 3);
|
Controller doesn't like clearing the power reg before a change |
SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS = (1 shl 4);
|
Controller has flaky internal state so reset it on each ios change |
SDHCI_QUIRK_BROKEN_DMA = (1 shl 5);
|
Controller has an unusable DMA engine |
SDHCI_QUIRK_BROKEN_ADMA = (1 shl 6);
|
Controller has an unusable ADMA engine |
SDHCI_QUIRK_32BIT_DMA_ADDR = (1 shl 7);
|
Controller can only DMA from 32-bit aligned addresses |
SDHCI_QUIRK_32BIT_DMA_SIZE = (1 shl 8);
|
Controller can only DMA chunk sizes that are a multiple of 32 bits |
SDHCI_QUIRK_32BIT_ADMA_SIZE = (1 shl 9);
|
Controller can only ADMA chunks that are a multiple of 32 bits |
SDHCI_QUIRK_RESET_AFTER_REQUEST = (1 shl 10);
|
Controller needs to be reset after each request to stay stable |
SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER = (1 shl 11);
|
Controller needs voltage and power writes to happen separately |
SDHCI_QUIRK_BROKEN_TIMEOUT_VAL = (1 shl 12);
|
Controller provides an incorrect timeout value for transfers |
SDHCI_QUIRK_BROKEN_SMALL_PIO = (1 shl 13);
|
Controller has an issue with buffer bits for small transfers |
SDHCI_QUIRK_NO_BUSY_IRQ = (1 shl 14);
|
Controller does not provide transfer-complete interrupt when not busy |
SDHCI_QUIRK_BROKEN_CARD_DETECTION = (1 shl 15);
|
Controller has unreliable card detection |
SDHCI_QUIRK_INVERTED_WRITE_PROTECT = (1 shl 16);
|
Controller reports inverted write-protect state |
SDHCI_QUIRK_PIO_NEEDS_DELAY = (1 shl 18);
|
Controller does not like fast PIO transfers |
SDHCI_QUIRK_FORCE_BLK_SZ_2048 = (1 shl 20);
|
Controller has to be forced to use block size of 2048 bytes |
SDHCI_QUIRK_NO_MULTIBLOCK = (1 shl 21);
|
Controller cannot do multi-block transfers |
SDHCI_QUIRK_FORCE_1_BIT_DATA = (1 shl 22);
|
Controller can only handle 1-bit data transfers |
SDHCI_QUIRK_DELAY_AFTER_POWER = (1 shl 23);
|
Controller needs 10ms delay between applying power and clock |
SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK = (1 shl 24);
|
Controller uses SDCLK instead of TMCLK for data timeouts |
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN = (1 shl 25);
|
Controller reports wrong base clock capability |
SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC = (1 shl 26);
|
Controller cannot support End Attribute in NOP ADMA descriptor |
SDHCI_QUIRK_MISSING_CAPS = (1 shl 27);
|
Controller is missing device caps. Use caps provided by host |
SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 = (1 shl 28);
|
Controller uses Auto CMD12 command to stop the transfer |
SDHCI_QUIRK_NO_HISPD_BIT = (1 shl 29);
|
Controller doesn't have HISPD bit field in HI-SPEED SD card |
SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC = (1 shl 30);
|
Controller treats ADMA descriptors with length 0000h incorrectly |
SDHCI_QUIRK_UNSTABLE_RO_DETECT = (1 shl 31);
|
The read-only detection via SDHCI_PRESENT_STATE register is unstable |
SDHCI_QUIRK2_HOST_OFF_CARD_ON = (1 shl 0);
|
|
SDHCI_QUIRK2_HOST_NO_CMD23 = (1 shl 1);
|
|
SDHCI_QUIRK2_NO_1_8_V = (1 shl 2);
|
The system physically doesn't support 1.8v, even if the host does |
SDHCI_QUIRK2_PRESET_VALUE_BROKEN = (1 shl 3);
|
|
SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON = (1 shl 4);
|
|
SDHCI_QUIRK2_BROKEN_HOST_CONTROL = (1 shl 5);
|
Controller has a non-standard host control register |
SDHCI_QUIRK2_BROKEN_HS200 = (1 shl 6);
|
Controller does not support HS200 |
SDHCI_QUIRK2_BROKEN_DDR50 = (1 shl 7);
|
Controller does not support DDR50 |
SDHCI_QUIRK2_STOP_WITH_TC = (1 shl 8);
|
Stop command (CMD12) can set Transfer Complete when not using MMC_RSP_BUSY |
SDHCI_QUIRK2_BROKEN_64_BIT_DMA = (1 shl 9);
|
Controller does not support 64-bit DMA |
SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD = (1 shl 10);
|
Need clear transfer mode register before send cmd |
SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400 = (1 shl 11);
|
Capability register bit-63 indicates HS400 support |
SDHCI_QUIRK2_TUNING_WORK_AROUND = (1 shl 12);
|
Forced tuned clock |
SDHCI_QUIRK2_SUPPORT_SINGLE = (1 shl 13);
|
Disable the block count for single block transactions |
SDHCI_QUIRK2_ACMD23_BROKEN = (1 shl 14);
|
Controller broken with using ACMD23 |
SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN = (1 shl 15);
|
Broken Clock divider zero in controller |
SDHCI_QUIRK2_RSP_136_HAS_CRC = (1 shl 16);
|
Controller has CRC in 136 bit Command Response |
SDHCI_QUIRK2_DISABLE_HW_TIMEOUT = (1 shl 17);
|
Disable HW timeout if the requested timeout is more than the maximum obtainable timeout |
SDHCI_QUIRK2_USE_32BIT_BLK_CNT = (1 shl 18);
|
32-bit block count may not support eMMC where upper bits of CMD23 are used for other purposes. Support 16-bit block count by default otherwise, SDHCI_QUIRK2_USE_32BIT_BLK_CNT can be selected to use 32-bit block count |
SDHCI_DEFAULT_BOUNDARY_*
Valid values from 4K to 512K in powers of 2 | |
SDHCI_DEFAULT_BOUNDARY_SIZE = (512 * 1024);
|
Default to 512K boundary |
SDHCI_DEFAULT_BOUNDARY_ARG = 7;
|
(ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12) |
SDHCI_ADMA2_32_DESC_SIZE*
SDHCI_ADMA2_32_DESC_SIZE = 8;
|
SDHCI_ADMA2_ALIGN*
SDHCI_ADMA2_ALIGN = 4;
|
|
SDHCI_ADMA2_MASK = (SDHCI_ADMA2_ALIGN - 1);
|
SDHCI_ADMA2_DESC_ALIGN*
SDHCI_ADMA2_DESC_ALIGN = 8;
|
SDHCI_ADMA2_64_DESC_SIZE*
SDHCI_ADMA2_64_DESC_SIZE = 12;
|
|
SDHCI_ADMA2_64_DESC_V4_SIZE = 16;
|
Use 128-bit descriptor, if Host Version 4 Enable is set in the Host Control 2 register |
SDHCI_ADMA2_DESC_ATTR_*
SDHCI_ADMA2_DESC_ATTR_VALID = $01;
|
|
SDHCI_ADMA2_DESC_ATTR_END = $02;
|
|
SDHCI_ADMA2_DESC_ATTR_INT = $04;
|
|
SDHCI_ADMA2_DESC_ATTR_NOP = $00;
|
|
SDHCI_ADMA2_DESC_ATTR_TRAN = $20;
|
|
SDHCI_ADMA2_DESC_ATTR_LINK = $30;
|
|
SDHCI_ADMA2_DESC_TRAN_VALID = SDHCI_ADMA2_DESC_ATTR_TRAN or SDHCI_ADMA2_DESC_ATTR_VALID;
|
0x21 |
SDHCI_ADMA2_DESC_NOP_END_VALID = SDHCI_ADMA2_DESC_ATTR_NOP or SDHCI_ADMA2_DESC_ATTR_END or SDHCI_ADMA2_DESC_ATTR_VALID;
|
0x3 |
SDHCI_ADMA2_DESC_END = SDHCI_ADMA2_DESC_ATTR_END;
|
0x2 |
SDHCI_MAX_SEGS*
Assuming a 512KB maximum request size and a minimum 4KB page size | |
SDHCI_MAX_SEGS = 128;
|
SDHCI_TIMEOUT_VALUE*
SDHCI_TIMEOUT_VALUE = $0E;
|
Type definitions
MMC command
PMMCCommand = ^TMMCCommand;
TMMCCommand = record
Command Properties | |
Command:Word;
|
|
Argument:LongWord;
|
|
ResponseType:LongWord;
|
|
Response:array[0..3] of LongWord;
|
|
Status:LongWord;
|
|
Data:PMMCData;
|
|
Timeout:LongWord;
|
Milliseconds |
Host Properties | |
DataCompleted:Boolean;
|
|
BusyCompleted:Boolean;
|
|
TuningCompleted:Boolean;
|
|
CommandCompleted:Boolean;
|
MMC data
PMMCData = ^TMMCData;
TMMCData = record
Data Properties | |
Data:Pointer;
|
|
Flags:LongWord;
|
|
BlockSize:LongWord;
|
|
BlockCount:LongWord;
|
|
Host Properties | |
BlockOffset:LongWord;
|
|
BlocksRemaining:LongWord;
|
|
BytesRemaining:LongWord;
|
|
BytesTransfered:LongWord;
|
MMC card identification data (CID)
PMMCCardIdentificationData = ^TMMCCardIdentificationData;
TMMCCardIdentificationData = record
Note: See: Section 5.2 of SD Physical Layer Simplified Specification Version 4.10 | |
ManufacturerId:Byte;
|
|
OEMId:Word;
|
|
ProductName:array[0..7] of Char;
|
Max 0 to 6, 1 extra for null terminator |
ProductRevision:Byte;
|
|
HardwareRevision:Byte;
|
|
FirmwareRevision:Byte;
|
|
ProductSerialNumber:LongWord;
|
|
ManufacturingMonth:Byte;
|
|
ManufacturingYear:Word;
|
|
CRC:Byte;
|
CRC7 checksum |
MMC card specific erase data (CSD)
TMMCCardSpecificSDEraseData = record
Note: See: Section 5.3 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for CSD) | |
EraseBlockEnable:Boolean;
|
Erase single block enable |
SectorSize:Byte;
|
Erase sector size |
MMC card specific MMC22 erase data
TMMCCardSpecificMMC22EraseData = record
SectorSize:Byte;
|
Erase sector size |
EraseGroupSize:Byte;
|
Erase group size |
MMC card specific MMC31 erase data
TMMCCardSpecificMMC31EraseData = record
EraseGroupSize:Byte;
|
Erase group size |
EraseGroupMultiplier:Byte;
|
Erase group size multiplier |
MMC card specific erase data
TMMCCardSpecificEraseData = record
case Integer of
|
|
0:(MMC22:TMMCCardSpecificMMC22EraseData);
|
|
1:(MMC31:TMMCCardSpecificMMC31EraseData);
|
|
2:(SD:TMMCCardSpecificSDEraseData);
|
MMC card specific data
PMMCCardSpecificData = ^TMMCCardSpecificData;
TMMCCardSpecificData = record
Card Values | |
CSDStructure:Byte;
|
CSD structure version |
SpecVersion:Byte;
|
System specification version (MMC/eMMC Only) |
TAAC:Byte;
|
Data read access-time-1 |
NSAC:Byte;
|
Data read access-time-2 in CLK cycles (NSAC*100) |
TransferSpeed:Byte;
|
Max. data transfer rate |
CCC:Word;
|
Card command classes |
ReadBlockLength:Byte;
|
Max. read data block length |
ReadBlockPartial:Boolean;
|
Partial blocks for read allowed |
WriteBlockMisalign:Boolean;
|
Write block misalignment |
ReadBlockMisalign:Boolean;
|
Read block misalignment |
DSRImplemented:Boolean;
|
DSR implemented |
DeviceSize:LongWord;
|
Device size |
VDDReadCurrentMin:Byte;
|
Max. read current @VDD min |
VDDReadCurrentMax:Byte;
|
Max. read current @VDD max |
VDDWriteCurrentMin:Byte;
|
Max. write current @VDD min |
VDDWriteCurrentMax:Byte;
|
Max. write current @VDD max |
DeviceSizeMultiplier:Byte;
|
Device size multiplier |
Erase:TMMCCardSpecificEraseData;
|
Erase group details |
WriteProtectGroupSize:Byte;
|
Write protect group size |
WriteProtectGroupEnable:Boolean;
|
Write protect group enable |
DefaultECC:Byte;
|
Manufacturer default ECC (MMC/eMMC Only) |
ReadToWriteFactor:Byte;
|
Write speed factor |
WriteBlockLength:Byte;
|
Max. write data block length |
WriteBlockPartial:Boolean;
|
Partial blocks for write allowed |
ContentProtectApplication:Boolean;
|
Content protection application (MMC/eMMC Only) |
FileFormatGroup:Byte;
|
File format group |
CopyFlag:Boolean;
|
Copy flag |
PermanentWriteProtect:Boolean;
|
Permanent write protection |
TemporaryWriteProtect:Boolean;
|
Temporary write protection |
FileFormat:Byte;
|
File format |
ECC:Byte;
|
ECC code (MMC/eMMC Only) |
CRC:Byte;
|
CRC |
Calculated Values | |
DataAccessTime:LongWord;
|
In Nanoseconds |
DataAccessClocks:Word;
|
In Clock cycles |
DataTransferRate:LongWord;
|
In Hz |
EraseSize:LongWord;
|
In Sectors |
BlockSize:LongWord;
|
"Normalized" Block Size |
BlockCount:LongWord;
|
In "Normalized" Blocks |
BlockShift:LongWord;
|
"Normalized" Block Shift |
MMC extended card specific data
PMMCExtendedCardSpecificData = ^TMMCExtendedCardSpecificData;
TMMCExtendedCardSpecificData = record
Card Values | |
Revision:Byte;
|
Extended CSD revision (192) |
CacheControl:Byte;
|
Control to turn the Cache ON/OFF (33) |
PowerOffNotification:Byte;
|
Power Off Notification (34) |
PartitionSupport:Byte;
|
Partitioning Support (160) |
HardwareResetFunction:Byte;
|
H/W reset function (162]) |
WriteReliabilityParameter:Byte;
|
Write reliability parameter register (166]) |
RPMBSizeMult:Byte;
|
RPMB Size Multiplier (168) |
EraseGroupDef:Byte;
|
High-density erase group definition (175) |
PartConfig:Byte;
|
Partition configuration (179) |
ErasedMemoryContent:Byte;
|
Erased memory content (181) |
StrobeSupport:Byte;
|
Strobe Support (184) |
CSDStructure:Byte;
|
CSD STRUCTURE (194) |
CardType:Byte;
|
Device type (196) |
DriverStrength:Byte;
|
I/O Driver Strength (197) |
OutOfInterruptTime:Byte;
|
Out-of-interrupt busy timing (198) |
SectorCount:array[0..3] of Byte;
|
Sector Count (212)(4 bytes) |
SATimeout:Byte;
|
Sleep/awake timeout (217) |
HCEraseGapSize:Byte;
|
High-capacity write protect group size (221) |
ReliableSectors:Byte;
|
Reliable write sector count (222) |
EraseTimeoutMult:Byte;
|
High-capacity erase timeout (223) |
HCEraseGrpSize:Byte;
|
High-capacity erase unit size (224) |
SecTRIMMult:Byte;
|
Secure TRIM Multiplier (229) |
SecEraseMult:Byte;
|
Secure Erase Multiplier (230) |
SecFeatureSupport:Byte;
|
Secure Feature support (231) |
TRIMMult:Byte;
|
TRIM Multiplier (232) |
PowerClass52MHz195:Byte;
|
Power class for 52 MHz at 1.95 V (200) |
PowerClass26MHz195:Byte;
|
Power class for 26 MHz at 1.95 V (201) |
PowerClass52MHz360:Byte;
|
Power class for 52 MHz at 3.6 V (202) |
PowerClass26MHz360:Byte;
|
Power class for 26 MHz at 3.6 V (203) |
PowerClass200MHz195:Byte;
|
Power class for 200MHz, at VCCQ = 1.3V, VCC = 3.6V (236) |
PowerClass200MHz360:Byte;
|
Power class for 200MHz at VCCQ = 1.95V, VCC = 3.6V (237) |
PowerClassDDR52MHz195:Byte;
|
Power class for 52MHz, DDR at VCC = 1.95V (238) |
PowerClassDDR52MHz360:Byte;
|
Power class for 52MHz, DDR at VCC = 3.6V (239) |
PowerClassDDR200MHz360:Byte;
|
Power class for 200MHz, DDR at VCC = 3.6V (253) |
BKOPSStatus:Byte;
|
Background operations status (246) |
FirmwareVersion:array[0..MMC_FIRMWARE_VERSION_LEN - 1] of Byte;
|
(254) (8 bytes) |
PreEndOfLifeInfo:Byte;
|
Pre EOL information (267) |
DeviceLifetimeEstimateA:Byte;
|
Device life time estimation type A (268) |
DeviceLifetimeEstimateB:Byte;
|
Device life time estimation type B (269) |
MaxPackedWrites:Byte;
|
Max packed write commands (500) |
MaxPackedReads:Byte;
|
Max packed read commands (501) |
Calculated Values | |
Sectors:LongWord;
|
|
SleepAwakeTime:LongWord;
|
100ns units |
PartitionSwitchTime:LongWord;
|
ms |
GenericCMD6Time:LongWord;
|
10ms units |
PowerOffLongTime:LongWord;
|
ms |
HCEraseSize:LongWord;
|
Sectors |
HCEraseTimeout:LongWord;
|
Milliseconds |
DataSectorSize:LongWord;
|
512 bytes or 4KB |
DataTagUnitSize:LongWord;
|
|
HSMaxRate:LongWord;
|
Hz |
HS200MaxRate:LongWord;
|
Hz |
AvailableTypes:LongWord;
|
|
BootPartitionSize:UInt64;
|
Bytes |
EnhancedAreaOffset:UInt64;
|
Bytes |
EnhancedAreaSize:UInt64;
|
KB |
CacheSize:LongWord;
|
KB |
PartitionSettingCompleted:Boolean;
|
Enable Bit |
TRIMTimeout:LongWord;
|
Milliseconds |
PartitionSizes:array[0..MMC_NUM_GP_PARTITION - 1] of UInt64;
|
Bytes |
BootReadOnlySupport:LongWord;
|
Read Only Lock Support |
BootReadOnlyLockable:Boolean;
|
|
FieldFirmwareUpdate:Boolean;
|
Firmware upgrade support |
CommandQueueSupport:Boolean;
|
Command Queue supported |
CommandQueueDepth:LongWord;
|
Command Queue depth |
BackgroundOperations:Boolean;
|
BKOPS Supported |
ManualBKOPSEnable:Boolean;
|
Manual BKOPS Supported |
AutoBKOPSEnable:Boolean;
|
Auto BKOPS Supported |
HPI:Boolean;
|
HPI (High Priority Interrupt) Supported |
HPIEnable:Boolean;
|
HPI Enabled |
HPICommand:LongWord;
|
CMD used as HPI |
RPMBSize:UInt64;
|
Bytes |
EnhancedRPMBSupport:Boolean;
|
|
ErasedByte:Byte;
|
Value after Erase |
FeatureSupport:LongWord;
|
Version specific features (eg MMC_DISCARD_FEATURE) |
SD status data (SSR)
PSDStatusData = ^TSDStatusData;
TSDStatusData = record
Note: See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for MMC Device) | |
Card Values | |
BusWidth:Byte;
|
Shows the currently defined data bus width that was defined by SET_BUS_WIDTH command |
SecuredMode:Boolean;
|
Card is in Secured Mode of operation (refer to the "Part 3 Security Specification") |
CardType:Word;
|
In the future, the 8 LSBs will be used to define different variations of an SD Memory Card (Each bit will define different SD Types). The 8 MSBs will be used to define SD Cards that do not comply with the Physical Layer Specification |
ProtectedSize:LongWord;
|
Size of protected area |
SpeedClass:Byte;
|
Speed Class of the card |
PerformanceMove:Byte;
|
Performance of move indicated by 1 [MB/s] step |
EraseSize:Word;
|
Number of AUs to be erased at a time |
EraseTimeout:Byte;
|
Timeout value for erasing areas specified by UNIT_OF_ERASE_AU |
EraseOffset:Byte;
|
Fixed offset value added to erase time |
UHSSpeedGrade:Byte;
|
Speed Grade for UHS mode |
Calculated Values | |
AllocationUnitSize:Byte;
|
Size of Allocation Unit |
UHSAllocationUnitSize:Byte;
|
Size of Allocation Unit for UHS mode |
SD switch data
PSDSwitchData = ^TSDSwitchData;
TSDSwitchData = record
Note: See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 | |
Card Values | |
MaximumCurrent:Word;
|
Maximum Current/Power Consumption |
Group6Support:Word;
|
Support Bits of Functions in Function Group 6 |
Group5Support:Word;
|
Support Bits of Functions in Function Group 5 |
Group4Support:Word;
|
Support Bits of Functions in Function Group 4 |
Group3Support:Word;
|
Support Bits of Functions in Function Group 3 |
Group2Support:Word;
|
Support Bits of Functions in Function Group 2 |
Group1Support:Word;
|
Support Bits of Functions in Function Group 1 |
Group6Selection:Byte;
|
Function Selection of Function Group 6 |
Group5Selection:Byte;
|
Function Selection of Function Group 5 |
Group4Selection:Byte;
|
Function Selection of Function Group 4 |
Group3Selection:Byte;
|
Function Selection of Function Group 3 |
Group2Selection:Byte;
|
Function Selection of Function Group 2 |
Group1Selection:Byte;
|
Function Selection of Function Group 1 |
StructureVersion:Byte;
|
Data Structure Version |
Group6BusyStatus:Word;
|
Busy Status of functions in group 6 |
Group5BusyStatus:Word;
|
Busy Status of functions in group 5 |
Group4BusyStatus:Word;
|
Busy Status of functions in group 4 |
Group3BusyStatus:Word;
|
Busy Status of functions in group 3 |
Group2BusyStatus:Word;
|
Busy Status of functions in group 2 |
Group1BusyStatus:Word;
|
Busy Status of functions in group 1 |
SD configuration data (SCR)
PSDConfigurationData = ^TSDConfigurationData;
TSDConfigurationData = record
Note: See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 (Defined here for MMC Device) | |
Card Values | |
SCRStructure:Byte;
|
SCR Structure version |
SpecVersion:Byte;
|
SD Memory Card - Spec. Version |
DataAfterErase:Byte;
|
Data status after erases |
Security:Byte;
|
CPRM Security Support |
BusWidths:Byte;
|
DAT Bus widths supported |
SpecVersion3:Boolean;
|
Spec. Version 3.00 or higher |
ExtendedSecurity:Byte;
|
Extended Security Support |
SpecVersion4:Boolean;
|
Spec. Version 4.00 or higher |
CommandSupport:Byte;
|
Command Support bits |
Calculated Values | |
ErasedByte:Byte;
|
Value after Erase |
MMC device types
PMMCDevice = ^TMMCDevice;
TMMCDevice = record
Device Properties | |
Device:TDevice;
|
The Device entry for this MMC |
MMC Properties | |
MMCId:LongWord;
|
Unique Id of this MMC in the MMC table |
MMCState:LongWord;
|
MMC state (eg MMC_STATE_INSERTED) |
DeviceInitialize:TMMCDeviceInitialize;
|
A Device specific DeviceInitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceDeinitialize:TMMCDeviceDeinitialize;
|
A Device specific DeviceDeinitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceGetCardDetect:TMMCDeviceGetCardDetect;
|
A Device specific DeviceGetCardDetect method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceGetWriteProtect:TMMCDeviceGetWriteProtect;
|
A Device specific DeviceGetWriteProtect method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceSendCommand:TMMCDeviceSendCommand;
|
A Device specific DeviceSendCommand method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceSetIOS:TMMCDeviceSetIOS;
|
A Device specific DeviceSetIOS method implementing a standard MMC device interface (Or nil if the default method is suitable) |
Statistics Properties | |
CommandCount:LongWord;
|
|
CommandErrors:LongWord;
|
|
Driver Properties | |
Lock:TMutexHandle;
|
Device lock |
Version:LongWord;
|
|
Clock:LongWord;
|
|
Timing:LongWord;
|
|
BusWidth:LongWord;
|
|
DriverType:LongWord;
|
|
SignalVoltage:LongWord;
|
|
Voltages:LongWord;
|
|
Capabilities:LongWord;
|
|
Capabilities2:LongWord;
|
|
EraseSize:LongWord;
|
Erase Size in Sectors |
EraseShift:LongWord;
|
|
EraseArgument:LongWord;
|
|
PreferredEraseSize:LongWord;
|
Preferred Erase Size in Sectors |
EnhancedStrobe:LongBool;
|
|
Register Properties | |
See: Table 3-2: SD Memory Card Registers of SD Physical Layer Simplified Specification Version 4.10 | |
InterfaceCondition:LongWord;
|
Interface Condition Result |
OperationCondition:LongWord;
|
Operation Condition Register (OCR) See: Section 5.1 of SD Physical Layer Simplified Specification Version 4.10 |
RelativeCardAddress:LongWord;
|
Relative Card Address (RCA) (Word) See: Section 5.4 of SD Physical Layer Simplified Specification Version 4.10 |
CardSpecific:array[0..3] of LongWord;
|
Card Specific Data (CSD) See: Section 5.3 of SD Physical Layer Simplified Specification Version 4.10 |
CardIdentification:array[0..3] of LongWord;
|
Card Identification Data (CID) See: Section 5.2 of SD Physical Layer Simplified Specification Version 4.10 |
ExtendedCardSpecific:PByte;
|
Extended Card Specific Data (EXTCSD) See: Section 7.4 of Embedded Multi-Media Card (eMMC) Electrical Standard 5.1 |
CardStatus:LongWord;
|
Card Status Register (CSR) See: Section 4.10.1 of SD Physical Layer Simplified Specification Version 4.10 |
DriverStage:LongWord;
|
Driver Stage Register (DSR) (Word) See: Section 5.5 of SD Physical Layer Simplified Specification Version 4.10 |
SDStatus:array[0..15] of LongWord;
|
SD Status Register (SSR) See: Section 4.10.2 of SD Physical Layer Simplified Specification Version 4.10 |
SDSwitch:array[0..15] of LongWord;
|
SD Switch Status See: Section 4.3.10 of SD Physical Layer Simplified Specification Version 4.10 |
SDConfiguration:array[0..3] of LongWord;
|
SD Configuration Register (SCR) See: Section 5.6 of SD Physical Layer Simplified Specification Version 4.10 |
Configuration Properties | |
Note: 16 bytes instead of 8 to allow correct operation of MMCExtractBits, offset handled by SDDeviceSendSDConfiguration. | |
CardSpecificData:TMMCCardSpecificData;
|
|
CardIdentificationData:TMMCCardIdentificationData;
|
|
ExtendedCardSpecificData:TMMCExtendedCardSpecificData;
|
|
SDStatusData:TSDStatusData;
|
|
SDSwitchData:TSDSwitchData;
|
|
SDConfigurationData:TSDConfigurationData;
|
|
SDIO Properties | |
CCCR:PSDIOCCCR;
|
SDIO Common Card Register Information |
CIS:PSDIOCIS;
|
SDIO Common CIS (Card Information Structure) Information |
Tuples:PSDIOTuple;
|
SDIO CIS (Card Information Structure) tuples on this MMC |
SDIOCount:LongWord;
|
SDIO function count for this MMC (Where Applicable) |
SDIOFunctions:array[0..SDIO_MAX_FUNCTIONS - 1] of PSDIOFunction;
|
SDIO functions on this MMC (Where Applicable) |
SDIOInterruptFunction:PSDIOFunction;
|
SDIO function for all interrupts (If only one interrupt is registered) |
Storage Properties | |
Storage:PStorageDevice;
|
The Storage entry for this MMC (Where Applicable) |
Internal Properties | |
Prev:PMMCDevice;
|
Previous entry in MMC table |
Next:PMMCDevice;
|
Next entry in MMC table |
MMC enumeration callback
TMMCEnumerate = function(MMC:PMMCDevice; Data:Pointer):LongWord;
|
MMC notification callback
TMMCNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
MMC device initialize
TMMCDeviceInitialize = function(MMC:PMMCDevice):LongWord;
|
MMC device deinitialize
TMMCDeviceDeinitialize = function(MMC:PMMCDevice):LongWord;
|
MMC device get card detect
TMMCDeviceGetCardDetect = function(MMC:PMMCDevice):LongWord;
|
MMC device get write protect
TMMCDeviceGetWriteProtect = function(MMC:PMMCDevice):LongWord;
|
MMC device send command
TMMCDeviceSendCommand = function(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
|
MMC device set IOS
TMMCDeviceSetIOS = function(MMC:PMMCDevice):LongWord;
|
SDIO CCCR
PSDIOCCCR = ^TSDIOCCCR;
TSDIOCCCR = record
SDIO Properties | |
CCCRVersion:Byte;
|
CCCR (Card Common Control Register) Version (00h) |
SDIOVersion:Byte;
|
SDIO Specification Version (00h) |
SDVersion:Byte;
|
SD Specification Version (04h) |
CCCRCapabilities:Byte;
|
CCCR Capabilities Register (08h) |
CCCRPowerControl:Byte;
|
CCCR Power Control Register (12h) |
CCCRBusSpeed:Byte;
|
CCCR Bus Speed Select Register (13h) |
CCCRUHSSupport:Byte;
|
CCCR UHS-I Support Register (14h) |
CCCRDriverStrength:Byte;
|
CCCR Driver Strength Register (15h) |
Driver Properties | |
MultiBlock:Boolean;
|
Card Capability Multi Block Transfer (SMB) |
LowSpeed:Boolean;
|
Card Capability Low Speed Card (LSC) |
WideBus:Boolean;
|
Card Capability 4-bit Mode for Low Speed Card (4BLS) |
HighPower:Boolean;
|
Support Master Power Control (SMPC) |
HighSpeed:Boolean;
|
Support High Speed (SHS) |
SDIO CIS
PSDIOCIS = ^TSDIOCIS;
TSDIOCIS = record
Vendor:Word;
|
|
Device:Word;
|
|
BlockSize:Word;
|
|
MaxClock:LongWord;
|
SDIO tuple
PSDIOTuple = ^TSDIOTuple;
TSDIOTuple = record
Next:PSDIOTuple;
|
|
Code:Byte;
|
|
Size:Byte;
|
|
Data:array[0..0] of Byte;
|
SDIO function interrupt handler
TSDIOInterruptHandler = procedure(Func:PSDIOFunction);
|
SDIO function enumeration callback
TSDIOFunctionEnumerate = function(Func:PSDIOFunction; Data:Pointer):LongWord;
|
SDIO function
FSDIOFunction = ^TSDIOFunction;
TSDIOFunction = record
Function Properties | |
SDIOState:LongWord;
|
SDIO function state (eg SDIO_STATE_ATTACHED) |
SDIOStatus:LongWord;
|
SDIO function status (eg SDIO_STATUS_BOUND) |
MMC:PMMCDevice;
|
The MMC device for this function |
Number:LongWord;
|
The function number |
ClassId:Byte;
|
Standard class Id |
VendorId:Word;
|
Vendor Id |
DeviceId:Word;
|
Device Id |
BlockSize:LongWord;
|
Current block size |
MaxBlockSize:LongWord;
|
Maximum block size |
EnableTimeout:LongWord;
|
Function enable timeout |
Handler:TSDIOInterruptHandler;
|
Interrupt handler for this function |
DMABuffer:Pointer;
|
DMA compatible buffer for small reads and writes |
Tuples:PSDIOTuple;
|
CIS (Card Information Structure) tuples for this function |
Driver:PSDIODriver;
|
Driver this function is bound to, if any |
DriverData:Pointer;
|
Private data for the driver of this SDIO device |
SDIO driver enumeration callback
TSDIODriverEnumerate = function(Driver:PSDIODriver;Data:Pointer):LongWord;
|
SDIO driver bind callback
TSDIODriverBind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
|
SDIO driver unbind callback
TSDIODriverUnbind = function(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
|
SDIO driver
PSDIODriver = ^TSDIODriver;
TSDIODriver = record
Driver Properties | |
Driver:TDriver;
|
The Driver entry for this SDIO Driver |
SDIO Properties | |
DriverBind:TSDIODriverBind;
|
A Driver specific DriverBind method implementing the standard SDIO driver interface |
DriverUnbind:TSDIODriverUnbind;
|
A Driver specific DriverUnbind method implementing the standard SDIO driver interface |
Interface Properties | |
Lock:TMutexHandle;
|
Driver lock |
Internal Properties | |
Prev:PSDIODriver;
|
Previous entry in Driver table |
Next:PSDIODriver;
|
Next entry in Driver table |
SDHCI ADMA2 32-bit descriptor
PSDHCIADMA2Descriptor32 = ^TSDHCIADMA2Descriptor32;
TSDHCIADMA2Descriptor32 = packed record
See: ADMA2 Descriptor Format - SD Host Controller Simplified Specification Version 4.20 | |
Command:Word;
|
|
Len:Word;
|
|
Address:LongWord;
|
SDHCI ADMA2 64-bit descriptor
PSDHCIADMA2Descriptor64 = ^TSDHCIADMA2Descriptor64;
TSDHCIADMA2Descriptor64 = packed record
See: ADMA2 Descriptor Format - SD Host Controller Simplified Specification Version 4.20 | |
Note: 12-byte descriptor can't always be 8-byte aligned | |
Command:Word;
|
|
Len:Word;
|
|
AddressLow:LongWord;
|
|
AddressHigh:LongWord;
|
SDHCI ADMA2 64-bit V4 descriptor
PSDHCIADMA2Descriptor64v4 = ^TSDHCIADMA2Descriptor64v4;
TSDHCIADMA2Descriptor64v4 = packed record
Command:Word;
|
|
Len:Word;
|
|
AddressLow:LongWord;
|
|
AddressHigh:LongWord;
|
|
Reserved:LongWord;
|
SDHCI host types
PSDHCIHost = ^TSDHCIHost;
TSDHCIHost = record
Device Properties | |
Device:TDevice;
|
The Device entry for this SDHCI |
SDHCI Properties | |
SDHCIId:LongWord;
|
Unique Id of this SDHCI in the SDHCI table |
SDHCIState:LongWord;
|
SDHCI state (eg SDHCI_STATE_ENABLED) |
HostStart:TSDHCIHostStart;
|
A Host specific HostStart method implementing a standard SDHCI host interface |
HostStop:TSDHCIHostStop;
|
A Host specific HostStop method implementing a standard SDHCI host interface |
HostLock:TSDHCIHostLock;
|
A Host specific HostLock method implementing a standard SDHCI host interface |
HostUnlock:TSDHCIHostUnlock;
|
A Host specific HostUnlock method implementing a standard SDHCI host interface |
HostSignal:TSDHCIHostSignal;
|
A Host specific HostSignal method implementing a standard SDHCI host interface |
HostReadByte:TSDHCIHostReadByte;
|
A Host specific HostReadByte method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostReadWord:TSDHCIHostReadWord;
|
A Host specific HostReadWord method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostReadLong:TSDHCIHostReadLong;
|
A Host specific HostReadLong method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostWriteByte:TSDHCIHostWriteByte;
|
A Host specific HostWriteByte method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostWriteWord:TSDHCIHostWriteWord;
|
A Host specific HostWriteWord method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostWriteLong:TSDHCIHostWriteLong;
|
A Host specific HostWriteLong method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostReset:TSDHCIHostReset;
|
A Host specific HostReset method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostHardwareReset:TSDHCIHostHardwareReset;
|
A Host specific HostHardwareReset method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetPower:TSDHCIHostSetPower;
|
A Host specific HostSetPower method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetClock:TSDHCIHostSetClock;
|
A Host specific HostSetClock method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetTiming:TSDHCIHostSetTiming;
|
A Host specific HostSetTiming method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetBusWidth:TSDHCIHostSetBusWidth;
|
A Host specific HostSetBusWidth method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetClockDivider:TSDHCIHostSetClockDivider;
|
|
HostSetControlRegister:TSDHCIHostSetControlRegister;
|
|
HostPrepareDMA:TSDHCIHostPrepareDMA;
|
A Host specific HostPrepareDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostStartDMA:TSDHCIHostStartDMA;
|
A Host specific HostStartDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostStopDMA:TSDHCIHostStopDMA;
|
A Host specific HostStopDMA method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostSetupCardIRQ:TSDHCIHostSetupCardIRQ;
|
A Host specific HostSetupCardIRQ method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
HostCompleteCardIRQ:TSDHCIHostCompleteCardIRQ;
|
A Host specific HostCompleteCardIRQ method implementing a standard SDHCI host interface (Or nil if the default method is suitable) |
DeviceInitialize:TMMCDeviceInitialize;
|
A Device specific DeviceInitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceDeinitialize:TMMCDeviceDeinitialize;
|
A Device specific DeviceDeinitialize method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceGetCardDetect:TMMCDeviceGetCardDetect;
|
A Device specific DeviceGetCardDetect method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceGetWriteProtect:TMMCDeviceGetWriteProtect;
|
A Device specific DeviceGetWriteProtect method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceSendCommand:TMMCDeviceSendCommand;
|
A Device specific DeviceSendCommand method implementing a standard MMC device interface (Or nil if the default method is suitable) |
DeviceSetIOS:TMMCDeviceSetIOS;
|
A Device specific DeviceSetIOS method implementing a standard MMC device interface (Or nil if the default method is suitable) |
Driver Properties | |
Spin:TSpinHandle;
|
Host lock (Spin) for use by interrupt handlers |
Lock:TMutexHandle;
|
Host lock (Mutex) for use by other functions |
Address:Pointer;
|
Host register base address |
Version:LongWord;
|
Host version information |
Quirks:LongWord;
|
Host quirks/bugs flags |
Quirks2:LongWord;
|
Host additional quirks/bugs flags |
Clock:LongWord;
|
Host current clock |
Power:LongWord;
|
Host current power |
Timing:LongWord;
|
Host current timing |
BusWidth:LongWord;
|
Host current bus width |
Interrupts:LongWord;
|
Host interrupts to be handled |
Voltages:LongWord;
|
Host configured voltage flags |
Capabilities:LongWord;
|
Host configured capabilities flags |
Capabilities2:LongWord;
|
Host configured additional capabilities flags |
TimeoutFrequency:LongWord;
|
Host configured timeout clock frequency (KHz) |
MinimumFrequency:LongWord;
|
Host configured minimum frequency (Hz) |
MaximumFrequency:LongWord;
|
Host configured maximum frequency (Hz) |
MaximumBlockSize:LongWord;
|
Host configured maximum block size |
MaximumBlockCount:LongWord;
|
Host configured maximum block count |
MaximumRequestSize:LongWord;
|
Host configured maximum request size |
MaximumBusyTimeout:LongWord;
|
Host configured maximum busy timeout (Milliseconds) |
MinimumDMASize:LongWord;
|
Minimum size for DMA read or write (Use PIO if less) |
MaximumPIOBlocks:LongWord;
|
Maximum blocks for PIO read or write (Use DMA if greater) |
PresetEnabled:LongBool;
|
Version 3.00 Preset Values Enabled (If applicable) |
CardIRQEnabled:LongBool;
|
SDIO card interrupt is enabled |
CardIRQWorker:TWorkerHandle;
|
SDIO card interrupt current worker |
CardIRQDevice:PMMCDevice;
|
SDIO card interrupt device |
CardIRQCount:LongWord;
|
SDIO card interrupt function registered count |
Command:PMMCCommand;
|
Currently processing command |
Wait:TSemaphoreHandle;
|
Command completed semaphore |
UseDMA:LongBool;
|
Use DMA for the current data transfer |
DMAData:TDMAData;
|
External DMA data descriptor for current request (If applicable) |
DMAWait:TSemaphoreHandle;
|
External DMA completed semaphore |
DMASlave:LongWord;
|
External DMA slave (DREQ) Id for this device (If applicable) |
DMABuffer:Pointer;
|
DMA bounce buffer for the current request (If applicable) |
DMADirection:LongWord;
|
DMA data direction for current request (If applicable) |
SDMABoundary:LongWord;
|
SDMA buffer boundary argument |
ADMATable:PSDHCIADMA2Descriptor64v4;
|
ADMA descriptors for current request (If applicable) |
ADMABuffer:Pointer;
|
ADMA alignment buffers for the current request (If applicable) |
ADMATableSize:LongWord;
|
ADMA descriptor table size in bytes (If applicable) |
ADMATableCount:LongWord;
|
ADMA descriptor table entry count (If applicable) |
ADMABufferSize:LongWord;
|
ADMA alignment buffers size in bytes (If applicable) |
ADMADescriptorSize:LongWord;
|
ADMA descriptor size in bytes (If applicable) |
Configuration Properties | |
PresetVoltages:LongWord;
|
Host predefined voltage flags |
PresetCapabilities:LongWord;
|
Host predefined capabilities flags |
PresetCapabilities2:LongWord;
|
Host predefined additional capabilities flags |
ClockMinimum:LongWord;
|
Host predefined minimum clock frequency |
ClockMaximum:LongWord;
|
Host predefined maximum clock frequency |
DriverStageRegister:LongWord;
|
Host predefined driver stage register (DSR) |
EnableV4Mode:LongBool;
|
Enable SDHCI version 4 protocol support |
Statistics Properties | |
RequestCount:LongWord;
|
Number of requests that have been submitted to this host |
RequestErrors:LongWord;
|
Number of requests that have failed on this host |
DataRequestCount:LongWord;
|
Number of data requests that have been submitted to this host |
CommandRequestCount:LongWord;
|
Number of command requests that have been submitted to this host |
PIODataTransferCount:LongWord;
|
Number of data requests that have been submitted for PIO transfer on this host |
DMADataTransferCount:LongWord;
|
Number of data requests that have been submitted for DMA transfer on this host |
InterruptCount:LongWord;
|
Number of interrupt requests received by the host |
DataInterruptCount:LongWord;
|
Number of data interrupt requests received by the host |
CommandInterruptCount:LongWord;
|
Number of command interrupt requests received by the host |
Internal Properties | |
Prev:PSDHCIHost;
|
Previous entry in SDHCI table |
Next:PSDHCIHost;
|
Next entry in SDHCI table |
SDHCI enumeration callback
TSDHCIEnumerate = function(SDHCI:PSDHCIHost; Data:Pointer):LongWord;
|
SDHCI notification callback
TSDHCINotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
SDHCI host start
TSDHCIHostStart = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host stop
TSDHCIHostStop = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host lock
TSDHCIHostLock = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host unlock
TSDHCIHostUnlock = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host signal
TSDHCIHostSignal = function(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord;
|
SDHCI host read byte
TSDHCIHostReadByte = function(SDHCI:PSDHCIHost; Reg:LongWord):Byte;
|
SDHCI host read word
TSDHCIHostReadWord = function(SDHCI:PSDHCIHost; Reg:LongWord):Word;
|
SDHCI host read long
TSDHCIHostReadLong = function(SDHCI:PSDHCIHost; Reg:LongWord):LongWord;
|
SDHCI host write byte
TSDHCIHostWriteByte = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte);
|
SDHCI host write word
TSDHCIHostWriteWord = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word);
|
SDHCI host write long
TSDHCIHostWriteLong = procedure(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord);
|
SDHCI host reset
TSDHCIHostReset = function(SDHCI:PSDHCIHost; Mask:Byte):LongWord;
|
SDHCI host hardware reset
TSDHCIHostHardwareReset = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host set power
TSDHCIHostSetPower = function(SDHCI:PSDHCIHost; Power:Word):LongWord;
|
SDHCI host set clock
TSDHCIHostSetClock = function(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;
|
SDHCI host set timing
TSDHCIHostSetTiming = function(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;
|
SDHCI host bus width
TSDHCIHostSetBusWidth = function(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;
|
SDHCI host set clock divider
TSDHCIHostSetClockDivider = function(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;
|
SDHCI host set control register
TSDHCIHostSetControlRegister = function(SDHCI:PSDHCIHost):LongWord;
|
SDHCI host prepare DMA
TSDHCIHostPrepareDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
|
SDHCI host start DMA
TSDHCIHostStartDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
|
SDHCI host stop DMA
TSDHCIHostStopDMA = function(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
|
SDHCI host setup card IRQ
TSDHCIHostSetupCardIRQ = function(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;
|
SDHCI host complete card IRQ
TSDHCIHostCompleteCardIRQ = function(SDHCI:PSDHCIHost):LongWord;
|
Function declarations
Initialization functions
procedure MMCInit;
Note | None documented |
---|
function MMCStart:LongWord;
Note | None documented |
---|
function MMCStop:LongWord;
Note | None documented |
---|
procedure MMCAsyncStart(SDHCI:PSDHCIHost);
Note | None documented |
---|
MMC functions
function MMCDeviceReadBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceWriteBlocks(MMC:PMMCDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceEraseBlocks(MMC:PMMCDevice; const Start,Count:Int64):LongWord;
Note | None documented |
---|
function MMCDeviceGoIdle(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSetClock(MMC:PMMCDevice; Clock:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSetTiming(MMC:PMMCDevice; Timing:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Reference | Section 3.4 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|
function MMCDeviceSetBlockLength(MMC:PMMCDevice; Length:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceSetBlockCount(MMC:PMMCDevice; Count:LongWord; Relative:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSetDriverStage(MMC:PMMCDevice; DriverStage:LongWord):LongWord;
Note | None documented |
---|
function MMCDeviceStopTransmission(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSelectCard(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDeselectCard(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSwitch(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout:LongWord):LongWord;
MMC | The MMC Device to modify |
---|---|
Setting | The Extended CSD command set (eg EXT_CSD_CMD_SET_NORMAL) |
Index | The index of the Extended CSD register to be set |
Value | The value to be set in the Extended CSD register |
Timeout | Command timeout in milliseconds |
function MMCDeviceSwitchEx(MMC:PMMCDevice; Setting,Index,Value:Byte; Timeout,Timing:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;
MMC | The MMC Device to modify |
---|---|
Setting | The Extended CSD command set (eg EXT_CSD_CMD_SET_NORMAL) |
Index | The index of the Extended CSD register to be set |
Value | The value to be set in the Extended CSD register |
Timeout | Command timeout in milliseconds |
Timing | New timing to enable after change (eg MMC_TIMING_MMC_HS) |
SendStatus | Use the MMC_CMD_SEND_STATUS command to poll for busy |
RetryCRCError | Retry if CRC error occurs when polling for busy |
function MMCDevicePollForBusy(MMC:PMMCDevice; Timeout,Command:LongWord):LongWord;
Note | None documented |
---|
function MMCDevicePollForBusyEx(MMC:PMMCDevice; Timeout,Command:LongWord; SendStatus,RetryCRCError:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardStatus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendAllCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDecodeExtendedCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSetRelativeAddress(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSPISetCRC(MMC:PMMCDevice; Enable:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceSPIReadOperationCondition(MMC:PMMCDevice; HighCapacity:Boolean):LongWord;
Note | None documented |
---|
function MMCDeviceInsert(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceRemove(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceInitialize(MMC:PMMCDevice):LongWord;
Reference | Section 3.6 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|
function MMCDeviceDeinitialize(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetCardDetect(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceGetWriteProtect(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceSendCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Note | None documented |
---|
function MMCDeviceSetIOS(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceCreate:PMMCDevice;
Return | Pointer to new MMC entry or nil if MMC could not be created |
---|
function MMCDeviceCreateEx(Size:LongWord):PMMCDevice;
Size | Size in bytes to allocate for new MMC (Including the MMC entry) |
---|---|
Return | Pointer to new MMC entry or nil if MMC could not be created |
function MMCDeviceDestroy(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceRegister(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceDeregister(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function MMCDeviceFind(MMCId:LongWord):PMMCDevice;
Note | None documented |
---|
function MMCDeviceFindByDevice(Device:PDevice):PMMCDevice;
Device | The device entry to match with the DeviceData value |
---|---|
Return | The MMC/SD device matched or nil if none found |
function MMCDeviceFindByName(const Name:String):PMMCDevice; inline;
Note | None documented |
---|
function MMCDeviceFindByDescription(const Description:String):PMMCDevice; inline;
Note | None documented |
---|
function MMCDeviceEnumerate(Callback:TMMCEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function MMCDeviceNotification(MMC:PMMCDevice; Callback:TMMCNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
SD functions
function SDDeviceSwitch(MMC:PMMCDevice; Mode,Group:Integer; Value:Byte; Buffer:Pointer):LongWord;
Buffer | Buffer must point to a 64 byte buffer for Switch Status information |
---|---|
Note | See 4.3.10 of SD Physical Layer Simplified Specification V4.10 |
function SDDeviceSwitchHighspeed(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSetBusWidth(MMC:PMMCDevice; Width:LongWord):LongWord;
Note | See Table 4-30 in Section 4.7.4 of SD Physical Layer Simplified Specification V4.10 |
---|
function SDDeviceSendInterfaceCondition(MMC:PMMCDevice):LongWord;
Note | See 4.3.13 of SD Physical Layer Simplified Specification V4.10.
CMD8 (SEND_IF_COND) must be invoked to support SD 2.0 cards. The card must be in Idle State before issuing this command. This command will fail harmlessly for SD 1.0 cards. |
---|
function SDDeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Note | See 4.2.3.1 of SD Physical Layer Simplified Specification V4.10 |
---|
function SDDeviceGetCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceDecodeCardSpecific(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceGetCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceDecodeCardIdentification(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSendSDStatus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceDecodeSDStatus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSendSDSwitch(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceDecodeSDSwitch(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSendSDConfiguration(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceDecodeSDConfiguration(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSendRelativeAddress(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDDeviceSendApplicationCommand(MMC:PMMCDevice; Command:PMMCCommand):LongWord;
Note | None documented |
---|
SDIO functions
function SDIODeviceReset(MMC:PMMCDevice):LongWord;
Note | See SDIO Simplified Specification V2.0, 4.4 Reset for SDIO |
---|
function SDIODeviceEnableWideBus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceDisableWideBus(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceEnableHighspeed(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceSwitchHighspeed(MMC:PMMCDevice; Enable:Boolean):LongWord;
Note | None documented |
---|
function SDIODeviceSendOperationCondition(MMC:PMMCDevice; Probe:Boolean):LongWord;
Note | None documented |
---|
function SDIODeviceReadWriteDirect(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Input:Byte; Output:PByte):LongWord;
Note | None documented |
---|
function SDIODeviceReadWriteExtended(MMC:PMMCDevice; Write:Boolean; Operation,Address:LongWord; Increment:Boolean; Buffer:Pointer; BlockCount,BlockSize:LongWord):LongWord;
Note | None documented |
---|
function SDIODeviceReadByte(MMC:PMMCDevice; Address:LongWord; Output:PByte):LongWord;
Note | None documented |
---|
function SDIODeviceWriteByte(MMC:PMMCDevice; Address:LongWord; Input:Byte):LongWord;
Note | None documented |
---|
function SDIODeviceReadCCCR(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceReadFBR(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIODeviceReadCIS(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIODeviceReadCommonCIS(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceReadFunctionCIS(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIODeviceProcessInterrupts(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIODeviceRegisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;
Note | None documented |
---|
function SDIODeviceDeregisterInterrupt(MMC:PMMCDevice; Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIODeviceBindFunctions(MMC:PMMCDevice):LongWord;
MMC | The MMC device to attempt to bind a driver to |
---|---|
Return | MMC_STATUS_SUCCESS if completed or another error code on failure |
function SDIODeviceUnbindFunctions(MMC:PMMCDevice; Driver:PSDIODriver):LongWord;
MMC | The MMC device to unbind a driver from |
---|---|
Driver | The driver to unbind the MMC device from (nil to unbind from current driver) |
Return | MMC_STATUS_SUCCESS if completed or another error code on failure |
function SDIOFunctionAllocate(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;
Note | None documented |
---|
function SDIOFunctionRelease(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIOFunctionFind(MMC:PMMCDevice; Number:LongWord):PSDIOFunction;
Note | None documented |
---|
function SDIOFunctionFindById(MMC:PMMCDevice; VendorId,DeviceId:Word):PSDIOFunction;
Note | None documented |
---|
function SDIOFunctionEnumerate(MMC:PMMCDevice; Callback:TSDIOFunctionEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function SDIOFunctionBind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;
Note | None documented |
---|
function SDIOFunctionUnbind(Func:PSDIOFunction; Driver:PSDIODriver):LongWord;
Note | None documented |
---|
function SDIOFunctionEnable(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIOFunctionDisable(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIOFunctionSetBlockSize(Func:PSDIOFunction; BlockSize:LongWord):LongWord;
Note | None documented |
---|
function SDIOFunctionReadWriteExtended(Func:PSDIOFunction; Write:Boolean; Address:LongWord; Increment:Boolean; Buffer:Pointer; Size:LongWord):LongWord;
Note | Handles splitting any size read or write into multiple IO_RW_EXTENDED requests, accounting for maximum block sizes. |
---|
function SDIOFunctionRead(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;
Note | None documented |
---|
function SDIOFunctionWrite(Func:PSDIOFunction; Address:LongWord; Buffer:Pointer; Size:LongWord):LongWord;
Note | None documented |
---|
function SDIOFunctionReadByte(Func:PSDIOFunction; Address:LongWord; Output:PByte):LongWord;
Note | None documented |
---|
function SDIOFunctionWriteByte(Func:PSDIOFunction; Address:LongWord; Input:Byte):LongWord;
Note | None documented |
---|
function SDIOFunctionWriteReadByte(Func:PSDIOFunction; Address:LongWord; Input:Byte; Output:PByte):LongWord;
Note | None documented |
---|
function SDIOFunctionReadWord(Func:PSDIOFunction; Address:LongWord; Output:PWord):LongWord;
Note | None documented |
---|
function SDIOFunctionWriteWord(Func:PSDIOFunction; Address:LongWord; Input:Word):LongWord;
Note | None documented |
---|
function SDIOFunctionReadLong(Func:PSDIOFunction; Address:LongWord; Output:PLongWord):LongWord;
Note | None documented |
---|
function SDIOFunctionWriteLong(Func:PSDIOFunction; Address:LongWord; Input:LongWord):LongWord;
Note | None documented |
---|
function SDIOFunctionRegisterInterrupt(Func:PSDIOFunction; Handler:TSDIOInterruptHandler):LongWord;
Note | None documented |
---|
function SDIOFunctionDeregisterInterrupt(Func:PSDIOFunction):LongWord;
Note | None documented |
---|
function SDIOHostDispatchInterrupt(SDHCI:PSDHCIHost; IRQ,FIQ:Boolean):LongWord;
Note | None documented |
---|
SDHCI driver functions
function SDIODriverCreate:PSDIODriver;
Return | Pointer to new Driver entry or nil if driver could not be created |
---|
function SDIODriverCreateEx(Size:LongWord):PSDIODriver;
Size | Size in bytes to allocate for new driver (Including the driver entry) |
---|---|
Return | Pointer to new Driver entry or nil if driver could not be created |
function SDIODriverDestroy(Driver:PSDIODriver):LongWord;
Note | None documented |
---|
function SDIODriverRegister(Driver:PSDIODriver):LongWord;
Note | None documented |
---|
function SDIODriverDeregister(Driver:PSDIODriver):LongWord;
Note | None documented |
---|
function SDIODriverFind(DriverId:LongWord):PSDIODriver;
Note | None documented |
---|
function SDIODriverFindByName(const Name:String):PSDIODriver; inline;
Note | None documented |
---|
function SDIODriverEnumerate(Callback:TSDIODriverEnumerate;Data:Pointer):LongWord;
Note | None documented |
---|
SDHCI functions
function SDHCIHostReset(SDHCI:PSDHCIHost; Mask:Byte):LongWord;
Reference | Section 3.3 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostHardwareReset(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSetPower(SDHCI:PSDHCIHost; Power:Word):LongWord;
Reference | Section 3.3 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|---|
Power | A shift value to indicate the first available value in the Voltages mask. Caller can use FirstBitSet(SDHCI.Voltages) - 1 to obtain the value of Power. If there are no values set then Power will be -1 ($FFFF) to indicate nothing or unknown. |
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostSetClock(SDHCI:PSDHCIHost; Clock:LongWord):LongWord;
Reference | Section 3.2 of SD Host Controller Simplified Specification V3.0 partA2_300.pdf |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostSetTiming(SDHCI:PSDHCIHost; Timing:LongWord):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSetBusWidth(SDHCI:PSDHCIHost; BusWidth:LongWord):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostPrepareDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostStartDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostStopDMA(SDHCI:PSDHCIHost; Command:PMMCCommand):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostCompleteDMA(Request:PDMARequest);
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSetupCardIRQ(SDHCI:PSDHCIHost; Enable:LongBool):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostCompleteCardIRQ(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostTransferPIO(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostTransferDMA(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostFinishCommand(SDHCI:PSDHCIHost):LongWord;
Note | Called by Interrupt Command handler when an SDHCI_INT_RESPONSE is received |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostFinishData(SDHCI:PSDHCIHost):LongWord;
Note | Called by Interrupt Data handler when data is received |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostCommandInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord; var ReturnMask:LongWord):LongWord;
Note | Called by SDHCI controller interrupt handler when a command interrupt is received |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostDataInterrupt(SDHCI:PSDHCIHost; InterruptMask:LongWord):LongWord;
Note | Called by SDHCI controller interrupt handler when a data interrupt is received |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostStart(SDHCI:PSDHCIHost):LongWord;
Note | Called automatically to start each registered SDHCI controller when required |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostStop(SDHCI:PSDHCIHost):LongWord;
Note | Called automatically to stop each registered SDHCI controller when required |
---|---|
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
function SDHCIHostLock(SDHCI:PSDHCIHost):LongWord; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostUnlock(SDHCI:PSDHCIHost):LongWord; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSignal(SDHCI:PSDHCIHost; Semaphore:TSemaphoreHandle):LongWord; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostReadByte(SDHCI:PSDHCIHost; Reg:LongWord):Byte; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostReadWord(SDHCI:PSDHCIHost; Reg:LongWord):Word; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostReadLong(SDHCI:PSDHCIHost; Reg:LongWord):LongWord; inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostWriteByte(SDHCI:PSDHCIHost; Reg:LongWord; Value:Byte); inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostWriteWord(SDHCI:PSDHCIHost; Reg:LongWord; Value:Word); inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostWriteLong(SDHCI:PSDHCIHost; Reg:LongWord; Value:LongWord); inline;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSetClockDivider(SDHCI:PSDHCIHost; Index:Integer; Divider:LongWord):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostSetControlRegister(SDHCI:PSDHCIHost):LongWord;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostGetADMAAddress(SDHCI:PSDHCIHost):PtrUInt;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostSetADMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostGetSDMAAddress(SDHCI:PSDHCIHost; Command:PMMCCommand):PtrUInt;
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostSetSDMAAddress(SDHCI:PSDHCIHost; Address:PtrUInt);
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
procedure SDHCIHostWriteADMADescriptor(SDHCI:PSDHCIHost; var Descriptor:Pointer; Command,Len:Word; Address:PtrUInt);
Note | Not intended to be called directly by applications, may be used by SDHCI drivers. |
---|
function SDHCIHostCreate:PSDHCIHost;
Return | Pointer to new SDHCI entry or nil if SDHCI could not be created |
---|
function SDHCIHostCreateEx(Size:LongWord):PSDHCIHost;
Size | Size in bytes to allocate for new SDHCI (Including the SDHCI entry) |
---|---|
Return | Pointer to new SDHCI entry or nil if SDHCI could not be created |
function SDHCIHostDestroy(SDHCI:PSDHCIHost):LongWord;
Note | None documented |
---|
function SDHCIHostRegister(SDHCI:PSDHCIHost):LongWord;
Note | None documented |
---|
function SDHCIHostDeregister(SDHCI:PSDHCIHost):LongWord;
Note | None documented |
---|
function SDHCIHostFind(SDHCIId:LongWord):PSDHCIHost;
Note | None documented |
---|
function SDHCIHostEnumerate(Callback:TSDHCIEnumerate; Data:Pointer):LongWord;
Note | None documented |
---|
function SDHCIHostNotification(SDHCI:PSDHCIHost; Callback:TSDHCINotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Note | None documented |
---|
MMC helper functions
function MMCGetCount:LongWord;
Note | None documented |
---|
function MMCDeviceCheck(MMC:PMMCDevice):PMMCDevice;
Note | None documented |
---|
function MMCIsSD(MMC:PMMCDevice):Boolean;
Note | None documented |
---|
function MMCIsSDIO(MMC:PMMCDevice):Boolean;
Note | None documented |
---|
function MMCGetSDHCI(MMC:PMMCDevice):PSDHCIHost; inline;
Note | None documented |
---|
function MMCGetCIDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
Note | None documented |
---|
function MMCGetCSDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Note | None documented |
---|
function MMCExtractBits(Buffer:Pointer; Start,Size:LongWord):LongWord;
Start | Start is the starting bit to extract |
---|---|
Size | Size is the number of bits to extract |
Note | Start is the LSB so to extract 8 bits from 127 to 120 then Start would be 120 and Size would be 8 |
function MMCExtractBitsEx(Buffer:Pointer; Length,Start,Size:LongWord):LongWord;
Length | Length is the size of the buffer in LongWords |
---|---|
Start | Start is the starting bit to extract |
Size | Size is the number of bits to extract |
Note | Start is the LSB so to extract 8 bits from 127 to 120 then Start would be 120 and Size would be 8. For a 128 bit buffer (16 bytes) Length would be 4. For a 512 bit buffer (64 bytes) Length would be 16. |
function MMCIsMultiCommand(Command:Word):Boolean; inline;
Note | None documented |
---|
function MMCIsNonRemovable(MMC:PMMCDevice):Boolean; inline;
Note | None documented |
---|
function MMCHasExtendedCSD(MMC:PMMCDevice):Boolean; inline;
Note | None documented |
---|
function MMCHasSetBlockCount(MMC:PMMCDevice):Boolean; inline;
Note | None documented |
---|
function MMCHasAutoBlockCount(MMC:PMMCDevice):Boolean; inline;
Note | None documented |
---|
function MMCHasAutoCommandStop(MMC:PMMCDevice):Boolean; inline;
Note | None documented |
---|
function MMCStatusToString(Status:LongWord):String;
Note | None documented |
---|
function MMCVersionToString(Version:LongWord):String;
Note | None documented |
---|
function MMCTimingToString(Timing:LongWord):String;
Note | None documented |
---|
function MMCBusWidthToString(BusWidth:LongWord):String;
Note | None documented |
---|
function MMCDriverTypeToString(DriverType:LongWord):String;
Note | None documented |
---|
function MMCSignalVoltageToString(SignalVoltage:LongWord):String;
Note | None documented |
---|
function MMCDeviceTypeToString(MMCType:LongWord):String;
Note | None documented |
---|
function MMCDeviceStateToString(MMCState:LongWord):String;
Note | None documented |
---|
function MMCDeviceStateToNotification(State:LongWord):LongWord;
Note | None documented |
---|
procedure MMCLog(Level:LongWord; MMC:PMMCDevice; const AText:String);
Note | None documented |
---|
procedure MMCLogInfo(MMC:PMMCDevice; const AText:String); inline;
Note | None documented |
---|
procedure MMCLogWarn(MMC:PMMCDevice; const AText:String); inline;
Note | None documented |
---|
procedure MMCLogError(MMC:PMMCDevice; const AText:String); inline;
Note | None documented |
---|
procedure MMCLogDebug(MMC:PMMCDevice; const AText:String); inline;
Note | None documented |
---|
SD helper functions
function SDGetMaxClock(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDGetCIDValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Note | None documented |
---|
function SDGetCSDValue(MMC:PMMCDevice; Version,Value:LongWord):LongWord;
Note | None documented |
---|
function SDGetSCRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Note | None documented |
---|
function SDGetSSRValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Note | None documented |
---|
function SDGetSwitchValue(MMC:PMMCDevice; Value:LongWord):LongWord;
Note | None documented |
---|
function SDVersionToString(Version:LongWord):String;
Note | None documented |
---|
function SDBusWidthToString(BusWidth:LongWord):String;
Note | None documented |
---|
SDIO helper functions
function SDIODriverGetCount:LongWord;
Note | None documented |
---|
function SDIODriverCheck(Driver:PSDIODriver):PSDIODriver;
Note | None documented |
---|
function SDIODeviceGetMaxClock(MMC:PMMCDevice):LongWord;
Note | None documented |
---|
function SDIOFunctionGetMMC(Func:PSDIOFunction):PMMCDevice;
Note | None documented |
---|
function SDIOFunctionGetSDHCI(Func:PSDIOFunction):PSDHCIHost;
Note | None documented |
---|
function SDIOVersionToString(Version:LongWord):String;
Note | None documented |
---|
function SDIOFunctionStateToString(SDIOState:LongWord):String;
Note | None documented |
---|
function SDIOFunctionStatusToString(SDIOStatus:LongWord):String;
Note | None documented |
---|
function SDIOFunctionStateToNotification(State:LongWord):LongWord;
Note | None documented |
---|
SDIOFunctionStatusToNotification(Status:LongWord):LongWord;
Note | None documented |
---|
SDHCI helper functions
function SDHCIGetCount:LongWord;
Note | None documented |
---|
function SDHCIHostCheck(SDHCI:PSDHCIHost):PSDHCIHost;
Note | None documented |
---|
function SDHCIIsSPI(SDHCI:PSDHCIHost):Boolean;
Note | None documented |
---|
function SDHCIHasDMA(SDHCI:PSDHCIHost):Boolean;
Note | None documented |
---|
function SDHCIHasCMD23(SDHCI:PSDHCIHost):Boolean;
Note | None documented |
---|
function SDHCIAutoCMD12(SDHCI:PSDHCIHost):Boolean;
Note | None documented |
---|
function SDHCIAutoCMD23(SDHCI:PSDHCIHost):Boolean;
Note | None documented |
---|
function SDHCIGetVersion(SDHCI:PSDHCIHost):Word;
Note | None documented |
---|
function SDHCIGetCommand(Command:Word):Word;
Note | None documented |
---|
function SDHCIMakeCommand(Command,Flags:Word):Word;
Note | None documented |
---|
function SDHCIMakeBlockSize(DMA,BlockSize:Word):Word;
Note | None documented |
---|
function SDHCIVersionToString(Version:LongWord):String;
Note | None documented |
---|
function SDHCIPowerToString(Power:LongWord):String;
Note | None documented |
---|
function SDHCIDeviceTypeToString(SDHCIType:LongWord):String; inline;
Note | None documented |
---|
function SDHCIHostTypeToString(SDHCIType:LongWord):String;
Note | None documented |
---|
function SDHCIDeviceStateToString(SDHCIState:LongWord):String; inline;
Note | None documented |
---|
function SDHCIHostStateToString(SDHCIState:LongWord):String;
Note | None documented |
---|
function SDHCIHostStateToNotification(State:LongWord):LongWord;
Note | None documented |
---|
MMC storage functions
function MMCStorageDeviceRead(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCStorageDeviceWrite(Storage:PStorageDevice; const Start,Count:Int64; Buffer:Pointer):LongWord;
Note | None documented |
---|
function MMCStorageDeviceErase(Storage:PStorageDevice; const Start,Count:Int64):LongWord;
Note | None documented |
---|
function MMCStorageDeviceControl(Storage:PStorageDevice; Request:Integer; Argument1:PtrUInt; var Argument2:PtrUInt):LongWord;
Note | None documented |
---|
SDIO macro replacement functions
function SDIO_FBR_BASE(Number:LongWord):LongWord; inline;
Note | None documented |
---|
Return to Unit Reference