MMC/SD/SDIO Host Driver
i.MX51 EVK Linux Reference Manual
27-2
Freescale Semiconductor
To transmitting data, the steps are as follows:
1. The eSDHC controller generates a DMA request whenever the amount of the buffer space exceeds
the value set in the WR_WML register
2. Upon receiving this request, the DMA engine starts moving data from the system memory to the
eSDHC FIFO by writing to the Data Buffer Access Register for a number of pre-defined bytes
The read-only eSDHC Present State and Interrupt Status Registers provide eSDHC operations status,
application FIFO status, error conditions, and interrupt status.
When certain events occur, the module has the ability to generate interrupts as well as set the
corresponding Status Register bits. The eSDHC interrupt status enable and signal enable registers allow
the user to control if these interrupts occur.
27.2
Software Operation
The Linux OS contains an MMC bus driver which implements the MMC bus protocols. The MMC block
driver handles the file system read/write calls and uses the low level MMC host controller interface driver
to send the commands to the eSDHC.
The MMC driver is responsible for implementing standard entry points for init, exit, request, and set_ios.
The driver implements the following functions:
•
The init function
sdhci_drv_init()
—Registers the device_driver structure.
•
The probe function
sdhci_probe and sdhci_probe_slot()
—Performs initialization and
registration of the MMC device specific structure with MMC bus protocol driver. The driver
probes for memory and IRQ resources. Configures the IOMUX to enable eSDHC I/O pins and
resets the hardware.
•
sdhci_set_ios()
—Sets bus width, voltage level, and clock rate according to core driver
requirements.
•
sdhci_request()
—Handles both read and write operations. Sets up the number of blocks and block
length. Configures an DMA channel, allocates safe DMA buffer and starts the DMA channel.
Configures the eSDHC transfer type register eSDHC command argument register to issue a
command to the card. This function starts the SDMA and starts the clock.
•
MMC driver ISR
sdhci_cd_irq()
—Called when the MMC/SD card is detected or removed.
•
MMC driver ISR
sdhci_irq()
—Interrupt from eSDHC called when command is done or errors
like CRC or buffer underrun or overflow occurs.
•
DMA completion routine
sdhci_dma_irq()
—Called after completion of a DMA transfer. Informs
the MMC core driver of a request completion by calling
mmc_request_done()
API.
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...