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

Subversion Repositories test_project

[/] [test_project/] [trunk/] [linux_sd_driver/] [drivers/] [mmc/] [core/] [sd.c] - Diff between revs 62 and 81

Show entire file | Details | Blame | View Log

Rev 62 Rev 81
Line 167... Line 167...
        u32 resp[4];
        u32 resp[4];
 
 
        resp[3] = card->raw_scr[1];
        resp[3] = card->raw_scr[1];
        resp[2] = card->raw_scr[0];
        resp[2] = card->raw_scr[0];
 
 
 
        //#ifdef CORES_SD_V1    
        scr_struct = UNSTUFF_BITS(resp, 60, 4);
        scr_struct = UNSTUFF_BITS(resp, 60, 4);
        if (scr_struct != 0) {
 
                printk(KERN_ERR "%s: unrecognised SCR structure version %d\n",
                printk(KERN_ERR "%s: unrecognised SCR structure version %d\n",
                        mmc_hostname(card->host), scr_struct);
                        mmc_hostname(card->host), scr_struct);
                return -EINVAL;
 
        }
 
 
 
        scr->sda_vsn = UNSTUFF_BITS(resp, 56, 4);
                scr->sda_vsn = 0 ;//XXX: UNSTUFF_BITS(resp, 48, 4);UNSTUFF_BITS(resp, 56, 4);
        scr->bus_widths = UNSTUFF_BITS(resp, 48, 4);
                scr->bus_widths =1<<2 ;//XXX: UNSTUFF_BITS(resp, 48, 4);
 
 
 
        /*#else
 
                scr_struct = UNSTUFF_BITS(resp, 60, 4);
 
                if (scr_struct != 0) {
 
                        printk(KERN_ERR "%s: unrecognised SCR structure version %d\n",
 
                                mmc_hostname(card->host), scr_struct);
 
                        return -EINVAL;
 
                }
 
 
 
        #endif */
 
 
 
 
        return 0;
        return 0;
}
}
 
 
/*
/*
Line 441... Line 450...
        /*
        /*
         * Switch to wider bus (if supported).
         * Switch to wider bus (if supported).
         */
         */
        if ((host->caps & MMC_CAP_4_BIT_DATA) &&
        if ((host->caps & MMC_CAP_4_BIT_DATA) &&
                (card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {
                (card->scr.bus_widths & SD_SCR_BUS_WIDTH_4)) {
 
                printk("Wide Bus\n");
                err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);
                err = mmc_app_set_bus_width(card, MMC_BUS_WIDTH_4);
                if (err)
                if (err)
                        goto free_card;
                        goto free_card;
 
 
                mmc_set_bus_width(host, MMC_BUS_WIDTH_4);
                mmc_set_bus_width(host, MMC_BUS_WIDTH_4);

powered by: WebSVN 2.1.0

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