#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <reg/reg-smhc.h>
#include <sys-gpio.h>
#include <log.h>
Go to the source code of this file.
◆ SMHC_DES_BUFFER_MAX_LEN
◆ SMHC_DES_NUM_SHIFT
| #define SMHC_DES_NUM_SHIFT 12 /* smhc2!! */ |
◆ sdhci_type_t
| Enumerator |
|---|
| SDHCI_TYPE_SD | |
| SDHCI_TYPE_MMC | |
◆ smhc_clk_t
| Enumerator |
|---|
| MMC_CLK_400K | |
| MMC_CLK_25M | |
| MMC_CLK_50M | |
| MMC_CLK_50M_DDR | |
| MMC_CLK_100M | |
| MMC_CLK_150M | |
| MMC_CLK_200M | |
◆ sdhci_reset()
Reset the SD card controller.
- Parameters
-
| hci | A pointer to the SD card controller structure. |
- Returns
- True if the reset is successful, false otherwise.
◆ sdhci_set_clock()
Set the clock frequency for the SD card controller.
- Parameters
-
| hci | A pointer to the SD card controller structure. |
| hz | The clock frequency value to be set. |
- Returns
- True if the clock frequency setting is successful, false otherwise.
◆ sdhci_set_voltage()
Set the voltage for the SD card controller.
- Parameters
-
| hci | A pointer to the SD card controller structure. |
| voltage | The voltage value to be set. |
- Returns
- True if the voltage setting is successful, false otherwise.
◆ sdhci_set_width()
Set the data bus width for the SD card controller.
- Parameters
-
| hci | A pointer to the SD card controller structure. |
| width | The data bus width value to be set. |
- Returns
- True if the data bus width setting is successful, false otherwise.
◆ sdhci_transfer()
Perform a data transfer operation with the SD card controller.
- Parameters
-
| hci | A pointer to the SD card controller structure. |
| cmd | Pointer to the SD command structure. |
| dat | Pointer to the SD data structure. |
- Returns
- True if the transfer is successful, false otherwise.
◆ sunxi_sdhci_init()
| int sunxi_sdhci_init |
( |
sdhci_t * |
sdhci | ) |
|
Initialize the SD card controller for Sunxi platform.
- Parameters
-
| sdhci | A pointer to the SD card controller structure. |
- Returns
- 0 if initialization is successful, an error code otherwise.
◆ sdhci0