OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [linux_sd_driver/] [drivers/] [mmc/] [host/] [mmc_ocores.c] - Diff between revs 74 and 75

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 74 Rev 75
Line 129... Line 129...
        printk(KERN_ALERT "%s: cmd_arg = %08x\n", __FUNCTION__, cmd_arg);
        printk(KERN_ALERT "%s: cmd_arg = %08x\n", __FUNCTION__, cmd_arg);
        printk(KERN_ALERT "%s: cmd_command   = %08x\n", __FUNCTION__, cmd_command);
        printk(KERN_ALERT "%s: cmd_command   = %08x\n", __FUNCTION__, cmd_command);
        oc_host=host;
        oc_host=host;
 
 
        //XXX:Remove after uppdated bitfil with Timeout
        //XXX:Remove after uppdated bitfil with Timeout
        if (cmd->opcode == 8  || cmd->opcode ==  5 )
        /*if (cmd->opcode == 8  || cmd->opcode ==  5 )
        {
        {
                host->mrq->cmd->error = -ETIMEDOUT;
                host->mrq->cmd->error = -ETIMEDOUT;
                mmc_request_done(host->mmc, host->mrq);
                mmc_request_done(host->mmc, host->mrq);
        }
        }
        else
        else
        {
        {
 
                CMD_IRQ_ON (host,(ECC|EEI));
 
                writel(cmd_command, host->base + SD_COMMAND);
 
                wmb();
 
                writel(cmd_arg, host->base + SD_ARG);
 
        }*/
                CMD_IRQ_ON (host,(ECC|EEI));
                CMD_IRQ_ON (host,(ECC|EEI));
                writel(cmd_command, host->base + SD_COMMAND);
                writel(cmd_command, host->base + SD_COMMAND);
                wmb();
                wmb();
                writel(cmd_arg, host->base + SD_ARG);
                writel(cmd_arg, host->base + SD_ARG);
        }
        }
}
 
 
 
static void ocores_process_next(struct ocores_host *host)
static void ocores_process_next(struct ocores_host *host)
{
{
        host->word_cnt=0;
        host->word_cnt=0;
        if (!(host->flags & FL_SENT_COMMAND)) {
        if (!(host->flags & FL_SENT_COMMAND)) {
Line 396... Line 400...
        }
        }
        else
        else
        {
        {
                if ( mmc_resp_type(host->mrq->cmd) == MMC_RSP_R2      )   //Long response
                if ( mmc_resp_type(host->mrq->cmd) == MMC_RSP_R2      )   //Long response
                {
                {
                        printk(KERN_ALERT "Long Response, Word Cnt  * = %08x\n ",host->word_cnt);
                        printk(KERN_ALERT "Long Response, Word Cnt %d, RESP  * = %08x\n ",host->word_cnt,readl(host->base + SD_RESP1));
 
 
 
                        if  (host->mrq->cmd->opcode == 2){
 
                        host->mrq->cmd->resp[3]  =  readl(host->base + SD_RESP1);
 
                        host->mrq->cmd->resp[2]  =  0xaaaaaaaa;
 
                        host->mrq->cmd->resp[1]  =  0xbbbbbbbb;
 
                        host->mrq->cmd->resp[0]  =  0;
 
                        mmc_request_done(host->mmc, host->mrq);
 
 
 
                        }
 
                        else {
                        host->word_cnt+=1;
                        host->word_cnt+=1;
                        switch(host->word_cnt-1)
                        switch(host->word_cnt-1)
                        {
                        {
                        case (0):
                        case (0):
                                host->mrq->cmd->resp[3]  =  readl(host->base + SD_RESP1);
                                host->mrq->cmd->resp[3]  =  readl(host->base + SD_RESP1);
Line 418... Line 432...
                                host->mrq->cmd->resp[0]  =  readl(host->base + SD_RESP1);
                                host->mrq->cmd->resp[0]  =  readl(host->base + SD_RESP1);
                                mmc_request_done(host->mmc, host->mrq);
                                mmc_request_done(host->mmc, host->mrq);
                                break;
                                break;
                        }
                        }
                }
                }
 
                }
                else  //Short response
                else  //Short response
                {
                {
                        host->mrq->cmd->error = 0 ;
                        host->mrq->cmd->error = 0 ;
                        host->mrq->cmd->resp[0] = readl(host->base + SD_RESP1);
                        host->mrq->cmd->resp[0] = readl(host->base + SD_RESP1);
                        printk(KERN_ALERT "Short Response CMD RSP * = %08x\n", host->mrq->cmd->resp[0]);
                        printk(KERN_ALERT "Short Response CMD RSP * = %08x\n", host->mrq->cmd->resp[0]);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.