Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static void sdhci_dma_irq ( void *  devid,
int  error,
unsigned int  cnt 
) [static]

This function is called by DMA Interrupt Service Routine to indicate requested DMA transfer is completed.

devid pointer to device specific structure
error any DMA error
cnt amount of data that was transferred

Definition at line 1397 of file mx_sdhci.c.

References mxc_dma_disable().

      u32 intsave = 0;
      int ret;
      struct sdhci_host *host = devid;

      DBG("%s: error: %d Transferred bytes:%d\n", DRIVER_NAME, error, cnt);
      if (host->flags & SDHCI_USE_EXTERNAL_DMA) {
             * Stop the DMA transfer here, the data_irq would be called
             * to process the others
            ret = mxc_dma_disable(host->dma);
            if (ret < 0)
                  printk(KERN_ERR "Disable dma channel err %d\n", ret);

            if (error) {
                  DBG("Error in DMA transfer\n");
            intsave = readl(host->ioaddr + SDHCI_INT_ENABLE);
            intsave |= SDHCI_INT_DATA_RE_MASK;
            writel(intsave, host->ioaddr + SDHCI_INT_ENABLE);

Generated by  Doxygen 1.6.0   Back to index